Compare commits
No commits in common. "98fd7b64d21e8697062ca44865ec04ee0f73474c" and "d70edd0086e951c0b9fc546104675fd3a57c3fd6" have entirely different histories.
98fd7b64d2
...
d70edd0086
10 changed files with 26 additions and 64 deletions
|
@ -24,8 +24,8 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent, type PropType } from "vue";
|
||||
import { RadioGroup, RadioGroupOption } from "@headlessui/vue";
|
||||
import type { InspectionPointViewModel } from "@/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models";
|
||||
import { RadioGroup, RadioGroupLabel, RadioGroupOption } from "@headlessui/vue";
|
||||
import type { InspectionPointViewModel } from "@/viewmodels/admin/unit/inspection/inspection.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/inspectionPlan/inspectionPlan.models";
|
||||
import type { InspectionPointViewModel } from "@/viewmodels/admin/unit/inspection/inspection.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -137,7 +137,6 @@ export default defineComponent({
|
|||
name: "",
|
||||
location: "",
|
||||
equipmentTypeId: "",
|
||||
commissioned: new Date(),
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createEquipment(createEquipment)
|
||||
|
|
|
@ -137,7 +137,6 @@ export default defineComponent({
|
|||
name: "",
|
||||
location: "",
|
||||
equipmentTypeId: "",
|
||||
commissioned: new Date(),
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createEquipment(createEquipment)
|
||||
|
|
|
@ -137,7 +137,6 @@ export default defineComponent({
|
|||
name: "",
|
||||
location: "",
|
||||
equipmentTypeId: "",
|
||||
commissioned: new Date(),
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createEquipment(createEquipment)
|
||||
|
|
|
@ -8,14 +8,13 @@ export const damageReportDemoData: Array<DamageReportViewModel> = [
|
|||
status: "in Arbeit",
|
||||
done: false,
|
||||
description: "knjgljna g",
|
||||
providedImage: [],
|
||||
providedImage: undefined,
|
||||
relatedId: "abc",
|
||||
related: {
|
||||
id: "abc",
|
||||
code: "0456984224498",
|
||||
name: "B-Schlauch",
|
||||
location: "HLF",
|
||||
commissioned: new Date(),
|
||||
equipmentTypeId: "xyz",
|
||||
equipmentType: {
|
||||
id: "xyz",
|
||||
|
@ -25,6 +24,5 @@ export const damageReportDemoData: Array<DamageReportViewModel> = [
|
|||
},
|
||||
inspections: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
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";
|
||||
|
@ -50,7 +48,6 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
|||
description: "Shläuche vom Typ B",
|
||||
inspectionPlans: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
{
|
||||
id: "cba",
|
||||
|
@ -67,7 +64,6 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
|||
description: "Shläuche vom Typ B",
|
||||
inspectionPlans: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -111,7 +107,6 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
code: "0456984224498",
|
||||
name: "B-Schlauch",
|
||||
location: "HLF",
|
||||
commissioned: new Date(),
|
||||
equipmentTypeId: "xyz",
|
||||
equipmentType: {
|
||||
id: "xyz",
|
||||
|
@ -121,7 +116,6 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
},
|
||||
inspections: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
{
|
||||
id: "jkvshdfg",
|
||||
|
@ -141,7 +135,6 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
code: "0456984224498",
|
||||
name: "B-Schlauch",
|
||||
location: "HLF",
|
||||
commissioned: new Date(),
|
||||
equipmentTypeId: "xyz",
|
||||
equipmentType: {
|
||||
id: "xyz",
|
||||
|
@ -151,6 +144,5 @@ export const inspectionDemoData: Array<InspectionViewModel> = [
|
|||
},
|
||||
inspections: [],
|
||||
},
|
||||
assigned: "equipment",
|
||||
},
|
||||
];
|
||||
|
|
|
@ -2,28 +2,16 @@ import type { EquipmentViewModel } from "../equipment/equipment.models";
|
|||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||
import type { WearableViewModel } from "../wearable/wearable.models";
|
||||
|
||||
export type DamageReportViewModel = {
|
||||
export interface DamageReportViewModel {
|
||||
id: string;
|
||||
reported: Date;
|
||||
status: string;
|
||||
done: boolean;
|
||||
description: string;
|
||||
providedImage: Array<string>;
|
||||
providedImage?: string;
|
||||
relatedId: string;
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "wearable";
|
||||
related: WearableViewModel;
|
||||
}
|
||||
);
|
||||
related: EquipmentViewModel | VehicleViewModel | WearableViewModel;
|
||||
}
|
||||
|
||||
export interface CreateDamageReportViewModel {
|
||||
description: string;
|
||||
|
|
|
@ -5,7 +5,7 @@ import type {
|
|||
} from "../inspectionPlan/inspectionPlan.models";
|
||||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||
|
||||
export type InspectionViewModel = {
|
||||
export interface InspectionViewModel {
|
||||
id: string;
|
||||
inspectionPlanId: string;
|
||||
inspectionPlan: InspectionPlanViewModel;
|
||||
|
@ -18,16 +18,16 @@ export type InspectionViewModel = {
|
|||
nextInspection?: Date;
|
||||
checks: Array<InspectionPointResultViewModel>;
|
||||
relatedId: string;
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
}
|
||||
);
|
||||
related: EquipmentViewModel | VehicleViewModel;
|
||||
}
|
||||
|
||||
export interface InspectionPointViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
type: "iO-niO" | "text" | "number";
|
||||
min?: number;
|
||||
}
|
||||
|
||||
export interface InspectionPointResultViewModel {
|
||||
inspectionId: string;
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
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 | "*"}`;
|
||||
|
||||
export type InspectionPlanViewModel = {
|
||||
export interface InspectionPlanViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
|
@ -12,16 +15,8 @@ export type InspectionPlanViewModel = {
|
|||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
relatedId: string;
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentTypeViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleTypeViewModel;
|
||||
}
|
||||
);
|
||||
related: EquipmentTypeViewModel | VehicleTypeViewModel;
|
||||
}
|
||||
|
||||
export interface InspectionVersionedPlanViewModel {
|
||||
id: string;
|
||||
|
@ -30,14 +25,6 @@ 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