mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 08:18:20 +00:00
Enable per-truck editing of warehouse gate arrival/departure times (arrivedAt/departedAt) via modal on Import Trucks page. Accessible via row action menu for EDR-haulage trucks. Includes backend endpoint POST /last-mile/:id/warehouse-gate-times and frontend modal with DateTimePicker inputs. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
23 lines
519 B
TypeScript
23 lines
519 B
TypeScript
import { Type } from 'class-transformer';
|
|
import { IsArray, IsDateString, IsOptional, IsUUID, ValidateNested } from 'class-validator';
|
|
|
|
export class TruckWarehouseGateTimeInput {
|
|
@IsUUID()
|
|
vehicleId!: string;
|
|
|
|
@IsOptional()
|
|
@IsDateString()
|
|
arrivedAt?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsDateString()
|
|
departedAt?: string | null;
|
|
}
|
|
|
|
export class SetWarehouseGateTimesDto {
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => TruckWarehouseGateTimeInput)
|
|
trucks!: TruckWarehouseGateTimeInput[];
|
|
}
|