From be9a278c1171d82bb8ebac1aa830fb4ca9162934 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 22 Jun 2024 22:31:11 +0200 Subject: [PATCH] Fix code issues --- .../CreateAccommodationCalendarURLDialog.tsx | 2 +- .../dialogs/accommodations/UpdateAccommodationDialog.tsx | 2 +- .../accommodations/AccommodationsReservationsRoute.tsx | 4 ++++ .../accommodations/AccommodationsSettingsRoute.tsx | 9 ++++++++- geneit_app/src/utils/{from_utils.ts => form_utils.ts} | 2 +- geneit_app/src/widgets/CopyToClipboard.tsx | 2 +- .../accommodations_reservations_calendars_controller.rs | 2 ++ 7 files changed, 18 insertions(+), 5 deletions(-) rename geneit_app/src/utils/{from_utils.ts => form_utils.ts} (89%) diff --git a/geneit_app/src/dialogs/accommodations/CreateAccommodationCalendarURLDialog.tsx b/geneit_app/src/dialogs/accommodations/CreateAccommodationCalendarURLDialog.tsx index d95abf0..c5846f9 100644 --- a/geneit_app/src/dialogs/accommodations/CreateAccommodationCalendarURLDialog.tsx +++ b/geneit_app/src/dialogs/accommodations/CreateAccommodationCalendarURLDialog.tsx @@ -8,7 +8,7 @@ import { import React from "react"; import { ServerApi } from "../../api/ServerApi"; import { NewCalendarURL } from "../../api/accommodations/AccommodationsCalendarURLApi"; -import { checkConstraint } from "../../utils/from_utils"; +import { checkConstraint } from "../../utils/form_utils"; import { useAccommodations } from "../../widgets/accommodations/BaseAccommodationsRoute"; import { PropEdit } from "../../widgets/forms/PropEdit"; import { PropSelect } from "../../widgets/forms/PropSelect"; diff --git a/geneit_app/src/dialogs/accommodations/UpdateAccommodationDialog.tsx b/geneit_app/src/dialogs/accommodations/UpdateAccommodationDialog.tsx index a6d720e..8f179e6 100644 --- a/geneit_app/src/dialogs/accommodations/UpdateAccommodationDialog.tsx +++ b/geneit_app/src/dialogs/accommodations/UpdateAccommodationDialog.tsx @@ -9,7 +9,7 @@ import { import React from "react"; import { ServerApi } from "../../api/ServerApi"; import { UpdateAccommodation } from "../../api/accommodations/AccommodationListApi"; -import { checkConstraint } from "../../utils/from_utils"; +import { checkConstraint } from "../../utils/form_utils"; import { PropCheckbox } from "../../widgets/forms/PropCheckbox"; import { PropEdit } from "../../widgets/forms/PropEdit"; import { PropColorPicker } from "../../widgets/forms/PropColorPicker"; diff --git a/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx b/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx index 2f06fba..97d30b5 100644 --- a/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx +++ b/geneit_app/src/routes/family/accommodations/AccommodationsReservationsRoute.tsx @@ -560,10 +560,14 @@ export function AccommodationsReservationsRoute(): React.ReactElement { )} + {user.user.id === activeEvent?.reservation.user_id && ( <> changeReservation(activeEvent?.reservation) } diff --git a/geneit_app/src/routes/family/accommodations/AccommodationsSettingsRoute.tsx b/geneit_app/src/routes/family/accommodations/AccommodationsSettingsRoute.tsx index cb26ab1..9022ef5 100644 --- a/geneit_app/src/routes/family/accommodations/AccommodationsSettingsRoute.tsx +++ b/geneit_app/src/routes/family/accommodations/AccommodationsSettingsRoute.tsx @@ -3,6 +3,7 @@ import CheckIcon from "@mui/icons-material/Check"; import CloseIcon from "@mui/icons-material/Close"; import HouseIcon from "@mui/icons-material/House"; import { + Alert, Button, Card, CardActions, @@ -310,10 +311,16 @@ function AccommodationsCalURLsCard(): React.ReactElement { Vous pouvez, si vous le souhaitez, importer dans votre application de - calendrier le planning de réservation des logement. Pour ce faire, il + calendrier le planning de réservation des logements. Pour ce faire, il vous suffit de créer une URL de calendrier. + + Les calendriers créés ici ne sont visible que par vous. Vous ne pouvez + pas manipuler les calendriers créés par les autres membres de la + famille. + +