Commit f5fb0da 1 parent 9e8b4ab commit f5fb0da Copy full SHA for f5fb0da
File tree 3 files changed +5
-9
lines changed
applications/operationalStudies/views
3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,6 @@ const SimulationResults = ({
116
116
}
117
117
} , [ extViewport ] ) ;
118
118
119
- if ( ! trainSimulation ) return null ;
120
-
121
- if ( trainSimulation . status !== 'success' ) return null ;
122
-
123
119
return (
124
120
< div className = "simulation-results" >
125
121
{ /* SIMULATION : STICKY BAR */ }
@@ -150,7 +146,7 @@ const SimulationResults = ({
150
146
className = "simulation-warped-map d-flex flex-row align-items-stretch mb-2"
151
147
style = { { height : manchetteWithSpaceTimeChartHeight } }
152
148
>
153
- { projectionData && projectionData . projectedTrains . length > 0 && pathProperties && (
149
+ { projectionData && projectionData . projectedTrains . length > 0 && (
154
150
< >
155
151
< button
156
152
type = "button"
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import TimesStops from './TimesStops';
13
13
import { TableType , type TimesStopsRow } from './types' ;
14
14
15
15
type TimesStopsOutputProps = {
16
- simulatedTrain : SimulationResponseSuccess ;
16
+ simulatedTrain ? : SimulationResponseSuccess ;
17
17
trainSummary ?: TrainScheduleWithDetails ;
18
18
operationalPoints ?: PathPropertiesFormatted [ 'operationalPoints' ] ;
19
19
selectedTrainSchedule ?: TrainScheduleResult ;
@@ -30,7 +30,7 @@ const TimesStopsOutput = ({
30
30
dataIsLoading,
31
31
} : TimesStopsOutputProps ) => {
32
32
const enrichedOperationalPoints = useOutputTableData (
33
- simulatedTrain ,
33
+ simulatedTrain ?. final_output ,
34
34
trainSummary ,
35
35
operationalPoints ,
36
36
selectedTrainSchedule ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import { formatSchedule } from '../helpers/scheduleData';
21
21
import { type ScheduleEntry , type TimesStopsRow } from '../types' ;
22
22
23
23
const useOutputTableData = (
24
- { final_output : simulatedTrain } : SimulationResponseSuccess ,
24
+ simulatedTrain ? : SimulationResponseSuccess [ 'final_output' ] ,
25
25
trainSummary ?: TrainScheduleWithDetails ,
26
26
operationalPoints ?: PathPropertiesFormatted [ 'operationalPoints' ] ,
27
27
selectedTrainSchedule ?: TrainScheduleResult ,
@@ -109,7 +109,7 @@ const useOutputTableData = (
109
109
110
110
useEffect ( ( ) => {
111
111
const formatRows = async ( ) => {
112
- if ( ! operationalPoints || ! startDatetime ) {
112
+ if ( ! operationalPoints || ! startDatetime || ! simulatedTrain ) {
113
113
setRows ( [ ] ) ;
114
114
return ;
115
115
}
You can’t perform that action at this time.
0 commit comments