From ee700d9e0221edeafed677c2be5aa6eb53cb7c73 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Wed, 14 May 2025 14:42:00 +0200 Subject: [PATCH] change of models --- .../damageReport/DamageReportListItem.vue | 4 +- .../inspectionPlan/InspectionPlanListItem.vue | 2 +- src/demodata/damageReport.ts | 15 +++++ src/demodata/inspectionPlan.ts | 44 +++++++++++++++ src/demodata/vehicle.ts | 6 +- src/demodata/vehicleType.ts | 2 +- src/demodata/wearable.ts | 2 +- src/router/index.ts | 8 ++- .../admin/unit/equipment/damageReport.ts | 8 ++- src/stores/admin/unit/equipment/inspection.ts | 4 +- .../unit/equipmentType/inspectionPlan.ts | 4 +- .../unit/inspectionPlan/inspectionPlan.ts | 2 +- src/stores/admin/unit/vehicle/damageReport.ts | 8 ++- src/stores/admin/unit/vehicle/inspection.ts | 4 +- .../admin/unit/vehicleType/inspectionPlan.ts | 4 +- .../admin/unit/wearable/damageReport.ts | 50 +++++++++++++++++ .../unit/damageReport/damageReport.models.ts | 6 ++ .../inspectionPlan/inspectionPlan.models.ts | 11 +++- .../respiratoryWearer.models.ts | 2 +- .../admin/unit/wearable/wearable.models.ts | 2 +- .../admin/unit/equipment/EquipmentRouting.vue | 2 +- .../unit/equipmentType/InspectionPlans.vue | 10 +++- .../inspectionPlan/CreateInspectionPlan.vue | 21 +++++-- .../admin/unit/inspectionPlan/Overview.vue | 7 ++- .../admin/unit/vehicle/VehicleRouting.vue | 2 +- .../unit/vehicleType/InspectionPlans.vue | 10 +++- .../admin/unit/wearable/DamageReport.vue | 55 +++++++++++++++++++ .../admin/unit/wearable/WearableRouting.vue | 1 + 28 files changed, 257 insertions(+), 39 deletions(-) create mode 100644 src/stores/admin/unit/wearable/damageReport.ts create mode 100644 src/views/admin/unit/wearable/DamageReport.vue diff --git a/src/components/admin/unit/damageReport/DamageReportListItem.vue b/src/components/admin/unit/damageReport/DamageReportListItem.vue index cc54546..82fd74b 100644 --- a/src/components/admin/unit/damageReport/DamageReportListItem.vue +++ b/src/components/admin/unit/damageReport/DamageReportListItem.vue @@ -2,11 +2,11 @@

- {{ damageReport.affected.name }} + {{ damageReport.related.name }}

-

Code: {{ damageReport.affected.code }}

+

Code: {{ damageReport.related.code }}

Beschreibung: {{ damageReport.description }}

diff --git a/src/components/admin/unit/inspectionPlan/InspectionPlanListItem.vue b/src/components/admin/unit/inspectionPlan/InspectionPlanListItem.vue index 064733a..ab2a6fa 100644 --- a/src/components/admin/unit/inspectionPlan/InspectionPlanListItem.vue +++ b/src/components/admin/unit/inspectionPlan/InspectionPlanListItem.vue @@ -4,7 +4,7 @@ class="flex flex-col h-fit w-full border border-primary rounded-md" >
-

{{ inspectionPlan.title }} - {{ inspectionPlan.equipmentType.type }}

+

{{ inspectionPlan.title }} - {{ inspectionPlan.related.type }}

Interval: {{ inspectionPlan.inspectionInterval }}

diff --git a/src/demodata/damageReport.ts b/src/demodata/damageReport.ts index 594cd2b..61f85d0 100644 --- a/src/demodata/damageReport.ts +++ b/src/demodata/damageReport.ts @@ -9,5 +9,20 @@ export const damageReportDemoData: Array = [ done: false, description: "knjgljna g", providedImage: undefined, + relatedId: "abc", + related: { + id: "abc", + code: "0456984224498", + name: "B-Schlauch", + location: "HLF", + equipmentTypeId: "xyz", + equipmentType: { + id: "xyz", + type: "B-Schlauch", + description: "Shläuche vom Typ B", + inspectionPlans: [], + }, + inspections: [], + }, }, ]; diff --git a/src/demodata/inspectionPlan.ts b/src/demodata/inspectionPlan.ts index add956a..b80f96e 100644 --- a/src/demodata/inspectionPlan.ts +++ b/src/demodata/inspectionPlan.ts @@ -42,6 +42,13 @@ export const inspectionPlanDemoData: Array = [ remindTime: "1-m", created: new Date(), inspectionPoints: [inspectionPointDemoData[0], inspectionPointDemoData[1], inspectionPointDemoData[2]], + relatedId: "xyz", + related: { + id: "xyz", + type: "B-Schlauch", + description: "Shläuche vom Typ B", + inspectionPlans: [], + }, }, { id: "cba", @@ -51,6 +58,13 @@ export const inspectionPlanDemoData: Array = [ remindTime: "22/10", created: new Date(), inspectionPoints: [inspectionPointDemoData[3]], + relatedId: "xyz", + related: { + id: "xyz", + type: "B-Schlauch", + description: "Shläuche vom Typ B", + inspectionPlans: [], + }, }, ]; @@ -94,6 +108,21 @@ export const inspectionDemoData: Array = [ nextInspection: undefined, isOpen: true, checks: [inspectionPointResultDemoData[0], inspectionPointResultDemoData[1], inspectionPointResultDemoData[2]], + relatedId: "abc", + related: { + id: "abc", + code: "0456984224498", + name: "B-Schlauch", + location: "HLF", + equipmentTypeId: "xyz", + equipmentType: { + id: "xyz", + type: "B-Schlauch", + description: "Shläuche vom Typ B", + inspectionPlans: [], + }, + inspections: [], + }, }, { id: "jkvshdfg", @@ -107,5 +136,20 @@ export const inspectionDemoData: Array = [ nextInspection: new Date(), isOpen: false, checks: [inspectionPointResultDemoData[0], inspectionPointResultDemoData[1], inspectionPointResultDemoData[2]], + relatedId: "abc", + related: { + id: "abc", + code: "0456984224498", + name: "B-Schlauch", + location: "HLF", + equipmentTypeId: "xyz", + equipmentType: { + id: "xyz", + type: "B-Schlauch", + description: "Shläuche vom Typ B", + inspectionPlans: [], + }, + inspections: [], + }, }, ]; diff --git a/src/demodata/vehicle.ts b/src/demodata/vehicle.ts index 3c027e6..11ce9e8 100644 --- a/src/demodata/vehicle.ts +++ b/src/demodata/vehicle.ts @@ -7,16 +7,16 @@ export const vehicleDemoData: Array = [ code: "", name: "HLF", location: "Tor 1", - vehicleTypeId: "xyz", + vehicleTypeId: vehicleTypeDemoData[0].id, vehicleType: vehicleTypeDemoData[0], inspections: [], }, { - id: "kjhb", + id: "kjhdfgb", code: "", name: "LF", location: "Tor 2", - vehicleTypeId: "abc", + vehicleTypeId: vehicleTypeDemoData[1].id, vehicleType: vehicleTypeDemoData[1], inspections: [], }, diff --git a/src/demodata/vehicleType.ts b/src/demodata/vehicleType.ts index 03b49aa..bf25718 100644 --- a/src/demodata/vehicleType.ts +++ b/src/demodata/vehicleType.ts @@ -2,7 +2,7 @@ import type { VehicleTypeViewModel } from "@/viewmodels/admin/unit/vehicleType/v export const vehicleTypeDemoData: Array = [ { - id: "xyz", + id: "xyfgdghfz", type: "HLF 20/10", description: "HLF", inspectionPlans: [], diff --git a/src/demodata/wearable.ts b/src/demodata/wearable.ts index e8b5df7..1f483c2 100644 --- a/src/demodata/wearable.ts +++ b/src/demodata/wearable.ts @@ -3,7 +3,7 @@ import { wearableTypeDemoData } from "./wearableType"; export const wearableDemoData: Array = [ { - id: "abc", + id: "absdfgc", code: "0456984224498", name: "Jacke", location: "Spint", diff --git a/src/router/index.ts b/src/router/index.ts index 6bf0f8a..ee86a7b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -484,10 +484,16 @@ const router = createRouter({ component: () => import("@/views/admin/unit/wearable/Overview.vue"), props: true, }, + { + path: "maintenance", + name: "admin-unit-wearable-maintenance", + component: () => import("@/views/admin/ViewSelect.vue"), + props: true, + }, { path: "report", name: "admin-unit-wearable-damage_report", - component: () => import("@/views/admin/ViewSelect.vue"), + component: () => import("@/views/admin/unit/wearable/DamageReport.vue"), props: true, }, { diff --git a/src/stores/admin/unit/equipment/damageReport.ts b/src/stores/admin/unit/equipment/damageReport.ts index 0397298..5b757d3 100644 --- a/src/stores/admin/unit/equipment/damageReport.ts +++ b/src/stores/admin/unit/equipment/damageReport.ts @@ -15,7 +15,9 @@ export const useEquipmentDamageReportStore = defineStore("equipmentDamageReport" actions: { fetchDamageReportForEquipment(offset = 0, count = 25, search = "", clear = false) { const equipmentId = useEquipmentStore().activeEquipment; - this.damageReports = damageReportDemoData.map((e, i) => ({ ...e, tab_pos: i })); + this.damageReports = damageReportDemoData + .filter((drdd) => drdd.relatedId == equipmentId) + .map((e, i) => ({ ...e, tab_pos: i })); this.totalCount = this.damageReports.length; this.loading = "fetched"; return; @@ -23,11 +25,11 @@ export const useEquipmentDamageReportStore = defineStore("equipmentDamageReport" this.loading = "loading"; http .get( - `/admin/equipment/${equipmentId}/inspection?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}` + `/admin/equipment/${equipmentId}/damageReport?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}` ) .then((result) => { this.totalCount = result.data.total; - result.data.inspections + result.data.reports .filter((elem: DamageReportViewModel) => this.damageReports.findIndex((m) => m.id == elem.id) == -1) .map((elem: DamageReportViewModel, index: number): DamageReportViewModel & { tab_pos: number } => { return { diff --git a/src/stores/admin/unit/equipment/inspection.ts b/src/stores/admin/unit/equipment/inspection.ts index 6047d52..90b0b7f 100644 --- a/src/stores/admin/unit/equipment/inspection.ts +++ b/src/stores/admin/unit/equipment/inspection.ts @@ -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; diff --git a/src/stores/admin/unit/equipmentType/inspectionPlan.ts b/src/stores/admin/unit/equipmentType/inspectionPlan.ts index 00c4730..c412056 100644 --- a/src/stores/admin/unit/equipmentType/inspectionPlan.ts +++ b/src/stores/admin/unit/equipmentType/inspectionPlan.ts @@ -21,9 +21,7 @@ export const useEquipmentTypeInspectionPlanStore = defineStore("equipmentTypeIns actions: { fetchInspectionPlanForEquipmentType() { const equipmentTypeId = useEquipmentTypeStore().activeEquipmentType; - this.inspectionPlans = inspectionPlanDemoData.filter( - (ipdd) => ipdd.typeId == equipmentTypeId && ipdd.assigned == "equipment" - ); + this.inspectionPlans = inspectionPlanDemoData.filter((ipdd) => ipdd.relatedId == equipmentTypeId); this.loading = "fetched"; return; this.loading = "loading"; diff --git a/src/stores/admin/unit/inspectionPlan/inspectionPlan.ts b/src/stores/admin/unit/inspectionPlan/inspectionPlan.ts index dd5b04c..02ab39d 100644 --- a/src/stores/admin/unit/inspectionPlan/inspectionPlan.ts +++ b/src/stores/admin/unit/inspectionPlan/inspectionPlan.ts @@ -71,7 +71,7 @@ export const useInspectionPlanStore = defineStore("inspectionPlan", { this.activeInspectionPlanObj = inspectionPlanDemoData.find( (e) => e.id == this.activeInspectionPlan ) as InspectionPlanViewModel; - this.loading = "fetched"; + this.loadingActive = "fetched"; return; this.loadingActive = "loading"; http diff --git a/src/stores/admin/unit/vehicle/damageReport.ts b/src/stores/admin/unit/vehicle/damageReport.ts index 606329f..7774732 100644 --- a/src/stores/admin/unit/vehicle/damageReport.ts +++ b/src/stores/admin/unit/vehicle/damageReport.ts @@ -15,7 +15,9 @@ export const useVehicleDamageReportStore = defineStore("vehicleDamageReport", { actions: { fetchDamageReportForVehicle(offset = 0, count = 25, search = "", clear = false) { const vehicleId = useVehicleStore().activeVehicle; - this.damageReports = damageReportDemoData.map((e, i) => ({ ...e, tab_pos: i })); + this.damageReports = damageReportDemoData + .filter((drdd) => drdd.relatedId == vehicleId) + .map((e, i) => ({ ...e, tab_pos: i })); this.totalCount = this.damageReports.length; this.loading = "fetched"; return; @@ -23,11 +25,11 @@ export const useVehicleDamageReportStore = defineStore("vehicleDamageReport", { this.loading = "loading"; http .get( - `/admin/vehicle/${vehicleId}/inspection?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}` + `/admin/vehicle/${vehicleId}/damageReport?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}` ) .then((result) => { this.totalCount = result.data.total; - result.data.inspections + result.data.reports .filter((elem: DamageReportViewModel) => this.damageReports.findIndex((m) => m.id == elem.id) == -1) .map((elem: DamageReportViewModel, index: number): DamageReportViewModel & { tab_pos: number } => { return { diff --git a/src/stores/admin/unit/vehicle/inspection.ts b/src/stores/admin/unit/vehicle/inspection.ts index e1c3751..6077241 100644 --- a/src/stores/admin/unit/vehicle/inspection.ts +++ b/src/stores/admin/unit/vehicle/inspection.ts @@ -15,7 +15,9 @@ export const useVehicleInspectionStore = defineStore("vehicleInspection", { actions: { fetchInspectionForVehicle(offset = 0, count = 25, search = "", clear = false) { const vehicleId = useVehicleStore().activeVehicle; - this.inspections = inspectionDemoData.map((e, i) => ({ ...e, tab_pos: i })); + this.inspections = inspectionDemoData + .filter((idd) => idd.relatedId == vehicleId) + .map((e, i) => ({ ...e, tab_pos: i })); this.totalCount = this.inspections.length; this.loading = "fetched"; return; diff --git a/src/stores/admin/unit/vehicleType/inspectionPlan.ts b/src/stores/admin/unit/vehicleType/inspectionPlan.ts index c7ef307..9b6aa27 100644 --- a/src/stores/admin/unit/vehicleType/inspectionPlan.ts +++ b/src/stores/admin/unit/vehicleType/inspectionPlan.ts @@ -22,9 +22,7 @@ export const useVehicleTypeInspectionPlanStore = defineStore("vehicleTypeInspect actions: { fetchInspectionPlanForVehicleType() { const vehicleTypeId = useVehicleTypeStore().activeVehicleType; - this.inspectionPlans = inspectionPlanDemoData.filter( - (ipdd) => ipdd.typeId == vehicleTypeId && ipdd.assigned == "vehicle" - ); + this.inspectionPlans = inspectionPlanDemoData.filter((ipdd) => ipdd.relatedId == vehicleTypeId); this.loading = "fetched"; return; this.loading = "loading"; diff --git a/src/stores/admin/unit/wearable/damageReport.ts b/src/stores/admin/unit/wearable/damageReport.ts new file mode 100644 index 0000000..c4d067c --- /dev/null +++ b/src/stores/admin/unit/wearable/damageReport.ts @@ -0,0 +1,50 @@ +import { defineStore } from "pinia"; +import { http } from "@/serverCom"; +import { useWearableStore } from "./wearable"; +import type { DamageReportViewModel } from "@/viewmodels/admin/unit/damageReport/damageReport.models"; +import { damageReportDemoData } from "@/demodata/damageReport"; + +export const useWearableDamageReportStore = defineStore("wearableDamageReport", { + state: () => { + return { + damageReports: [] as Array, + totalCount: 0 as number, + loading: "loading" as "loading" | "fetched" | "failed", + }; + }, + actions: { + fetchDamageReportForWearable(offset = 0, count = 25, search = "", clear = false) { + const wearableId = useWearableStore().activeWearable; + this.damageReports = damageReportDemoData + .filter((drdd) => drdd.relatedId == wearableId) + .map((e, i) => ({ ...e, tab_pos: i })); + this.totalCount = this.damageReports.length; + this.loading = "fetched"; + return; + if (clear) this.damageReports = []; + this.loading = "loading"; + http + .get( + `/admin/wearable/${wearableId}/damageReport?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}` + ) + .then((result) => { + this.totalCount = result.data.total; + result.data.reports + .filter((elem: DamageReportViewModel) => this.damageReports.findIndex((m) => m.id == elem.id) == -1) + .map((elem: DamageReportViewModel, index: number): DamageReportViewModel & { tab_pos: number } => { + return { + ...elem, + tab_pos: index + offset, + }; + }) + .forEach((elem: DamageReportViewModel & { tab_pos: number }) => { + this.damageReports.push(elem); + }); + this.loading = "fetched"; + }) + .catch((err) => { + this.loading = "failed"; + }); + }, + }, +}); diff --git a/src/viewmodels/admin/unit/damageReport/damageReport.models.ts b/src/viewmodels/admin/unit/damageReport/damageReport.models.ts index db8ce18..839bd39 100644 --- a/src/viewmodels/admin/unit/damageReport/damageReport.models.ts +++ b/src/viewmodels/admin/unit/damageReport/damageReport.models.ts @@ -1,3 +1,7 @@ +import type { EquipmentViewModel } from "../equipment/equipment.models"; +import type { VehicleViewModel } from "../vehicle/vehicle.models"; +import type { WearableViewModel } from "../wearable/wearable.models"; + export interface DamageReportViewModel { id: string; reported: Date; @@ -5,6 +9,8 @@ export interface DamageReportViewModel { done: boolean; description: string; providedImage?: string; + relatedId: string; + related: EquipmentViewModel | VehicleViewModel | WearableViewModel; } export interface CreateDamageReportViewModel { diff --git a/src/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models.ts b/src/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models.ts index 7525f8b..22c4e0d 100644 --- a/src/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models.ts +++ b/src/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models.ts @@ -1,3 +1,8 @@ +import type { EquipmentViewModel } from "../equipment/equipment.models"; +import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models"; +import type { VehicleViewModel } from "../vehicle/vehicle.models"; +import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models"; + export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`; export interface InspectionPlanViewModel { @@ -8,6 +13,8 @@ export interface InspectionPlanViewModel { version: number; created: Date; inspectionPoints: InspectionPointViewModel[]; + relatedId: string; + related: EquipmentTypeViewModel | VehicleTypeViewModel; } export interface InspectionVersionedPlanViewModel { @@ -21,7 +28,7 @@ export interface CreateInspectionPlanViewModel { title: string; inspectionInterval: PlanTimeDefinition; remindTime: PlanTimeDefinition; - typeId: string; + relatedId: string; assigned: "vehicle" | "equipment"; } @@ -51,6 +58,8 @@ export interface InspectionViewModel { isOpen: boolean; nextInspection?: Date; checks: Array; + relatedId: string; + related: EquipmentViewModel | VehicleViewModel; } export interface InspectionPointResultViewModel { diff --git a/src/viewmodels/admin/unit/respiratoryWearer/respiratoryWearer.models.ts b/src/viewmodels/admin/unit/respiratoryWearer/respiratoryWearer.models.ts index a47d0f8..eca9194 100644 --- a/src/viewmodels/admin/unit/respiratoryWearer/respiratoryWearer.models.ts +++ b/src/viewmodels/admin/unit/respiratoryWearer/respiratoryWearer.models.ts @@ -1,4 +1,4 @@ -import type { MemberViewModel } from "@/club/member/member.models"; +import type { MemberViewModel } from "@/viewmodels/admin/club/member/member.models"; export interface RespiratoryWearerViewModel { id: string; diff --git a/src/viewmodels/admin/unit/wearable/wearable.models.ts b/src/viewmodels/admin/unit/wearable/wearable.models.ts index 70a92ab..379c6e1 100644 --- a/src/viewmodels/admin/unit/wearable/wearable.models.ts +++ b/src/viewmodels/admin/unit/wearable/wearable.models.ts @@ -1,4 +1,4 @@ -import type { MemberViewModel } from "@/club/member/member.models"; +import type { MemberViewModel } from "@/viewmodels/admin/club/member/member.models"; import type { WearableTypeViewModel } from "../wearableType/wearableType.models"; export interface WearableViewModel { diff --git a/src/views/admin/unit/equipment/EquipmentRouting.vue b/src/views/admin/unit/equipment/EquipmentRouting.vue index 21ee805..5777c27 100644 --- a/src/views/admin/unit/equipment/EquipmentRouting.vue +++ b/src/views/admin/unit/equipment/EquipmentRouting.vue @@ -61,7 +61,7 @@ export default defineComponent({ return { tabs: [ { route: "admin-unit-equipment-overview", title: "Übersicht" }, - { route: "admin-unit-equipment-maintenance", title: "Wartungen" }, + { route: "admin-unit-equipment-maintenance", title: "Wartungen/Reparaturen" }, { route: "admin-unit-equipment-inspection", title: "Prüfungen" }, { route: "admin-unit-equipment-damage_report", title: "Schadensmeldungen" }, ], diff --git a/src/views/admin/unit/equipmentType/InspectionPlans.vue b/src/views/admin/unit/equipmentType/InspectionPlans.vue index bb089dd..924055a 100644 --- a/src/views/admin/unit/equipmentType/InspectionPlans.vue +++ b/src/views/admin/unit/equipmentType/InspectionPlans.vue @@ -7,7 +7,15 @@

↺ laden fehlgeschlagen

- + + Prüfplan erstellen +
diff --git a/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue b/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue index ffffa11..00c0904 100644 --- a/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue +++ b/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue @@ -31,7 +31,7 @@ - +
@@ -114,22 +114,32 @@ export default defineComponent({ status: null as null | "loading" | { status: "success" | "failed"; reason?: string }, timeout: null as any, selectedType: "" as string, - active: "gear" as string, + active: "equipment" as "equipment" | "vehicle", tabs: [ { - key: "gear", + key: "equipment", title: "Gerät", }, { key: "vehicle", title: "Fahrzeug", }, - ], + ] as Array<{ key: "equipment" | "vehicle"; title: string }>, }; }, computed: { ...mapState(useInspectionPlanStore, ["inspectionPlans"]), }, + mounted() { + let query = this.$route.query; + const queryType = Array.isArray(query.type) ? query.type[0] : query.type; + const queryId = Array.isArray(query.id) ? query.id[0] : query.id; + if (["vehicle", "equipment"].includes(queryType ?? "")) { + this.active = queryType as "equipment" | "vehicle"; + this.selectedType = queryId as string; + } + console.log(query); + }, beforeUnmount() { try { clearTimeout(this.timeout); @@ -143,9 +153,10 @@ export default defineComponent({ let formData = e.target.elements; let createInspectionPlan: CreateInspectionPlanViewModel = { title: formData.name.value, - equipmentTypeId: "", inspectionInterval: formData.name.value, remindTime: formData.name.value, + relatedId: this.selectedType, + assigned: this.active, }; this.status = "loading"; this.createInspectionPlan(createInspectionPlan) diff --git a/src/views/admin/unit/inspectionPlan/Overview.vue b/src/views/admin/unit/inspectionPlan/Overview.vue index 0c6cd23..361a11c 100644 --- a/src/views/admin/unit/inspectionPlan/Overview.vue +++ b/src/views/admin/unit/inspectionPlan/Overview.vue @@ -1,16 +1,17 @@ diff --git a/src/views/admin/unit/wearable/DamageReport.vue b/src/views/admin/unit/wearable/DamageReport.vue new file mode 100644 index 0000000..eb35ef2 --- /dev/null +++ b/src/views/admin/unit/wearable/DamageReport.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/src/views/admin/unit/wearable/WearableRouting.vue b/src/views/admin/unit/wearable/WearableRouting.vue index eed7402..4845ae7 100644 --- a/src/views/admin/unit/wearable/WearableRouting.vue +++ b/src/views/admin/unit/wearable/WearableRouting.vue @@ -61,6 +61,7 @@ export default defineComponent({ return { tabs: [ { route: "admin-unit-wearable-overview", title: "Übersicht" }, + { route: "admin-unit-wearable-maintenance", title: "Reparaturen" }, { route: "admin-unit-wearable-damage_report", title: "Schadensmeldungen" }, ], };