Merge branch 'WarehouseHistory/fix-history-controller' into 'master'

fixed new model classes without model

See merge request fronk/thetool!1277
This commit is contained in:
Luca Haid
2025-04-29 11:03:03 +00:00

View File

@@ -181,6 +181,11 @@ Vue.component('tt-positions-manager',
this.$set(this.formData, key + '_text', this.$refs['autocomplete-' + key][0].displayValue);
this.$delete(this.formData, key);
}
if (field.emitDisplayValue && this.formData[key] !== null && this.formData[key] !== undefined) {
this.$delete(this.formData, key + '_text');
}
}
},
async saveEntry() {
@@ -202,8 +207,17 @@ Vue.component('tt-positions-manager',
this.positions.push({_group: this.groupName});
this.groupName = '';
},
editEntry(index) {
async editEntry(index) {
this.selectedIndex = index;
for (const [key, field] of Object.entries(this.config.fields)) {
if (field.type === 'autocomplete' && field.emitDisplayValue && this.$refs['autocomplete-' + key][0]) {
await this.$nextTick();
if (this.positions[index][key + '_text']) {
this.$refs['autocomplete-' + key][0].displayValue = this.positions[index][key + '_text'];
this.$set(this.formData, key, this.positions[index][key]);
}
}
}
this.formData = {...this.positions[index]};
},
deleteEntry(index) {