feat(types): VehicleRecord.unit_type + PlantHoursLogRecord
Adds UnitType union ("fuel" | "plant"), the new field on VehicleRecord,
the new PlantHoursLogRecord, and "plant_hours" to BatchType.
This commit is contained in:
parent
207a13244e
commit
272e23b925
1 changed files with 34 additions and 1 deletions
|
|
@ -34,6 +34,8 @@ export interface EmployeeRecord extends RecordModel {
|
|||
expand?: { site?: SiteRecord };
|
||||
}
|
||||
|
||||
export type UnitType = "fuel" | "plant";
|
||||
|
||||
export interface VehicleRecord extends RecordModel {
|
||||
collectionName: "vehicles";
|
||||
project_code: string;
|
||||
|
|
@ -43,6 +45,7 @@ export interface VehicleRecord extends RecordModel {
|
|||
fuel_limits: string;
|
||||
qr_code_id: string;
|
||||
cost_per_hour: number;
|
||||
unit_type: UnitType;
|
||||
expand?: { site?: SiteRecord };
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +68,8 @@ export type BatchType =
|
|||
| "timesheets"
|
||||
| "fuel_logs"
|
||||
| "purchase_orders"
|
||||
| "delivery_notes";
|
||||
| "delivery_notes"
|
||||
| "plant_hours";
|
||||
|
||||
export type BatchStatus =
|
||||
| "pending"
|
||||
|
|
@ -156,6 +160,35 @@ export interface FuelLogRecord extends RecordModel {
|
|||
};
|
||||
}
|
||||
|
||||
export interface PlantHoursLogRecord extends RecordModel {
|
||||
collectionName: "plant_hours_log";
|
||||
date_logged: string;
|
||||
vehicle_qr: string;
|
||||
vehicle: string;
|
||||
site: string;
|
||||
project_code: string;
|
||||
start_date: string;
|
||||
end_date: string;
|
||||
start_time?: string;
|
||||
end_time?: string;
|
||||
start_hours: number;
|
||||
end_hours: number;
|
||||
hours: number;
|
||||
notes?: string;
|
||||
hour_meter_budget: number;
|
||||
cost_per_hour: number;
|
||||
value: number;
|
||||
over_budget: boolean;
|
||||
hours_mismatch: boolean;
|
||||
vehicle_unit_type_at_import: UnitType;
|
||||
batch_reference?: string;
|
||||
expand?: {
|
||||
vehicle?: VehicleRecord;
|
||||
site?: SiteRecord;
|
||||
batch_reference?: DataImportBatchRecord;
|
||||
};
|
||||
}
|
||||
|
||||
export interface DeliveryNoteRecord extends RecordModel {
|
||||
collectionName: "delivery_notes";
|
||||
delivery_note_number: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue