Add an accommodations reservations module #188

Merged
pierre merged 81 commits from accomodation_module into master 2024-06-22 21:30:26 +00:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 30cca548c2 - Show all commits

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;
}