Paketmarke autoselect product according to weight

This commit is contained in:
OpenXE 2024-03-19 18:10:43 +00:00
parent 632f1c1a09
commit 56cfc54aa5

View File

@ -239,6 +239,9 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
const createshipmentapp = new Vue({ const createshipmentapp = new Vue({
el: '#createshipmentapp', el: '#createshipmentapp',
data: [JSON], data: [JSON],
mounted() {
this.autoselectproduct();
},
computed: { computed: {
total_value() { total_value() {
let sum = 0; let sum = 0;
@ -287,9 +290,8 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
}, },
customsRequired: function () { customsRequired: function () {
return this.countries[this.form.country].eu == '0'; return this.countries[this.form.country].eu == '0';
}
}, },
beforeUpdate: function () { autoselectproduct: function () {
if (!this.productAvailable(this.products[this.form.product])) { if (!this.productAvailable(this.products[this.form.product])) {
for (prod in this.products) { for (prod in this.products) {
if (!this.productAvailable(this.products[prod])) if (!this.productAvailable(this.products[prod]))
@ -299,5 +301,9 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
} }
} }
} }
},
beforeUpdate: function () {
this.autoselectproduct();
}
}) })
</script> </script>