mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 15:18:11 +00:00
mile
This commit is contained in:
@@ -22,6 +22,8 @@ export interface LastMileBooking {
|
||||
originYard?: { id: string; name?: string; label?: string } | null;
|
||||
destinationYard?: { id: string; name?: string; label?: string } | null;
|
||||
cargoType?: { id: string; name?: string; label?: string; cargoTypeName?: string } | null;
|
||||
/** Container lines — total container count drives how many trucks are needed. */
|
||||
bookingContainers?: Array<{ id: string; quantity: number }>;
|
||||
}
|
||||
|
||||
export interface LastMileVehicle {
|
||||
@@ -48,6 +50,8 @@ export interface LastMileRecord {
|
||||
vehicleId?: string | null;
|
||||
booking?: LastMileBooking | null;
|
||||
vehicle?: LastMileVehicle | null;
|
||||
/** Full set of vehicles serving this delivery (multi-truck). */
|
||||
vehicleAssignments?: Array<{ id: string; vehicleId: string; vehicle?: LastMileVehicle | null }>;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
@@ -69,4 +73,6 @@ export const lastMileService = {
|
||||
api.post<LastMileRecord>(LM.ACCEPT(encodeURIComponent(bookingReference))),
|
||||
remove: (id: string) =>
|
||||
api.delete<void>(LM.BY_ID(id)),
|
||||
setVehicles: (id: string, vehicleIds: string[]) =>
|
||||
api.post<LastMileRecord>(`${LM.BASE}/${id}/vehicles`, { vehicleIds }),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user