From ae82ad7bd70e86ff919878eb5521269928a60442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rufus=20Kogg=20R=C3=B6jder?= Date: Wed, 20 Nov 2024 10:02:21 +0100 Subject: [PATCH] Fix #538 "Bookings for styrelserummet should show a warning" (#586) * Fix 538 * Fix 538 * Use premade icons * change "council" to "board" when refering to "styrelsen" --------- Co-authored-by: Alfred Grip --- src/database/seed/data.ts | 1 + src/routes/(app)/booking/BookingEditor.svelte | 10 ++++++++++ src/translations/en.json | 3 ++- src/translations/sv.json | 3 ++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/database/seed/data.ts b/src/database/seed/data.ts index 20ea630ca..11c249fa3 100644 --- a/src/database/seed/data.ts +++ b/src/database/seed/data.ts @@ -44,6 +44,7 @@ export const BOOKABLES = [ { name: "Sektionsbilen" }, { name: "Lila Soundboks" }, { name: "Råsa Soundboks" }, + { name: "Styrelserummet", id: "99854837-fdb9-4dba-85fc-86a5c514253c" }, ]; export const COMMITTEES = [ diff --git a/src/routes/(app)/booking/BookingEditor.svelte b/src/routes/(app)/booking/BookingEditor.svelte index b554b9879..5918fa8b0 100644 --- a/src/routes/(app)/booking/BookingEditor.svelte +++ b/src/routes/(app)/booking/BookingEditor.svelte @@ -22,6 +22,9 @@ let start = $form.start; let end = $form.end; + const boardRoomId = "99854837-fdb9-4dba-85fc-86a5c514253c"; + $: showBoardRooomWarning = $form.bookables.includes(boardRoomId); + // Ensure that the start date is always before the end date function handleStartChange() { if (start && end) { @@ -103,6 +106,13 @@ {/each} + {#if showBoardRooomWarning} + + {/if} +