adapt viewmodel changes
This commit is contained in:
parent
30baca2567
commit
98fd7b64d2
9 changed files with 28 additions and 19 deletions
|
@ -1,7 +1,4 @@
|
|||
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 | "*"}`;
|
||||
|
@ -15,15 +12,14 @@ export type InspectionPlanViewModel = {
|
|||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
relatedId: string;
|
||||
related: EquipmentTypeViewModel | VehicleTypeViewModel;
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
related: EquipmentTypeViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
related: VehicleTypeViewModel;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -34,6 +30,14 @@ 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
Add a link
Reference in a new issue