add tests and fix npm build, make frontend tests work @ mobile view
Some checks are pending
CI/CD Pipeline / test (push) Waiting to run
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions

Reviewed-on: #224
This commit is contained in:
2024-03-04 09:55:39 +01:00
parent 996fcdc14f
commit 0de21e9abb
3 changed files with 74 additions and 2 deletions

View File

@ -107,6 +107,7 @@ interface ChoiceBoatEvent extends Event{
amount_seats: number,
owner: number,
default_destination: string,
boat_in_ottensheim: boolean,
}
};
}
@ -277,6 +278,7 @@ interface ChoiceEvent extends Event{
is_cox: boolean,
steers: boolean,
cox_on_boat: boolean,
is_racing: boolean,
}
};
}
@ -323,7 +325,7 @@ function initNewChoice(select: HTMLInputElement) {
},
callbackOnInit: function() {
this._currentState.items.forEach(function(obj){
if (boat_in_ottensheim) {
if (boat_in_ottensheim && obj.customProperties) {
if (obj.customProperties.is_racing) {
const coxSelect = <HTMLSelectElement>document.querySelector('#shipmaster-' + select.id + 'js');
var new_option = new Option(obj.label, obj.value);
@ -359,7 +361,7 @@ function initNewChoice(select: HTMLInputElement) {
const user_id = event.detail.value;
const name = event.detail.label;
if (boat_in_ottensheim) {
if (boat_in_ottensheim && event.detail.customProperties.is_racing) {
if (event.detail.customProperties.is_racing) {
const coxSelect = <HTMLSelectElement>document.querySelector('#shipmaster-' + select.id + 'js');
if (coxSelect){