Skip to content

Commit

Permalink
front: fix scenario explorer update stdcm environment
Browse files Browse the repository at this point in the history
Selecting a new scenario in debug interface no longer removes the work schedule group id.

Now also uses the electrical profile set from the scenario

Signed-off-by: Valentin Chanas <anisometropie@gmail.com>
  • Loading branch information
anisometropie committed Oct 23, 2024
1 parent c864060 commit f7d17ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ const ScenarioExplorer = ({
updateStdcmEnvironment({
infraID: scenario.infra_id,
timetableID: scenario.timetable_id,
electricalProfileSetId: undefined,
workScheduleGroupId: undefined,
electricalProfileSetId: scenario.electrical_profile_set_id,
searchDatetimeWindow: scenarioDateTimeWindow,
})
);
Expand Down
4 changes: 3 additions & 1 deletion front/src/reducers/osrdconf/stdcmConf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ export const stdcmConfSlice = createSlice({
state.infraID = action.payload.infraID;
state.timetableID = action.payload.timetableID;
state.electricalProfileSetId = action.payload.electricalProfileSetId;
state.workScheduleGroupId = action.payload.workScheduleGroupId;
state.searchDatetimeWindow = action.payload.searchDatetimeWindow;
if (action.payload.workScheduleGroupId) {
state.workScheduleGroupId = action.payload.workScheduleGroupId;
}
},
updateOriginArrival(
state: Draft<OsrdStdcmConfState>,
Expand Down

0 comments on commit f7d17ed

Please sign in to comment.