File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
front/src/applications/operationalStudies/hooks Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 extractOccurrenceDetailsFromPacedTrain ,
1111 findExceptionWithOccurrenceId ,
1212 computeIndexedOccurrenceStartTime ,
13+ getOccurrenceTrainName ,
1314} from 'modules/timetableItem/helpers/pacedTrain' ;
1415import useSelectedTimetableItem from 'modules/timetableItem/hooks/useSelectedTimetableItem' ;
1516import type { Train } from 'reducers/osrdconf/types' ;
@@ -67,6 +68,11 @@ const useSimulationResults = (): {
6768 ...( exception ? extractOccurrenceDetailsFromPacedTrain ( timetableItem , exception ) : { } ) ,
6869 // overwrite start_time from extractOccurrenceDetailsFromPacedTrain
6970 start_time : startTime ,
71+ // overwrite train_name to reflect the occurrence name
72+ train_name : getOccurrenceTrainName (
73+ { ...timetableItem , paced : timetableItem . paced } ,
74+ selectedTrainId
75+ ) ,
7076 id : selectedTrainId ,
7177 } ;
7278 } , [ selectedTrainId , timetableItem ] ) ;
You can’t perform that action at this time.
0 commit comments