update inspection schema
This commit is contained in:
parent
05555425ce
commit
8766bbce08
10 changed files with 126 additions and 50 deletions
|
@ -2,11 +2,11 @@
|
|||
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
|
||||
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
||||
<p>
|
||||
{{ damageReport.affectedEquipment.name }}
|
||||
{{ damageReport.affected.name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<p v-if="damageReport.affectedEquipment">Code: {{ damageReport.affectedEquipment.code }}</p>
|
||||
<p v-if="damageReport.affected">Code: {{ damageReport.affected.code }}</p>
|
||||
<p v-if="damageReport.description">Beschreibung: {{ damageReport.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,8 @@ export const damageReportDemoData: Array<DamageReportViewModel> = [
|
|||
status: "",
|
||||
done: false,
|
||||
description: "knjgljna g",
|
||||
affectedEquipmentId: equipmentDemoData[0].id,
|
||||
affectedEquipment: equipmentDemoData[0],
|
||||
providedImage: undefined,
|
||||
affectedId: equipmentDemoData[0].id,
|
||||
affected: equipmentDemoData[0],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import type { EquipmentViewModel } from "../viewmodels/admin/unit/equipment/equipment.models";
|
||||
import { equipmentTypeDemoData } from "./equipmentType";
|
||||
import { inspectionDemoData } from "./inspectionPlan";
|
||||
|
||||
export const equipmentDemoData: Array<EquipmentViewModel> = [
|
||||
{
|
||||
|
@ -9,5 +10,6 @@ export const equipmentDemoData: Array<EquipmentViewModel> = [
|
|||
location: "HLF",
|
||||
equipmentTypeId: equipmentTypeDemoData[0].id,
|
||||
equipmentType: equipmentTypeDemoData[0],
|
||||
inspections: [inspectionDemoData[0]],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import type { EquipmentTypeViewModel } from "../viewmodels/admin/unit/equipmentType/equipmentType.models";
|
||||
import { inspectionPlanDemoData } from "./inspectionPlan";
|
||||
|
||||
export const equipmentTypeDemoData: Array<EquipmentTypeViewModel> = [
|
||||
{
|
||||
id: "xyz",
|
||||
type: "B-Schlauch",
|
||||
description: "Shläuche vom Typ B",
|
||||
inspectionPlans: [inspectionPlanDemoData[0], inspectionPlanDemoData[1]],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,6 +1,38 @@
|
|||
import type { InspectionPlanViewModel } from "../viewmodels/admin/unit/inspectionPlan/inspectionPlan.models";
|
||||
import type {
|
||||
InspectionPlanViewModel,
|
||||
InspectionPointResultViewMoel,
|
||||
InspectionPointViewModel,
|
||||
InspectionViewMoel,
|
||||
} from "../viewmodels/admin/unit/inspectionPlan/inspectionPlan.models";
|
||||
import { equipmentTypeDemoData } from "./equipmentType";
|
||||
|
||||
export const inspectionPointDemoData: Array<InspectionPointViewModel> = [
|
||||
{
|
||||
id: "edf",
|
||||
title: "vorhandene Spritzstellen ausgebessert",
|
||||
description: "",
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "ghi",
|
||||
title: "Einband der Kupplung sitzt fest",
|
||||
description: "",
|
||||
type: "iO-niO",
|
||||
},
|
||||
{
|
||||
id: "lmn",
|
||||
title: "Das überstehende Drahtende des Knaggenteiles sitzt versenkt",
|
||||
description: "",
|
||||
type: "iO-niO",
|
||||
},
|
||||
{
|
||||
id: "jgj",
|
||||
title: "Gebrauchsprüfdruck 12bar",
|
||||
description: "",
|
||||
type: "iO-niO",
|
||||
},
|
||||
];
|
||||
|
||||
export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
||||
{
|
||||
id: "abc",
|
||||
|
@ -8,26 +40,8 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
|||
version: 1,
|
||||
inspectionInterval: "1-m",
|
||||
remindTime: "1-m",
|
||||
inspectionPoints: [
|
||||
{
|
||||
id: "edf",
|
||||
title: "vorhandene Spritzstellen ausgebessert",
|
||||
description: "",
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
id: "ghi",
|
||||
title: "Einband der Kupplung sitzt fest",
|
||||
description: "",
|
||||
type: "iO-niO",
|
||||
},
|
||||
{
|
||||
id: "lmn",
|
||||
title: "Das überstehende Drahtende des Knaggenteiles sitzt versenkt",
|
||||
description: "",
|
||||
type: "iO-niO",
|
||||
},
|
||||
],
|
||||
created: new Date(),
|
||||
inspectionPoints: [inspectionPointDemoData[0], inspectionPointDemoData[1], inspectionPointDemoData[2]],
|
||||
equipmentTypeId: equipmentTypeDemoData[0].id,
|
||||
equipmentType: equipmentTypeDemoData[0],
|
||||
},
|
||||
|
@ -37,15 +51,50 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
|||
version: 1,
|
||||
inspectionInterval: "1-m",
|
||||
remindTime: "22/10",
|
||||
inspectionPoints: [
|
||||
{
|
||||
id: "edf",
|
||||
title: "Gebrauchsprüfdruck 12bar",
|
||||
description: "",
|
||||
type: "iO-niO",
|
||||
},
|
||||
],
|
||||
created: new Date(),
|
||||
inspectionPoints: [inspectionPointDemoData[3]],
|
||||
equipmentTypeId: equipmentTypeDemoData[0].id,
|
||||
equipmentType: equipmentTypeDemoData[0],
|
||||
},
|
||||
];
|
||||
|
||||
export const inspectionPointResultDemoData: Array<InspectionPointResultViewMoel> = [
|
||||
{
|
||||
inspectionId: "jkvshdfg",
|
||||
inspectionVersionedPlanId: inspectionPlanDemoData[0].id,
|
||||
inspectionVersionedPlan: inspectionPlanDemoData[0],
|
||||
inspectionPointId: inspectionPointDemoData[0].id,
|
||||
inspectionPoint: inspectionPointDemoData[0],
|
||||
value: "",
|
||||
},
|
||||
{
|
||||
inspectionId: "jkvshdfg",
|
||||
inspectionVersionedPlanId: inspectionPlanDemoData[0].id,
|
||||
inspectionVersionedPlan: inspectionPlanDemoData[0],
|
||||
inspectionPointId: inspectionPointDemoData[1].id,
|
||||
inspectionPoint: inspectionPointDemoData[1],
|
||||
value: "",
|
||||
},
|
||||
{
|
||||
inspectionId: "jkvshdfg",
|
||||
inspectionVersionedPlanId: inspectionPlanDemoData[0].id,
|
||||
inspectionVersionedPlan: inspectionPlanDemoData[0],
|
||||
inspectionPointId: inspectionPointDemoData[1].id,
|
||||
inspectionPoint: inspectionPointDemoData[1],
|
||||
value: "",
|
||||
},
|
||||
];
|
||||
|
||||
export const inspectionDemoData: Array<InspectionViewMoel> = [
|
||||
{
|
||||
id: "jkvshdfg",
|
||||
inspectionVersionedPlanId: inspectionPlanDemoData[0].id,
|
||||
inspectionVersionedPlan: inspectionPlanDemoData[0],
|
||||
context: "",
|
||||
created: new Date(),
|
||||
finished: undefined,
|
||||
nextInspection: undefined,
|
||||
isOpen: true,
|
||||
checks: [inspectionPointResultDemoData[0], inspectionPointResultDemoData[1], inspectionPointResultDemoData[2]],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -8,6 +8,7 @@ export const vehicleDemoData: Array<VehicleViewModel> = [
|
|||
location: "Tor 1",
|
||||
vehicleTypeId: "xyz",
|
||||
vehicleType: vehicleTypeDemoData[0],
|
||||
inspections: [],
|
||||
},
|
||||
{
|
||||
id: "kjhb",
|
||||
|
@ -15,5 +16,6 @@ export const vehicleDemoData: Array<VehicleViewModel> = [
|
|||
location: "Tor 2",
|
||||
vehicleTypeId: "abc",
|
||||
vehicleType: vehicleTypeDemoData[1],
|
||||
inspections: [],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -5,10 +5,12 @@ export const vehicleTypeDemoData: Array<VehicleTypeViewModel> = [
|
|||
id: "xyz",
|
||||
type: "HLF 20/10",
|
||||
description: "HLF",
|
||||
inspectionPlans: [],
|
||||
},
|
||||
{
|
||||
id: "abc",
|
||||
type: "LF 8/6",
|
||||
description: "LF",
|
||||
inspectionPlans: [],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -6,14 +6,14 @@ export interface DamageReportViewModel {
|
|||
status: string;
|
||||
done: boolean;
|
||||
description: string;
|
||||
providedImage: string;
|
||||
affectedEquipmentId: string;
|
||||
affectedEquipment: EquipmentViewModel;
|
||||
providedImage?: string;
|
||||
affectedId: string;
|
||||
affected: EquipmentViewModel;
|
||||
}
|
||||
|
||||
export interface CreateDamageReportViewModel {
|
||||
description: string;
|
||||
affectedEquipmentId: string;
|
||||
affectedId: string;
|
||||
}
|
||||
|
||||
export interface UpdateDamageReportViewModel {
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
import type InspectionPlan from "../../../../views/admin/unit/inspectionPlan/InspectionPlan.vue";
|
||||
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
|
||||
|
||||
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
||||
|
||||
export interface InspectionPlanViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime: PlanTimeDefinition;
|
||||
version: number;
|
||||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
equipmentTypeId: string;
|
||||
equipmentType: EquipmentTypeViewModel;
|
||||
}
|
||||
|
||||
export interface InspectionVersionedPlanViewModel {
|
||||
id: string;
|
||||
version: number;
|
||||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
equipmentTypeId: string;
|
||||
equipmentType: EquipmentTypeViewModel;
|
||||
|
@ -14,16 +25,16 @@ export interface InspectionPlanViewModel {
|
|||
|
||||
export interface CreateInspectionPlanViewModel {
|
||||
title: string;
|
||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime: PlanTimeDefinition;
|
||||
equipmentTypeId: string;
|
||||
}
|
||||
|
||||
export interface UpdateInspectionPlanViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime?: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime?: PlanTimeDefinition;
|
||||
}
|
||||
|
||||
export interface InspectionPointViewModel {
|
||||
|
@ -35,16 +46,21 @@ export interface InspectionPointViewModel {
|
|||
|
||||
export interface InspectionViewMoel {
|
||||
id: string;
|
||||
inspectionPlanId: string;
|
||||
date: Date;
|
||||
status: "open" | "finished";
|
||||
results: Array<InspectionPointResultViewMoel>;
|
||||
inspectionVersionedPlanId: string;
|
||||
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||
context: string;
|
||||
created: Date;
|
||||
finished?: Date;
|
||||
isOpen: boolean;
|
||||
nextInspection?: Date;
|
||||
checks: Array<InspectionPointResultViewMoel>;
|
||||
}
|
||||
|
||||
export interface InspectionPointResultViewMoel {
|
||||
id: string;
|
||||
inspectionId: string;
|
||||
inspectionPlanId: string;
|
||||
inspectionVersionedPlanId: string;
|
||||
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||
inspectionPointId: string;
|
||||
inspectionPoint: InspectionPointViewModel;
|
||||
value: string;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { InspectionViewMoel } from "../inspectionPlan/inspectionPlan.models";
|
||||
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
||||
|
||||
export interface VehicleViewModel {
|
||||
|
@ -6,6 +7,7 @@ export interface VehicleViewModel {
|
|||
location: string;
|
||||
vehicleTypeId: string;
|
||||
vehicleType: VehicleTypeViewModel;
|
||||
inspections: Array<InspectionViewMoel>;
|
||||
}
|
||||
|
||||
export interface CreateVehicleViewModel {
|
||||
|
|
Loading…
Add table
Reference in a new issue