diff --git a/geneit_app/src/App.tsx b/geneit_app/src/App.tsx index 0eaed2f..bc3cfd6 100644 --- a/geneit_app/src/App.tsx +++ b/geneit_app/src/App.tsx @@ -18,6 +18,7 @@ import { PasswordForgottenRoute } from "./routes/auth/PasswordForgottenRoute"; import { ResetPasswordRoute } from "./routes/auth/ResetPasswordRoute"; import { FamilySettingsRoute } from "./routes/family/FamilySettingsRoute"; import { FamilyUsersListRoute } from "./routes/family/FamilyUsersListRoute"; +import { AccommodationsHomeRoute } from "./routes/family/accommodations/AccommodationsHomeRoute"; import { AccommodationsSettingsRoute } from "./routes/family/accommodations/AccommodationsSettingsRoute"; import { FamilyCoupleRoute, @@ -116,6 +117,7 @@ export function App(): React.ReactElement { path="accommodations/*" element={} > + } /> } diff --git a/geneit_app/src/routes/family/accommodations/AccommodationsHomeRoute.tsx b/geneit_app/src/routes/family/accommodations/AccommodationsHomeRoute.tsx new file mode 100644 index 0000000..861573b --- /dev/null +++ b/geneit_app/src/routes/family/accommodations/AccommodationsHomeRoute.tsx @@ -0,0 +1,21 @@ +import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle"; +import { useAccommodations } from "../../../widgets/accommodations/BaseAccommodationsRoute"; + +export function AccommodationsHomeRoute(): React.ReactElement { + const accommodations = useAccommodations(); + return ( + <> + +
+

+ Depuis cette section de l'application, vous pouvez effectuer des + réservations de logements. +

+

 

+

+ Nombre de logements définis : {accommodations.accommodations.size} +

+
+ + ); +} diff --git a/geneit_app/src/widgets/BaseFamilyRoute.tsx b/geneit_app/src/widgets/BaseFamilyRoute.tsx index 5206921..7f215db 100644 --- a/geneit_app/src/widgets/BaseFamilyRoute.tsx +++ b/geneit_app/src/widgets/BaseFamilyRoute.tsx @@ -185,6 +185,19 @@ export function BaseFamilyRoute(): React.ReactElement { )} + {family?.enable_accommodations && ( + <> + + Logements + + } + label="Accueil" + uri="accommodations" + /> + + )} + Administration