Compare commits

...

2 Commits

Author SHA1 Message Date
1503544a73 Merge pull request 'don't use default distance of 11; don't overwrite distance if already entered' (#472) from logbook-entry-improvement into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m12s
CI/CD Pipeline / deploy-staging (push) Successful in 6m17s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #472
2024-04-30 21:31:29 +02:00
0b350d344d don't use default distance of 11; don't overwrite distance if already entered
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m4s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-04-30 21:21:01 +02:00

View File

@ -189,11 +189,6 @@ function selectBoatChange() {
inputElement.value = formattedDateTime;
const distinput = <HTMLInputElement>(
document.querySelector("#distance_in_km")
);
distinput.value = "";
const destinput = <HTMLInputElement>(
document.querySelector("#destination")
);
@ -759,9 +754,11 @@ function addRelationMagic(bodyElement: HTMLElement) {
},
);
if (option && option.value !== ""){
// Get distance
const distance = option.getAttribute("distance");
if (distance) relatedField.value = distance;
if (distance && relatedField.value === "") relatedField.value = distance;
}
}
});
}