mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 16:00:56 +00:00
implement update train details feature: add DTO, service method, and UI modal for editing train name and run numbers
This commit is contained in:
@@ -191,6 +191,7 @@ import {
|
||||
type BuiltTrainListResponse,
|
||||
type ScheduleConsist,
|
||||
type TrainComposition,
|
||||
type UpdateTrainDetailsPayload,
|
||||
} from "./trainBuilder.service";
|
||||
import { trainSchedulingService } from "./trainScheduling.service";
|
||||
import { wagonTypesService, type WagonType } from "./wagon-types.service";
|
||||
@@ -1842,6 +1843,18 @@ export const api = {
|
||||
() => TRAIN_BUILDER_INVALIDATIONS,
|
||||
),
|
||||
|
||||
updateDetails: endpoint<
|
||||
{ id: string; payload: UpdateTrainDetailsPayload },
|
||||
TrainComposition
|
||||
>(
|
||||
"train-builder",
|
||||
"updateDetails",
|
||||
({ id, payload }) =>
|
||||
trainBuilderService.updateDetails(id, payload).then((r) => r.data),
|
||||
undefined,
|
||||
() => TRAIN_BUILDER_INVALIDATIONS,
|
||||
),
|
||||
|
||||
assignWagons: endpoint<{ id: string; wagonIds: string[] }, TrainComposition>(
|
||||
"train-builder",
|
||||
"assignWagons",
|
||||
|
||||
Reference in New Issue
Block a user