adapt viewmodel changes
This commit is contained in:
parent
30baca2567
commit
98fd7b64d2
9 changed files with 28 additions and 19 deletions
|
@ -24,8 +24,8 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent, type PropType } from "vue";
|
||||
import { RadioGroup, RadioGroupLabel, RadioGroupOption } from "@headlessui/vue";
|
||||
import type { InspectionPointViewModel } from "@/viewmodels/admin/unit/inspection/inspection.models";
|
||||
import { RadioGroup, RadioGroupOption } from "@headlessui/vue";
|
||||
import type { InspectionPointViewModel } from "@/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent, type PropType } from "vue";
|
||||
import type { InspectionPointViewModel } from "@/viewmodels/admin/unit/inspection/inspection.models";
|
||||
import type { InspectionPointViewModel } from "@/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -137,6 +137,7 @@ export default defineComponent({
|
|||
name: "",
|
||||
location: "",
|
||||
equipmentTypeId: "",
|
||||
commissioned: new Date(),
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createEquipment(createEquipment)
|
||||
|
|
|
@ -137,6 +137,7 @@ export default defineComponent({
|
|||
name: "",
|
||||
location: "",
|
||||
equipmentTypeId: "",
|
||||
commissioned: new Date(),
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createEquipment(createEquipment)
|
||||
|
|
|
@ -137,6 +137,7 @@ export default defineComponent({
|
|||
name: "",
|
||||
location: "",
|
||||
equipmentTypeId: "",
|
||||
commissioned: new Date(),
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createEquipment(createEquipment)
|
||||
|
|
|
@ -8,13 +8,14 @@ export const damageReportDemoData: Array<DamageReportViewModel> = [
|
|||
status: "in Arbeit",
|
||||
done: false,
|
||||
description: "knjgljna g",
|
||||
providedImage: undefined,
|
||||
providedImage: [],
|
||||
relatedId: "abc",
|
||||
related: {
|
||||
id: "abc",
|
||||
code: "0456984224498",
|
||||
name: "B-Schlauch",
|
||||
location: "HLF",
|
||||
commissioned: new Date(),
|
||||
equipmentTypeId: "xyz",
|
||||
equipmentType: {
|
||||
id: "xyz",
|
||||
|
@ -24,5 +25,6 @@ export const damageReportDemoData: Array<DamageReportViewModel> = [
|
|||
},
|
||||
inspections: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import type { InspectionPlanViewModel } from "@/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models";
|
||||
import type {
|
||||
InspectionPlanViewModel,
|
||||
InspectionPointViewModel,
|
||||
} from "@/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models";
|
||||
import type {
|
||||
InspectionPointResultViewModel,
|
||||
InspectionViewModel,
|
||||
} from "@/viewmodels/admin/unit/inspection/inspection.models";
|
||||
|
@ -48,6 +50,7 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
|||
description: "Shläuche vom Typ B",
|
||||
inspectionPlans: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
{
|
||||
id: "cba",
|
||||
|
@ -64,6 +67,7 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
|||
description: "Shläuche vom Typ B",
|
||||
inspectionPlans: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -107,6 +111,7 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
code: "0456984224498",
|
||||
name: "B-Schlauch",
|
||||
location: "HLF",
|
||||
commissioned: new Date(),
|
||||
equipmentTypeId: "xyz",
|
||||
equipmentType: {
|
||||
id: "xyz",
|
||||
|
@ -116,6 +121,7 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
},
|
||||
inspections: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
{
|
||||
id: "jkvshdfg",
|
||||
|
@ -135,6 +141,7 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
code: "0456984224498",
|
||||
name: "B-Schlauch",
|
||||
location: "HLF",
|
||||
commissioned: new Date(),
|
||||
equipmentTypeId: "xyz",
|
||||
equipmentType: {
|
||||
id: "xyz",
|
||||
|
@ -144,5 +151,6 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
},
|
||||
inspections: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
];
|
||||
|
|
|
@ -29,14 +29,6 @@ export type InspectionViewModel = {
|
|||
}
|
||||
);
|
||||
|
||||
export interface InspectionPointViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
type: "iO-niO" | "text" | "number";
|
||||
min?: number;
|
||||
}
|
||||
|
||||
export interface InspectionPointResultViewModel {
|
||||
inspectionId: string;
|
||||
inspectionVersionedPlanId: string;
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import type { EquipmentViewModel } from "../equipment/equipment.models";
|
||||
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
|
||||
import type { InspectionPointViewModel } from "../inspection/inspection.models";
|
||||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
||||
|
||||
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
||||
|
@ -15,15 +12,14 @@ export type InspectionPlanViewModel = {
|
|||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
relatedId: string;
|
||||
related: EquipmentTypeViewModel | VehicleTypeViewModel;
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
related: EquipmentTypeViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
related: VehicleTypeViewModel;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -34,6 +30,14 @@ export interface InspectionVersionedPlanViewModel {
|
|||
inspectionPoints: InspectionPointViewModel[];
|
||||
}
|
||||
|
||||
export interface InspectionPointViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
type: "iO-niO" | "text" | "number";
|
||||
min?: number;
|
||||
}
|
||||
|
||||
export interface CreateInspectionPlanViewModel {
|
||||
title: string;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
|
|
Loading…
Add table
Reference in a new issue