From 0bd385b19e0f9c7245b77d12066ce76fa8046af7 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 3 Jan 2025 15:26:50 +0100 Subject: [PATCH 1/2] front: drop unused STDCM-related fields in PathStep Now that we have a separate StdcmPathStep type, remove a few unused STDCM-specific fields in PathStep. Signed-off-by: Simon Ser --- front/src/modules/pathfinding/hooks/usePathfinding.ts | 2 -- front/src/reducers/osrdconf/types.ts | 4 ---- 2 files changed, 6 deletions(-) diff --git a/front/src/modules/pathfinding/hooks/usePathfinding.ts b/front/src/modules/pathfinding/hooks/usePathfinding.ts index 3a568f076f3..eb611f470bd 100644 --- a/front/src/modules/pathfinding/hooks/usePathfinding.ts +++ b/front/src/modules/pathfinding/hooks/usePathfinding.ts @@ -132,13 +132,11 @@ const usePathfinding = ( const theoreticalMargin = i === 0 ? step.theoreticalMargin || '0%' : step.theoreticalMargin; const stopFor = i === pathStepsInput.length - 1 && !step.stopFor ? '0' : step.stopFor; - const stopType = i === pathStepsInput.length - 1 && !step.stopFor ? undefined : step.stopType; return { ...step, positionOnPath: pathResult.path_item_positions[i], stopFor, - stopType, theoreticalMargin, ...(correspondingOp && { name: correspondingOp.name, diff --git a/front/src/reducers/osrdconf/types.ts b/front/src/reducers/osrdconf/types.ts index f233790b917..aa1c89d1db6 100644 --- a/front/src/reducers/osrdconf/types.ts +++ b/front/src/reducers/osrdconf/types.ts @@ -56,12 +56,8 @@ export type PathStep = PathItemLocation & { If true, the train schedule is consider as invalid and must be edited */ deleted?: boolean; arrival?: IsoDurationString | null; - arrivalType?: ArrivalTimeTypes; - arrivalToleranceBefore?: number; - arrivalToleranceAfter?: number; locked?: boolean; stopFor?: string | null; - stopType?: StdcmStopTypes; theoreticalMargin?: string; receptionSignal?: ReceptionSignal; kp?: string; From 2720a6b545a8914bd613c8df997153fa9636c8c1 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 3 Jan 2025 15:46:43 +0100 Subject: [PATCH 2/2] front: drop a few unused fields from SuggestedOP Signed-off-by: Simon Ser --- front/src/modules/pathfinding/utils.ts | 3 --- .../trainschedule/components/ManageTrainSchedule/types.ts | 3 --- 2 files changed, 6 deletions(-) diff --git a/front/src/modules/pathfinding/utils.ts b/front/src/modules/pathfinding/utils.ts index 8f38010139a..d8b6b9e377b 100644 --- a/front/src/modules/pathfinding/utils.ts +++ b/front/src/modules/pathfinding/utils.ts @@ -27,9 +27,6 @@ export const formatSuggestedOperationalPoints = ( uic: op.extensions?.identifier?.uic, ch: op.extensions?.sncf?.ch, kp: op.part.extensions?.sncf?.kp, - chLongLabel: op.extensions?.sncf?.ch_long_label, - chShortLabel: op.extensions?.sncf?.ch_short_label, - ci: op.extensions?.sncf?.ci, trigram: op.extensions?.sncf?.trigram, offsetOnTrack: op.part.position, track: op.part.track, diff --git a/front/src/modules/trainschedule/components/ManageTrainSchedule/types.ts b/front/src/modules/trainschedule/components/ManageTrainSchedule/types.ts index f5ea4729046..74af67f9ec7 100644 --- a/front/src/modules/trainschedule/components/ManageTrainSchedule/types.ts +++ b/front/src/modules/trainschedule/components/ManageTrainSchedule/types.ts @@ -9,9 +9,6 @@ export type SuggestedOP = { name?: string; uic?: number; ch?: string; - chLongLabel?: string; - chShortLabel?: string; - ci?: number; kp?: string; trigram?: string; offsetOnTrack: number;