From 9bca048432c3d833e006c34bcedd7cfe67b65eda Mon Sep 17 00:00:00 2001 From: Clara Ni Date: Fri, 13 Dec 2024 14:09:26 +0100 Subject: [PATCH] fixup! front: display simulation results only if a train is selected or get data is ready --- .../views/SimulationResults.tsx | 161 +++++++++--------- 1 file changed, 82 insertions(+), 79 deletions(-) diff --git a/front/src/applications/operationalStudies/views/SimulationResults.tsx b/front/src/applications/operationalStudies/views/SimulationResults.tsx index 915d97ffe67..b0549ac6186 100644 --- a/front/src/applications/operationalStudies/views/SimulationResults.tsx +++ b/front/src/applications/operationalStudies/views/SimulationResults.tsx @@ -141,16 +141,16 @@ const SimulationResults = ({ )} {/* SIMULATION : SPACE TIME CHART */} - -
0 && ( + - {projectionData && projectionData.projectedTrains.length > 0 && ( +
<>
+
+
+ )} + + {selectedTrainSchedule && ( + <> + {/* TRAIN : SPACE SPEED CHART */} + {selectedTrainRollingStock && trainSimulation && pathProperties && ( +
+
+ +
+
)} - - - {/* TRAIN : SPACE SPEED CHART */} - {selectedTrainRollingStock && trainSimulation && pathProperties && selectedTrainSchedule && ( -
-
- +
-
- )} - - {/* SIMULATION : MAP */} -
- -
- {/* TIME STOPS TABLE */} -
-

{t('timetableOutput')}

- -
+ {/* TIME STOPS TABLE */} +
+

{t('timetableOutput')}

+ +
- {/* SIMULATION EXPORT BUTTONS */} - {selectedTrainSchedule && - trainSimulation && - pathProperties && - selectedTrainRollingStock && - operationalPoints && - path && - infraId && ( - - )} + {/* SIMULATION EXPORT BUTTONS */} + {trainSimulation && + pathProperties && + selectedTrainRollingStock && + operationalPoints && + path && + infraId && ( + + )} + + )} ); };