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