[BUGFIX] js errors

This commit is contained in:
Marie Birner 2023-09-27 13:52:15 +02:00
parent 670351397e
commit 74c0db4e75

View File

@ -20,6 +20,8 @@ document.addEventListener('DOMContentLoaded', function() {
function selectBoatChange() {
const boatSelect = <HTMLSelectElement>document.querySelector('#boat_id');
if(boatSelect) {
const boatChoice = new Choices(boatSelect, {
loadingText: 'Wird geladen...',
noResultsText: 'Keine Ergebnisse gefunden',
@ -50,8 +52,10 @@ function selectBoatChange() {
} as any);
choiceObjects[boatSelect.id] = boatChoice;
}
const shipmasterSelect = <HTMLSelectElement>document.querySelector('#shipmaster');
if(shipmasterSelect) {
const shipmasterChoice = new Choices(shipmasterSelect, {
loadingText: 'Wird geladen...',
noResultsText: 'Keine Ergebnisse gefunden',
@ -61,6 +65,7 @@ function selectBoatChange() {
choiceObjects[shipmasterSelect.id] = shipmasterChoice;
}
}
function setMaxAmountRowers(rowers: number){
let curSelection = choiceObjects['newrower'].getValue(true);