Skip to content

Commit 3dd1e71

Browse files
committed
fixup! front: drop tsv2 switch
1 parent 0ab5677 commit 3dd1e71

File tree

3 files changed

+4
-31
lines changed

3 files changed

+4
-31
lines changed

front/src/applications/stdcm/hooks/useStdcm.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ const useStdcm = () => {
5858

5959
const { speedLimitByTag } = useStoreDataForSpeedLimitByTagSelector();
6060

61-
const launchStdcmRequestV2 = async () => {
61+
const launchStdcmRequest = async () => {
62+
setCurrentStdcmRequestStatus(STDCM_REQUEST_STATUS.pending);
63+
6264
const validConfig = checkStdcmConf(dispatch, t, osrdconf as OsrdStdcmConfState);
6365
if (validConfig) {
6466
const payload = formatStdcmPayload(validConfig);
@@ -107,11 +109,6 @@ const useStdcm = () => {
107109
}
108110
};
109111

110-
const launchStdcmRequest = async () => {
111-
setCurrentStdcmRequestStatus(STDCM_REQUEST_STATUS.pending);
112-
launchStdcmRequestV2();
113-
};
114-
115112
const cancelStdcmRequest = () => {
116113
// when http ready https://axios-http.com/docs/cancellation
117114

front/src/common/UserSettings.tsx

-24
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { useSelector } from 'react-redux';
88
import InputSNCF from 'common/BootstrapSNCF/InputSNCF';
99
import { ModalBodySNCF, ModalHeaderSNCF } from 'common/BootstrapSNCF/ModalSNCF';
1010
import SwitchSNCF, { SWITCH_TYPES } from 'common/BootstrapSNCF/SwitchSNCF/SwitchSNCF';
11-
import { operationalStudiesConfSliceActions } from 'reducers/osrdconf/operationalStudiesConf';
12-
import { stdcmConfSliceActions } from 'reducers/osrdconf/stdcmConf';
1311
import { updateUserPreferences, switchStdcmV2Activated } from 'reducers/user';
1412
import { getUserPreferences, getStdcmV2Activated } from 'reducers/user/userSelectors';
1513
import { useAppDispatch } from 'store';
@@ -23,27 +21,6 @@ const UserSettings = () => {
2321

2422
const debouncedSafeWord = useDebounce(safeWordText, 500);
2523

26-
const {
27-
updateScenarioID: updateEexScenarioId,
28-
updateTimetableID: updateEexTimetableId,
29-
updateInfraID: updateEexInfraId,
30-
} = operationalStudiesConfSliceActions;
31-
const {
32-
updateScenarioID: updateStdcmScenarioId,
33-
updateTimetableID: updateStdcmTimetableId,
34-
updateInfraID: updateStdcmInfraId,
35-
} = stdcmConfSliceActions;
36-
37-
const resetStore = () => {
38-
dispatch(updateEexScenarioId(undefined));
39-
dispatch(updateEexTimetableId(undefined));
40-
dispatch(updateEexInfraId(undefined));
41-
42-
dispatch(updateStdcmScenarioId(undefined));
43-
dispatch(updateStdcmTimetableId(undefined));
44-
dispatch(updateStdcmInfraId(undefined));
45-
};
46-
4724
useEffect(() => {
4825
dispatch(updateUserPreferences({ ...userPreferences, safeWord: debouncedSafeWord }));
4926
}, [debouncedSafeWord]);
@@ -89,7 +66,6 @@ const UserSettings = () => {
8966
name="stdcm-version-switch"
9067
onChange={() => {
9168
dispatch(switchStdcmV2Activated());
92-
resetStore();
9369
}}
9470
checked={stdcmV2Activated}
9571
/>

front/src/modules/trainschedule/components/ManageTrainSchedule/TrainSettings.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default function TrainSettings() {
100100
label={
101101
<>
102102
<MdOutlineAccessTime />
103-
{/* TOSO TS2 : rename trainScheduleDepartureTime key to trainScheduleStartTime everywhere */}
103+
{/* TODO TS2 : rename trainScheduleDepartureTime key to trainScheduleStartTime everywhere */}
104104
<small className="text-nowrap">{t('trainScheduleDepartureTime')}</small>
105105
</>
106106
}

0 commit comments

Comments
 (0)