ui design for schedule

This commit is contained in:
Marshal
2026-06-09 23:25:52 +00:00
parent 5774d7db9d
commit 257428be18
19 changed files with 2088 additions and 408 deletions

View File

@@ -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);
},