mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 00:38:11 +00:00
refactor(train-scheduling): rename and restructure container movement logic
This commit is contained in:
@@ -815,21 +815,15 @@ export const api = {
|
||||
() => [QUERY_KEYS.TRAIN_SCHEDULING.ROOT],
|
||||
),
|
||||
|
||||
moveContainerItem: endpoint<
|
||||
{
|
||||
scheduleId: string;
|
||||
itemId: string;
|
||||
targetTrainSetWagonId: string;
|
||||
swapWithItemId?: string;
|
||||
},
|
||||
moveWagonLoad: endpoint<
|
||||
{ scheduleId: string; wagonId: string; targetWagonId: string },
|
||||
TrainScheduleDetail
|
||||
>(
|
||||
"train-scheduling",
|
||||
"move-container-item",
|
||||
({ scheduleId, itemId, targetTrainSetWagonId, swapWithItemId }) =>
|
||||
trainSchedulingService.moveContainerItem(scheduleId, itemId, {
|
||||
targetTrainSetWagonId,
|
||||
swapWithItemId,
|
||||
"move-wagon-load",
|
||||
({ scheduleId, wagonId, targetWagonId }) =>
|
||||
trainSchedulingService.moveWagonLoad(scheduleId, wagonId, {
|
||||
targetWagonId,
|
||||
}),
|
||||
undefined,
|
||||
() => [QUERY_KEYS.TRAIN_SCHEDULING.ROOT],
|
||||
|
||||
Reference in New Issue
Block a user