change of models

This commit is contained in:
Julian Krauser 2025-05-14 14:42:00 +02:00
parent a49babe48d
commit ee700d9e02
28 changed files with 257 additions and 39 deletions

View file

@ -15,7 +15,9 @@ export const useEquipmentInspectionStore = defineStore("equipmentInspection", {
actions: {
fetchInspectionForEquipment(offset = 0, count = 25, search = "", clear = false) {
const equipmentId = useEquipmentStore().activeEquipment;
this.inspections = inspectionDemoData.map((e, i) => ({ ...e, tab_pos: i }));
this.inspections = inspectionDemoData
.filter((idd) => idd.relatedId == equipmentId)
.map((e, i) => ({ ...e, tab_pos: i }));
this.totalCount = this.inspections.length;
this.loading = "fetched";
return;