implement default destination for boats

This commit is contained in:
2023-11-09 08:56:08 +01:00
parent ed0989e2a1
commit 715fae59fc
7 changed files with 26 additions and 13 deletions

View File

@ -105,6 +105,7 @@ interface ChoiceBoatEvent extends Event{
customProperties: {
amount_seats: number,
owner: number,
default_destination: string,
}
};
}
@ -125,6 +126,9 @@ function selectBoatChange() {
const amount_seats = event.detail.customProperties.amount_seats;
setMaxAmountRowers("newrower", amount_seats);
const destination = <HTMLSelectElement>document.querySelector('#destination');
destination.value = event.detail.customProperties.default_destination;
if (event.detail.customProperties.owner){
choiceObjects["newrower"].setChoiceByValue(event.detail.customProperties.owner+"");
}