reservations

This commit is contained in:
2024-03-30 01:36:37 +01:00
parent 163c97b2f5
commit 649169c192
14 changed files with 490 additions and 10 deletions

View File

@ -7,6 +7,7 @@ export interface choiceMap {
let choiceObjects: choiceMap = {};
let boat_in_ottensheim = true;
let boat_reserved_today= true;
document.addEventListener("DOMContentLoaded", function () {
changeTheme();
@ -116,6 +117,7 @@ interface ChoiceBoatEvent extends Event {
owner: number;
default_destination: string;
boat_in_ottensheim: boolean;
boat_reserved_today: boolean;
};
};
}
@ -134,7 +136,13 @@ function selectBoatChange() {
boatSelect.addEventListener(
"addItem",
function (e) {
const event = e as ChoiceBoatEvent;
boat_reserved_today = event.detail.customProperties.boat_reserved_today;
console.log(event.detail.customProperties);
if (boat_reserved_today){
alert(event.detail.label+' wurde heute reserviert. Bitte kontrolliere, dass du die Reservierung nicht störst.');
}
boat_in_ottensheim = event.detail.customProperties.boat_in_ottensheim;
const amount_seats = event.detail.customProperties.amount_seats;