refactor: Split EventFormFields.tsx into smaller modules

- Extract helper functions to utils/dateTimeHelpers.ts and utils/dateTimeFormatters.ts
- Extract validation logic to utils/formValidation.ts
- Extract FieldWithLabel component to components/FieldWithLabel.tsx
- Extract DateTimeFields component to components/DateTimeFields.tsx
- Extract all-day toggle logic to hooks/useAllDayToggle.ts
- Update imports in EventModal.tsx, EventUpdateModal.tsx, EventDisplay.tsx, eventHandlers.ts
- Maintain all existing functionality without breaking changes
This commit is contained in:
lenhanphung
2025-10-24 16:23:10 +07:00
committed by Benoit TELLIER
parent 701f2f2b71
commit 01f79553c0
11 changed files with 657 additions and 441 deletions
@@ -16,7 +16,7 @@ import { getEvent } from "../../../features/Events/EventApi";
import { refreshCalendars } from "../../Event/utils/eventUtils";
import { updateTempCalendar } from "../utils/calendarUtils";
import { User } from "../../Attendees/PeopleSearch";
import { formatLocalDateTime } from "../../Event/EventFormFields";
import { formatLocalDateTime } from "../../Event/utils/dateTimeFormatters";
export interface EventHandlersProps {
setSelectedRange: (range: DateSelectArg | null) => void;