data creation forms and centralization

This commit is contained in:
Julian Krauser 2025-04-28 12:29:44 +02:00
parent 835e6ef8db
commit 6ad2da1c16
26 changed files with 1077 additions and 348 deletions

View file

@ -3,19 +3,31 @@ import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.mode
export interface InspectionPlanViewModel {
id: string;
title: string;
inspectionInterval?: `${number}-${"d" | "m" | "y"}` | `${number}/${number}`;
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
version: number;
inspectionPoints: InspectionPointViewModel[];
equipmentTypeId: string;
equipmentType: EquipmentTypeViewModel;
}
export interface CreateInspectionPlanViewModel {
title: string;
inspectionInterval?: `${number}-${"d" | "m" | "y"}` | `${number}/${number}`;
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
equipmentTypeId: string;
}
export interface UpdateInspectionPlanViewModel {
id: string;
title: string;
inspectionInterval?: `${number}-${"d" | "m" | "y"}` | `${number}/${number}`;
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
}
export interface InspectionPointViewModel {
id: string;
title: string;
description: string;
type: "iO-niO" | "text" | "number";
}

View file

@ -1,16 +1,19 @@
export interface VehicleViewModel {
id: string;
name: string;
type: string;
location: string;
vehicleTypeId: string;
}
export interface CreateVehicleViewModel {
name: string;
type: string;
location: string;
vehicleTypeId: string;
}
export interface UpdateVehicleViewModel {
id: string;
name: string;
type: string;
location: string;
vehicleTypeId: string;
}

View file

@ -7,7 +7,7 @@ export interface WearableViewModel {
name: string;
location?: string;
wearerId?: string;
wearer: MemberViewModel;
wearer?: MemberViewModel;
wearableTypeId: string;
wearableType: WearableTypeViewModel;
}