diff --git a/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx b/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx index b47e03b..2d7bfc2 100644 --- a/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx +++ b/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx @@ -1,4 +1,4 @@ -import { DateSelectArg } from "@fullcalendar/core"; +import { DateSelectArg, EventClickArg } from "@fullcalendar/core"; import frLocale from "@fullcalendar/core/locales/fr"; import dayGridPlugin from "@fullcalendar/daygrid"; import interactionPlugin from "@fullcalendar/interaction"; @@ -27,6 +27,7 @@ import { AsyncWidget } from "../../../widgets/AsyncWidget"; import { useFamily } from "../../../widgets/BaseFamilyRoute"; import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle"; import { useAccommodations } from "../../../widgets/accommodations/BaseAccommodationsRoute"; +import { EventImpl } from "@fullcalendar/core/internal"; export function AccommodationsReservationsRoute(): React.ReactElement { const snackbar = useSnackbar(); @@ -112,6 +113,10 @@ export function AccommodationsReservationsRoute(): React.ReactElement { } }; + const onEventClick = (ev: EventClickArg) => { + console.log(ev); + }; + return ( <> @@ -245,6 +250,7 @@ export function AccommodationsReservationsRoute(): React.ReactElement { right: "dayGridMonth,dayGridWeek,dayGridDay,listWeek", }} select={onSelect} + eventClick={onEventClick} events={visibleReservations?.map((r) => { const a = accommodations.accommodations.get( r.accommodation_id diff --git a/geneit_app/src/utils/time_utils.ts b/geneit_app/src/utils/time_utils.ts index 8b22197..aacde37 100644 --- a/geneit_app/src/utils/time_utils.ts +++ b/geneit_app/src/utils/time_utils.ts @@ -27,6 +27,5 @@ export function fmtUnixDateFullCalendar( .toString(10) .padStart(2, "0")}`*/ - console.log(s, d); return s; }