Prepare next session
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Pierre HUBERT 2024-06-20 23:06:10 +02:00
parent 1305667f24
commit 30cca548c2
2 changed files with 7 additions and 2 deletions

View File

@ -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 (
<>
<FamilyPageTitle title="Réservations" />
@ -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

View File

@ -27,6 +27,5 @@ export function fmtUnixDateFullCalendar(
.toString(10)
.padStart(2, "0")}`*/
console.log(s, d);
return s;
}