Add an accommodations reservations module #188
@ -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={<BaseAccommodationsRoute />}
|
||||
>
|
||||
<Route path="" element={<AccommodationsHomeRoute />} />
|
||||
<Route
|
||||
path="settings"
|
||||
element={<AccommodationsSettingsRoute />}
|
||||
|
@ -0,0 +1,21 @@
|
||||
import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle";
|
||||
import { useAccommodations } from "../../../widgets/accommodations/BaseAccommodationsRoute";
|
||||
|
||||
export function AccommodationsHomeRoute(): React.ReactElement {
|
||||
const accommodations = useAccommodations();
|
||||
return (
|
||||
<>
|
||||
<FamilyPageTitle title="Réservation de logements" />
|
||||
<div style={{ margin: "20px" }}>
|
||||
<p>
|
||||
Depuis cette section de l'application, vous pouvez effectuer des
|
||||
réservations de logements.
|
||||
</p>
|
||||
<p> </p>
|
||||
<p>
|
||||
Nombre de logements définis : {accommodations.accommodations.size}
|
||||
</p>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
@ -185,6 +185,19 @@ export function BaseFamilyRoute(): React.ReactElement {
|
||||
</>
|
||||
)}
|
||||
|
||||
{family?.enable_accommodations && (
|
||||
<>
|
||||
<Divider sx={{ my: 1 }} />
|
||||
<ListSubheader component="div">Logements</ListSubheader>
|
||||
|
||||
<FamilyLink
|
||||
icon={<HomeIcon />}
|
||||
label="Accueil"
|
||||
uri="accommodations"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Divider sx={{ my: 1 }} />
|
||||
<ListSubheader component="div">Administration</ListSubheader>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user