Updated Shipping Note

This commit is contained in:
Luca Haid
2025-03-21 09:01:47 +01:00
parent d9a2ba1ef4
commit 027338f93d
2 changed files with 7 additions and 3 deletions
@@ -171,7 +171,7 @@ Vue.component('tt-positions-manager',
},
checkEmitDisplayValueAutocomplete() {
for (const [key, field] of Object.entries(this.config.fields)) {
if (field.type === 'autocomplete' && field.emitDisplayValue && (isNaN(this.formData[key]) || !this.formData[key]) && this.$refs['autocomplete-' + key][0]) {
if (typeof field.showCondition === 'function' && field.showCondition(this.formData) === true && field.type === 'autocomplete' && field.emitDisplayValue && (isNaN(this.formData[key]) || !this.formData[key]) && this.$refs['autocomplete-' + key][0]) {
this.$set(this.formData, key + '_text', this.$refs['autocomplete-' + key][0].displayValue);
this.$delete(this.formData, key);
}
@@ -207,7 +207,9 @@ Vue.component('tt-positions-manager',
resetForm() {
this.formData = {};
for (const [key, field] of Object.entries(this.config.fields)) {
if (field.type === 'autocomplete' && field.emitDisplayValue && this.$refs['autocomplete-' + key][0]) {
if (
typeof field.showCondition === 'function' && field.showCondition(this.formData) === true &&
field.type === 'autocomplete' && field.emitDisplayValue && this.$refs['autocomplete-' + key][0]) {
this.$refs['autocomplete-' + key][0].displayValue = '';
}
if (field.inputType === 'date') {