diff --git a/front/src/applications/stdcm/types.ts b/front/src/applications/stdcm/types.ts index 92b97198638..746ce92658d 100644 --- a/front/src/applications/stdcm/types.ts +++ b/front/src/applications/stdcm/types.ts @@ -183,7 +183,7 @@ export type StdcmLinkedTrainExtremity = { ch: string; date: string; geographic: GeoJsonPoint; - isoArrivalTime: string; + arrivalDate: Date; name: string; obj_id: string; time: string; diff --git a/front/src/applications/stdcm/utils/computeOpSchedules.ts b/front/src/applications/stdcm/utils/computeOpSchedules.ts index 1db0abe9824..3a858f178be 100644 --- a/front/src/applications/stdcm/utils/computeOpSchedules.ts +++ b/front/src/applications/stdcm/utils/computeOpSchedules.ts @@ -29,12 +29,12 @@ const computeOpSchedules = (startTime: Date, msFromStartTime: number) => { origin: { date: originDate, time: originTime, - isoArrivalTime: subtractDurationFromDate(startTime, 1800).toISOString(), + arrivalDate: subtractDurationFromDate(startTime, 1800), }, destination: { date: destinationDate, time: destinationTime, - isoArrivalTime: addDurationToDate(destinationArrivalTime, 1800).toISOString(), + arrivalDate: addDurationToDate(destinationArrivalTime, 1800), }, }; }; diff --git a/front/src/reducers/osrdconf/stdcmConf/index.ts b/front/src/reducers/osrdconf/stdcmConf/index.ts index 6aabba35637..10c589d6b2b 100644 --- a/front/src/reducers/osrdconf/stdcmConf/index.ts +++ b/front/src/reducers/osrdconf/stdcmConf/index.ts @@ -200,14 +200,15 @@ export const stdcmConfSlice = createSlice({ }> ) { const { linkedTrainExtremity, trainName, pathStep, pathStepId } = action.payload; - const { name, ch, uic, geographic, isoArrivalTime, date, time } = pathStep; + const { name, ch, uic, geographic, arrivalDate, date, time } = pathStep; + const newPathStep = { name, ch, id: pathStepId, uic, coordinates: geographic.coordinates, - arrival: isoArrivalTime, + arrival: arrivalDate, ...(linkedTrainExtremity === 'origin' && { arrivalType: ArrivalTimeTypes.PRECISE_TIME }), };