Skip to content

Commit

Permalink
Fix #538 "Bookings for styrelserummet should show a warning" (#586)
Browse files Browse the repository at this point in the history
* Fix 538

* Fix 538

* Use premade icons

* change "council" to "board" when refering to "styrelsen"

---------

Co-authored-by: Alfred Grip <[email protected]>
  • Loading branch information
RufusKoggRojder and alfredgrip authored Nov 20, 2024
1 parent cb6ded3 commit ae82ad7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/database/seed/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
10 changes: 10 additions & 0 deletions src/routes/(app)/booking/BookingEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -103,6 +106,13 @@
{/each}
</fieldset>

{#if showBoardRooomWarning}
<div role="alert" class="alert alert-warning">
<span class="i-mdi-alert-outline size-6" />
<span>{m.booking_boardRoomWarning()}</span>
</div>
{/if}

<label>
<span class="label-text ml-2 font-bold">{m.booking_from()}</span>
<input
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,5 +774,6 @@
"error_should_not_happen": "If you think this shouldn't happen please",
"error_or": "or",
"error_contact": "Contact DWWW",
"back": "Back"
"back": "Back",
"booking_boardRoomWarning": "Please note that during weekdays between 11:30-13:30, the Board always has access to the Board Room (RåsenbaD) for Board work. This means that all board members may enter and/or work in the boardroom even if the room is booked. It may be beneficial to book another time or place for conversations that may be sensitive."
}
3 changes: 2 additions & 1 deletion src/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -770,5 +770,6 @@
"error_should_not_happen": "Om du tror att detta inte bör hända",
"error_or": "eller",
"error_contact": "Kontakta DWWW",
"back": "Tillbaka"
"back": "Tillbaka",
"booking_boardRoomWarning": "Tänk på att under vardagar mellan 11:30-13:30 har styrelsen alltid tillgång till styrelserummet (RåsenbaD) för styrelsearbete. Detta betyder alltså att alla styrelsemedlemmar får gå in och/eller arbeta i styrelserummet även om rummet är bokat. Det kan vara fördelaktigt att boka en annan tid eller plats för samtal som kan vara känsliga."
}

0 comments on commit ae82ad7

Please sign in to comment.