separte handover edr lastmile and customer last mile flow

This commit is contained in:
Hagernesh
2026-07-06 12:27:58 +00:00
parent 8b41e80ecc
commit fe9503638b
9 changed files with 367 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
import type { Freight } from '@edr/types';
import { api as apiClient } from '../auth/http';
import { URL_CONSTANTS } from '@/constants/URLS';
@@ -67,6 +69,12 @@ const cleanParams = (params: object) =>
);
export const warehouseService = {
/** Customer self-haul trucks assigned to a booking (portal multi-truck). */
getCustomerTrucks: async (bookingId: string): Promise<Freight.ICustomerTruck[]> => {
const { data } = await apiClient.get(`/api/bookings/${bookingId}/customer-trucks`);
return data?.data ?? data ?? [];
},
// ── Warehouses ──────────────────────────────────────────────────────────
list: (filter?: WarehouseFilter) =>
apiClient.get<Warehouse[]>(URL_CONSTANTS.WAREHOUSES.BASE, {