File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
front/src/modules/timesStops/hooks Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,12 @@ const useOutputTableData = (
3838
3939 const trackIds = useMemo ( ( ) => {
4040 const path = selectedTrain ?. path || [ ] ;
41- const trackIdsInPathSteps = path . flatMap ( ( step ) => ( 'track' in step ? [ step . track ] : [ ] ) ) ;
41+ const trackIdsInPathSteps = path . flatMap ( ( step ) => [
42+ ...( 'track' in step ? [ step . track ] : [ ] ) ,
43+ ...( 'track_reference' in step && step . track_reference && 'track_id' in step . track_reference
44+ ? [ step . track_reference . track_id ]
45+ : [ ] ) ,
46+ ] ) ;
4247 const trackIdsOnPath = ( operationalPointsOnPath || [ ] ) . map ( ( op ) => op . part . track ) ;
4348 return [ ...trackIdsInPathSteps , ...trackIdsOnPath ] ;
4449 } , [ selectedTrain ?. path , operationalPointsOnPath ] ) ;
@@ -79,7 +84,7 @@ const useOutputTableData = (
7984 const trackName =
8085 'track' in pathStep
8186 ? trackSections [ pathStep . track ] ?. extensions ?. sncf ?. track_name
82- : getTrackReferenceLabel ( pathStep . track_reference ) ;
87+ : getTrackReferenceLabel ( trackSections , pathStep . track_reference ) ;
8388
8489 const schedule = scheduleByAt [ pathStep . id ] ;
8590 const computedArrival = simulatedPathItemTimes
You can’t perform that action at this time.
0 commit comments