From 601c75db3367881c5fc175b26e9b401f9cd46b28 Mon Sep 17 00:00:00 2001 From: lenhanphung Date: Wed, 8 Oct 2025 12:51:59 +0700 Subject: [PATCH] feat: integrate main's EventDisplayPreview UI with EventUpdateModal 1. Replace old EventDisplayPreview with main's new Figma UI - Use ResponsiveDialog instead of Popover - Keep file at features/Events/ location (not components/Event/) - Integrate InfoRow, EditModeDialog components from main - Fix all imports to work with new location 2. Add EventUpdateModal integration - Edit icon now opens EventUpdateModal instead of EventDisplayModal - EventUpdateModal uses shared EventFormFields component 3. Fix imports and exports - Use default import for ResponsiveDialog - Use named import for EditModeDialog - Fix anchorPosition to be optional with default value 4. Performance improvement - Open EventUpdateModal immediately without waiting for API - Let modal fetch fresh data in background via useEffect 5. Fix Checkbox styling warning - Use sx prop instead of style for nested MUI selectors - Fix 'Unsupported style property &.Mui-checked' console warning --- src/components/Calendar/Calendar.tsx | 2 +- src/components/Calendar/CalendarSelection.tsx | 2 +- src/components/Event/EventDisplayPreview.tsx | 580 -------------- src/features/Events/EventDisplayPreview.tsx | 711 ++++++++++-------- 4 files changed, 415 insertions(+), 880 deletions(-) delete mode 100644 src/components/Event/EventDisplayPreview.tsx diff --git a/src/components/Calendar/Calendar.tsx b/src/components/Calendar/Calendar.tsx index 3ab0b05..e0d7f69 100644 --- a/src/components/Calendar/Calendar.tsx +++ b/src/components/Calendar/Calendar.tsx @@ -23,7 +23,7 @@ import { } from "../../utils/dateUtils"; import { Calendars } from "../../features/Calendars/CalendarTypes"; import { push } from "redux-first-history"; -import EventPreviewModal from "../Event/EventDisplayPreview"; +import EventPreviewModal from "../../features/Events/EventDisplayPreview"; import { createSelector } from "@reduxjs/toolkit"; import AddIcon from "@mui/icons-material/Add"; import { TempCalendarsInput } from "./TempCalendarsInput"; diff --git a/src/components/Calendar/CalendarSelection.tsx b/src/components/Calendar/CalendarSelection.tsx index b974b64..7a43327 100644 --- a/src/components/Calendar/CalendarSelection.tsx +++ b/src/components/Calendar/CalendarSelection.tsx @@ -217,7 +217,7 @@ function CalendarSelector({