extend wearable and enable maintenance

This commit is contained in:
Julian Krauser 2025-06-13 11:31:34 +02:00
parent aeb1ccbc42
commit b8b2186c58
20 changed files with 457 additions and 93 deletions

View file

@ -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;