Change how trainschedule id is stored in the front part #10601
Labels
area:front
Work on Standard OSRD Interface modules
kind:refacto-task
Task related to Refactorization Epic
Description and goal
With the train service / paced train feature incoming, we will now manipulate 2 sorts of trains in the app : "unique" trains and "paced trains".
Paced trains regroup many trains with a
start_time
equally staggered. We gonna need to be able to select every of the paced train's children on the timetable or on the space time chart and manipulate (drag on space time chart).The back-end will provide an id for a paced train but not for its "children". To be aware of which one of them we manipulate, we need to change how we store their ids in the
TrainScheduleWithDetails
type.The new id will now be of type
string
instead ofnumber
and will look like this :trainschedule-{id}
occurrence-{occurrenceIndex}-paced-{id}
We also need to have another type of id for paced trains that will be used for the projection to differentiate it with a train schedule id.
paced train id :
paced-{id}
To improve safety, we should also be able to distinguish these two kinds of ids.
Goal is to use the logic describe in this issue : #8816.
These news types should look like this :
Warning
You might need to reset your store / local storage to test the PR and after testing it
Acceptance criteria
TrainScheduleWithDetails
typeid
property is now of typeTrainId
trainSchedule
, the editoastid
is transformed to match the new id string formattrainSchedule
, the "string" id is properly transformed into the editoast "number" idThe text was updated successfully, but these errors were encountered: