edit repairs

This commit is contained in:
Julian Krauser 2025-07-22 13:10:04 +02:00
parent c79d5bb1cd
commit 789272dc37
9 changed files with 201 additions and 74 deletions

View file

@ -111,7 +111,7 @@ export default defineComponent({
required: true,
},
},
emits: ["update:model-value", "add:difference", "remove:difference", "add:damageReport", "add:damageReportByArray"],
emits: ["update:model-value", "add:difference", "remove:difference", "add:damageReport"],
watch: {
modelValue() {
// if (this.initialLoaded) return;
@ -215,15 +215,18 @@ export default defineComponent({
});
},
getDamageReportFromSearch(id: string) {
return this.filtered.find((f) => f.id == id);
return this.available.find((f) => f.id == id);
},
loadDamageReportsInitial() {
if (this.modelValue.length == 0) return;
this.getDamageReportsByIds(this.modelValue)
.then((res) => {
this.chosen = res.data;
})
.catch(() => {});
if (this.modelValue.length == 0) {
this.chosen = [];
} else {
this.getDamageReportsByIds(this.modelValue)
.then((res) => {
this.chosen = res.data;
})
.catch(() => {});
}
},
},
});

View file

@ -201,7 +201,7 @@ export default defineComponent({
});
},
getDamageReportFromSearch(id: string) {
return this.filtered.find((f) => f.id == id);
return this.available.find((f) => f.id == id);
},
loadDamageReportInitial() {
if (this.modelValue == "" || this.modelValue == null) return;