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="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">
|
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
||||||
<p>
|
<p>
|
||||||
{{ damageReport.affectedEquipment.name }}
|
{{ damageReport.affected.name }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-2">
|
<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>
|
<p v-if="damageReport.description">Beschreibung: {{ damageReport.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,8 @@ export const damageReportDemoData: Array<DamageReportViewModel> = [
|
||||||
status: "",
|
status: "",
|
||||||
done: false,
|
done: false,
|
||||||
description: "knjgljna g",
|
description: "knjgljna g",
|
||||||
affectedEquipmentId: equipmentDemoData[0].id,
|
providedImage: undefined,
|
||||||
affectedEquipment: equipmentDemoData[0],
|
affectedId: equipmentDemoData[0].id,
|
||||||
|
affected: equipmentDemoData[0],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import type { EquipmentViewModel } from "../viewmodels/admin/unit/equipment/equipment.models";
|
import type { EquipmentViewModel } from "../viewmodels/admin/unit/equipment/equipment.models";
|
||||||
import { equipmentTypeDemoData } from "./equipmentType";
|
import { equipmentTypeDemoData } from "./equipmentType";
|
||||||
|
import { inspectionDemoData } from "./inspectionPlan";
|
||||||
|
|
||||||
export const equipmentDemoData: Array<EquipmentViewModel> = [
|
export const equipmentDemoData: Array<EquipmentViewModel> = [
|
||||||
{
|
{
|
||||||
|
@ -9,5 +10,6 @@ export const equipmentDemoData: Array<EquipmentViewModel> = [
|
||||||
location: "HLF",
|
location: "HLF",
|
||||||
equipmentTypeId: equipmentTypeDemoData[0].id,
|
equipmentTypeId: equipmentTypeDemoData[0].id,
|
||||||
equipmentType: equipmentTypeDemoData[0],
|
equipmentType: equipmentTypeDemoData[0],
|
||||||
|
inspections: [inspectionDemoData[0]],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import type { EquipmentTypeViewModel } from "../viewmodels/admin/unit/equipmentType/equipmentType.models";
|
import type { EquipmentTypeViewModel } from "../viewmodels/admin/unit/equipmentType/equipmentType.models";
|
||||||
|
import { inspectionPlanDemoData } from "./inspectionPlan";
|
||||||
|
|
||||||
export const equipmentTypeDemoData: Array<EquipmentTypeViewModel> = [
|
export const equipmentTypeDemoData: Array<EquipmentTypeViewModel> = [
|
||||||
{
|
{
|
||||||
id: "xyz",
|
id: "xyz",
|
||||||
type: "B-Schlauch",
|
type: "B-Schlauch",
|
||||||
description: "Shläuche vom Typ B",
|
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";
|
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> = [
|
export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
||||||
{
|
{
|
||||||
id: "abc",
|
id: "abc",
|
||||||
|
@ -8,26 +40,8 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
||||||
version: 1,
|
version: 1,
|
||||||
inspectionInterval: "1-m",
|
inspectionInterval: "1-m",
|
||||||
remindTime: "1-m",
|
remindTime: "1-m",
|
||||||
inspectionPoints: [
|
created: new Date(),
|
||||||
{
|
inspectionPoints: [inspectionPointDemoData[0], inspectionPointDemoData[1], inspectionPointDemoData[2]],
|
||||||
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",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
equipmentTypeId: equipmentTypeDemoData[0].id,
|
equipmentTypeId: equipmentTypeDemoData[0].id,
|
||||||
equipmentType: equipmentTypeDemoData[0],
|
equipmentType: equipmentTypeDemoData[0],
|
||||||
},
|
},
|
||||||
|
@ -37,15 +51,50 @@ export const inspectionPlanDemoData: Array<InspectionPlanViewModel> = [
|
||||||
version: 1,
|
version: 1,
|
||||||
inspectionInterval: "1-m",
|
inspectionInterval: "1-m",
|
||||||
remindTime: "22/10",
|
remindTime: "22/10",
|
||||||
inspectionPoints: [
|
created: new Date(),
|
||||||
{
|
inspectionPoints: [inspectionPointDemoData[3]],
|
||||||
id: "edf",
|
|
||||||
title: "Gebrauchsprüfdruck 12bar",
|
|
||||||
description: "",
|
|
||||||
type: "iO-niO",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
equipmentTypeId: equipmentTypeDemoData[0].id,
|
equipmentTypeId: equipmentTypeDemoData[0].id,
|
||||||
equipmentType: equipmentTypeDemoData[0],
|
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",
|
location: "Tor 1",
|
||||||
vehicleTypeId: "xyz",
|
vehicleTypeId: "xyz",
|
||||||
vehicleType: vehicleTypeDemoData[0],
|
vehicleType: vehicleTypeDemoData[0],
|
||||||
|
inspections: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "kjhb",
|
id: "kjhb",
|
||||||
|
@ -15,5 +16,6 @@ export const vehicleDemoData: Array<VehicleViewModel> = [
|
||||||
location: "Tor 2",
|
location: "Tor 2",
|
||||||
vehicleTypeId: "abc",
|
vehicleTypeId: "abc",
|
||||||
vehicleType: vehicleTypeDemoData[1],
|
vehicleType: vehicleTypeDemoData[1],
|
||||||
|
inspections: [],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,10 +5,12 @@ export const vehicleTypeDemoData: Array<VehicleTypeViewModel> = [
|
||||||
id: "xyz",
|
id: "xyz",
|
||||||
type: "HLF 20/10",
|
type: "HLF 20/10",
|
||||||
description: "HLF",
|
description: "HLF",
|
||||||
|
inspectionPlans: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "abc",
|
id: "abc",
|
||||||
type: "LF 8/6",
|
type: "LF 8/6",
|
||||||
description: "LF",
|
description: "LF",
|
||||||
|
inspectionPlans: [],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -6,14 +6,14 @@ export interface DamageReportViewModel {
|
||||||
status: string;
|
status: string;
|
||||||
done: boolean;
|
done: boolean;
|
||||||
description: string;
|
description: string;
|
||||||
providedImage: string;
|
providedImage?: string;
|
||||||
affectedEquipmentId: string;
|
affectedId: string;
|
||||||
affectedEquipment: EquipmentViewModel;
|
affected: EquipmentViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateDamageReportViewModel {
|
export interface CreateDamageReportViewModel {
|
||||||
description: string;
|
description: string;
|
||||||
affectedEquipmentId: string;
|
affectedId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateDamageReportViewModel {
|
export interface UpdateDamageReportViewModel {
|
||||||
|
|
|
@ -1,12 +1,23 @@
|
||||||
import type InspectionPlan from "../../../../views/admin/unit/inspectionPlan/InspectionPlan.vue";
|
|
||||||
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
|
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
|
||||||
|
|
||||||
|
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
||||||
|
|
||||||
export interface InspectionPlanViewModel {
|
export interface InspectionPlanViewModel {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
inspectionInterval: PlanTimeDefinition;
|
||||||
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
remindTime: PlanTimeDefinition;
|
||||||
version: number;
|
version: number;
|
||||||
|
created: Date;
|
||||||
|
inspectionPoints: InspectionPointViewModel[];
|
||||||
|
equipmentTypeId: string;
|
||||||
|
equipmentType: EquipmentTypeViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface InspectionVersionedPlanViewModel {
|
||||||
|
id: string;
|
||||||
|
version: number;
|
||||||
|
created: Date;
|
||||||
inspectionPoints: InspectionPointViewModel[];
|
inspectionPoints: InspectionPointViewModel[];
|
||||||
equipmentTypeId: string;
|
equipmentTypeId: string;
|
||||||
equipmentType: EquipmentTypeViewModel;
|
equipmentType: EquipmentTypeViewModel;
|
||||||
|
@ -14,16 +25,16 @@ export interface InspectionPlanViewModel {
|
||||||
|
|
||||||
export interface CreateInspectionPlanViewModel {
|
export interface CreateInspectionPlanViewModel {
|
||||||
title: string;
|
title: string;
|
||||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
inspectionInterval: PlanTimeDefinition;
|
||||||
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
remindTime: PlanTimeDefinition;
|
||||||
equipmentTypeId: string;
|
equipmentTypeId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateInspectionPlanViewModel {
|
export interface UpdateInspectionPlanViewModel {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
inspectionInterval: PlanTimeDefinition;
|
||||||
remindTime?: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
remindTime?: PlanTimeDefinition;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InspectionPointViewModel {
|
export interface InspectionPointViewModel {
|
||||||
|
@ -35,16 +46,21 @@ export interface InspectionPointViewModel {
|
||||||
|
|
||||||
export interface InspectionViewMoel {
|
export interface InspectionViewMoel {
|
||||||
id: string;
|
id: string;
|
||||||
inspectionPlanId: string;
|
inspectionVersionedPlanId: string;
|
||||||
date: Date;
|
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||||
status: "open" | "finished";
|
context: string;
|
||||||
results: Array<InspectionPointResultViewMoel>;
|
created: Date;
|
||||||
|
finished?: Date;
|
||||||
|
isOpen: boolean;
|
||||||
|
nextInspection?: Date;
|
||||||
|
checks: Array<InspectionPointResultViewMoel>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InspectionPointResultViewMoel {
|
export interface InspectionPointResultViewMoel {
|
||||||
id: string;
|
|
||||||
inspectionId: string;
|
inspectionId: string;
|
||||||
inspectionPlanId: string;
|
inspectionVersionedPlanId: string;
|
||||||
|
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||||
inspectionPointId: string;
|
inspectionPointId: string;
|
||||||
|
inspectionPoint: InspectionPointViewModel;
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { InspectionViewMoel } from "../inspectionPlan/inspectionPlan.models";
|
||||||
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
||||||
|
|
||||||
export interface VehicleViewModel {
|
export interface VehicleViewModel {
|
||||||
|
@ -6,6 +7,7 @@ export interface VehicleViewModel {
|
||||||
location: string;
|
location: string;
|
||||||
vehicleTypeId: string;
|
vehicleTypeId: string;
|
||||||
vehicleType: VehicleTypeViewModel;
|
vehicleType: VehicleTypeViewModel;
|
||||||
|
inspections: Array<InspectionViewMoel>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateVehicleViewModel {
|
export interface CreateVehicleViewModel {
|
||||||
|
|
Loading…
Add table
Reference in a new issue