mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 16:28:12 +00:00
Merge branch 'contrat-backup2' of github.com:Tria-plc/edr-platform into contrat-backup2
This commit is contained in:
@@ -360,6 +360,14 @@ export const api = {
|
||||
() => TRAIN_SCHEDULING_INVALIDATIONS,
|
||||
),
|
||||
|
||||
completeDocReview: endpoint<string, BatchBoardScheduleDetail>(
|
||||
"train-scheduling",
|
||||
"doc-review-complete",
|
||||
(id) => trainSchedulingService.completeDocReview(id),
|
||||
undefined,
|
||||
() => TRAIN_SCHEDULING_INVALIDATIONS,
|
||||
),
|
||||
|
||||
setBookingWindow: endpoint<
|
||||
{ id: string; status: "OPEN" | "CLOSED" },
|
||||
TrainScheduleDetail
|
||||
|
||||
@@ -158,6 +158,20 @@ export const trainSchedulingService = {
|
||||
return unwrap(response.data);
|
||||
},
|
||||
|
||||
/**
|
||||
* Staff finished reviewing documents early — runs the batch immediately
|
||||
* for the schedule's whole route-day group.
|
||||
*/
|
||||
completeDocReview: async (
|
||||
scheduleId: string,
|
||||
): Promise<BatchBoardScheduleDetail> => {
|
||||
const response = await client.post<BatchBoardScheduleDetail>(
|
||||
URL_CONSTANTS.TRAIN_SCHEDULING.DOC_REVIEW_COMPLETE(scheduleId),
|
||||
{},
|
||||
);
|
||||
return unwrap(response.data);
|
||||
},
|
||||
|
||||
runAllocation: async (
|
||||
scheduleId: string,
|
||||
): Promise<WagonAllocationAttemptResult> => {
|
||||
@@ -494,16 +508,7 @@ export const trainSchedulingService = {
|
||||
},
|
||||
|
||||
updateGlobalRules: async (
|
||||
payload: Partial<
|
||||
Pick<
|
||||
TrainSchedulingGlobalRules,
|
||||
| "maxTrainLengthMeters"
|
||||
| "maxTrainWeightTons"
|
||||
| "maxWagonsPerTrain"
|
||||
| "max20ftContainerWeightTons"
|
||||
| "max20ftPairWeightDiffTons"
|
||||
>
|
||||
>,
|
||||
payload: Partial<Omit<TrainSchedulingGlobalRules, "id">>,
|
||||
): Promise<TrainSchedulingGlobalRules> => {
|
||||
const response = await client.patch<TrainSchedulingGlobalRules>(
|
||||
URL_CONSTANTS.TRAIN_SCHEDULING.GLOBAL_RULES,
|
||||
|
||||
Reference in New Issue
Block a user