Compare commits
3 commits
d70edd0086
...
98fd7b64d2
Author | SHA1 | Date | |
---|---|---|---|
98fd7b64d2 | |||
30baca2567 | |||
9b2ab1923e |
10 changed files with 64 additions and 26 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",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,16 +2,28 @@ import type { EquipmentViewModel } from "../equipment/equipment.models";
|
||||||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||||
import type { WearableViewModel } from "../wearable/wearable.models";
|
import type { WearableViewModel } from "../wearable/wearable.models";
|
||||||
|
|
||||||
export interface DamageReportViewModel {
|
export type DamageReportViewModel = {
|
||||||
id: string;
|
id: string;
|
||||||
reported: Date;
|
reported: Date;
|
||||||
status: string;
|
status: string;
|
||||||
done: boolean;
|
done: boolean;
|
||||||
description: string;
|
description: string;
|
||||||
providedImage?: string;
|
providedImage: Array<string>;
|
||||||
relatedId: string;
|
relatedId: string;
|
||||||
related: EquipmentViewModel | VehicleViewModel | WearableViewModel;
|
} & (
|
||||||
|
| {
|
||||||
|
assigned: "equipment";
|
||||||
|
related: EquipmentViewModel;
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
assigned: "vehicle";
|
||||||
|
related: VehicleViewModel;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
assigned: "wearable";
|
||||||
|
related: WearableViewModel;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export interface CreateDamageReportViewModel {
|
export interface CreateDamageReportViewModel {
|
||||||
description: string;
|
description: string;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type {
|
||||||
} from "../inspectionPlan/inspectionPlan.models";
|
} from "../inspectionPlan/inspectionPlan.models";
|
||||||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||||
|
|
||||||
export interface InspectionViewModel {
|
export type InspectionViewModel = {
|
||||||
id: string;
|
id: string;
|
||||||
inspectionPlanId: string;
|
inspectionPlanId: string;
|
||||||
inspectionPlan: InspectionPlanViewModel;
|
inspectionPlan: InspectionPlanViewModel;
|
||||||
|
@ -18,16 +18,16 @@ export interface InspectionViewModel {
|
||||||
nextInspection?: Date;
|
nextInspection?: Date;
|
||||||
checks: Array<InspectionPointResultViewModel>;
|
checks: Array<InspectionPointResultViewModel>;
|
||||||
relatedId: string;
|
relatedId: string;
|
||||||
related: EquipmentViewModel | VehicleViewModel;
|
} & (
|
||||||
|
| {
|
||||||
|
assigned: "equipment";
|
||||||
|
related: EquipmentViewModel;
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
export interface InspectionPointViewModel {
|
assigned: "vehicle";
|
||||||
id: string;
|
related: VehicleViewModel;
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
type: "iO-niO" | "text" | "number";
|
|
||||||
min?: number;
|
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export interface InspectionPointResultViewModel {
|
export interface InspectionPointResultViewModel {
|
||||||
inspectionId: string;
|
inspectionId: string;
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
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 | "*"}`;
|
||||||
|
|
||||||
export interface InspectionPlanViewModel {
|
export type InspectionPlanViewModel = {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
inspectionInterval: PlanTimeDefinition;
|
inspectionInterval: PlanTimeDefinition;
|
||||||
|
@ -15,8 +12,16 @@ export interface InspectionPlanViewModel {
|
||||||
created: Date;
|
created: Date;
|
||||||
inspectionPoints: InspectionPointViewModel[];
|
inspectionPoints: InspectionPointViewModel[];
|
||||||
relatedId: string;
|
relatedId: string;
|
||||||
related: EquipmentTypeViewModel | VehicleTypeViewModel;
|
} & (
|
||||||
|
| {
|
||||||
|
assigned: "equipment";
|
||||||
|
related: EquipmentTypeViewModel;
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
assigned: "vehicle";
|
||||||
|
related: VehicleTypeViewModel;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export interface InspectionVersionedPlanViewModel {
|
export interface InspectionVersionedPlanViewModel {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -25,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