extend wearable and enable maintenance
This commit is contained in:
parent
aeb1ccbc42
commit
b8b2186c58
20 changed files with 457 additions and 93 deletions
|
@ -5,6 +5,24 @@ import type {
|
|||
InspectionVersionedPlanViewModel,
|
||||
} from "./inspectionPlan.models";
|
||||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||
import { WearableViewModel } from "../wearable/wearable.models";
|
||||
|
||||
export type InspectionRelated = {
|
||||
relatedId: string;
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "wearable";
|
||||
related: WearableViewModel;
|
||||
}
|
||||
);
|
||||
|
||||
export type InspectionViewModel = {
|
||||
id: string;
|
||||
|
@ -18,17 +36,7 @@ export type InspectionViewModel = {
|
|||
isOpen: boolean;
|
||||
nextInspection?: Date;
|
||||
checks: Array<InspectionPointResultViewModel>;
|
||||
relatedId: string;
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
}
|
||||
);
|
||||
} & InspectionRelated;
|
||||
|
||||
export interface InspectionPointResultViewModel {
|
||||
inspectionId: string;
|
||||
|
|
|
@ -3,17 +3,11 @@ import type { EquipmentViewModel } from "../equipment/equipment.models";
|
|||
import { EquipmentTypeViewModel } from "../equipment/equipmentType.models";
|
||||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||
import { VehicleTypeViewModel } from "../vehicle/vehicleType.models";
|
||||
import { WearableTypeViewModel } from "../wearable/wearableType.models";
|
||||
|
||||
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
||||
|
||||
export type InspectionPlanViewModel = {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime: PlanTimeDefinition;
|
||||
version: number;
|
||||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
export type InspectionPlanRelated = {
|
||||
relatedId: string;
|
||||
} & (
|
||||
| {
|
||||
|
@ -24,8 +18,22 @@ export type InspectionPlanViewModel = {
|
|||
assigned: "vehicle";
|
||||
related: VehicleTypeViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "wearable";
|
||||
related: WearableTypeViewModel;
|
||||
}
|
||||
);
|
||||
|
||||
export type InspectionPlanViewModel = {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime: PlanTimeDefinition;
|
||||
version: number;
|
||||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
} & InspectionPlanRelated;
|
||||
|
||||
export interface InspectionVersionedPlanViewModel {
|
||||
id: string;
|
||||
version: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue