Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
extractOccurrenceDetailsFromPacedTrain,
findExceptionWithOccurrenceId,
computeIndexedOccurrenceStartTime,
getOccurrenceTrainName,
} from 'modules/timetableItem/helpers/pacedTrain';
import useSelectedTimetableItem from 'modules/timetableItem/hooks/useSelectedTimetableItem';
import type { Train } from 'reducers/osrdconf/types';
Expand Down Expand Up @@ -67,6 +68,11 @@ const useSimulationResults = (): {
...(exception ? extractOccurrenceDetailsFromPacedTrain(timetableItem, exception) : {}),
// overwrite start_time from extractOccurrenceDetailsFromPacedTrain
start_time: startTime,
// overwrite train_name to reflect the occurrence name
train_name: getOccurrenceTrainName(
{ ...timetableItem, paced: timetableItem.paced },
selectedTrainId
),
id: selectedTrainId,
};
}, [selectedTrainId, timetableItem]);
Expand Down
Loading