mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 12:18:11 +00:00
ui design for schedule
This commit is contained in:
@@ -32,11 +32,13 @@ export const trainSchedulingService = {
|
||||
freightType?: FreightType,
|
||||
): Promise<EligibleContainerBookingsResponse> => {
|
||||
const useUnified = !freightType || freightType === "MIXED";
|
||||
// The container/bulk endpoints already encode freight type in the path, and their
|
||||
// query DTOs reject an extra `freightType` param — so only pass the station filters.
|
||||
const response = await client.get<EligibleContainerBookingsResponse>(
|
||||
useUnified
|
||||
? URL_CONSTANTS.TRAIN_SCHEDULING.ELIGIBLE_BOOKINGS
|
||||
: pathsFor(freightType).ELIGIBLE_BOOKINGS,
|
||||
{ params: { ...filters, ...(freightType && freightType !== "MIXED" ? { freightType } : {}) } },
|
||||
{ params: { ...filters } },
|
||||
);
|
||||
return unwrap(response.data);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user