From 20fa85040b9e7c68dbb663932ee92dfb75d9a8fa Mon Sep 17 00:00:00 2001 From: SarahBellaha Date: Mon, 4 Nov 2024 09:32:42 +0100 Subject: [PATCH] front: linkedTrain search enhancements Signed-off-by: SarahBellaha --- front/public/locales/en/stdcm.json | 12 +- front/public/locales/fr/stdcm.json | 12 +- .../components/StdcmForm/StdcmConfig.tsx | 21 +-- .../StdcmForm/StdcmLinkedPathSearch.tsx | 124 ------------------ ...esults.tsx => StdcmLinkedTrainResults.tsx} | 44 +++---- .../StdcmForm/StdcmLinkedTrainSearch.tsx | 124 ++++++++++++++++++ .../StdcmResults/SimulationReportSheet.tsx | 16 +-- .../components/StdcmResults/StdcmResults.tsx | 2 +- ...dPathSearch.ts => useLinkedTrainSearch.ts} | 41 +++--- .../applications/stdcm/hooks/useStdcmForm.ts | 8 +- front/src/applications/stdcm/types.ts | 20 +-- .../src/reducers/osrdconf/stdcmConf/index.ts | 26 ++-- .../reducers/osrdconf/stdcmConf/selectors.ts | 2 +- front/src/reducers/osrdconf/types.ts | 4 +- .../src/styles/scss/applications/_stdcm.scss | 2 +- .../styles/scss/applications/stdcm/_card.scss | 4 +- .../{_linkedPath.scss => _linkedTrain.scss} | 16 +-- 17 files changed, 240 insertions(+), 238 deletions(-) delete mode 100644 front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathSearch.tsx rename front/src/applications/stdcm/components/StdcmForm/{StdcmLinkedPathResults.tsx => StdcmLinkedTrainResults.tsx} (58%) create mode 100644 front/src/applications/stdcm/components/StdcmForm/StdcmLinkedTrainSearch.tsx rename front/src/applications/stdcm/hooks/{useLinkedPathSearch.ts => useLinkedTrainSearch.ts} (83%) rename front/src/styles/scss/applications/stdcm/{_linkedPath.scss => _linkedTrain.scss} (85%) diff --git a/front/public/locales/en/stdcm.json b/front/public/locales/en/stdcm.json index a82df8c3ca4..fc32a264f6f 100644 --- a/front/public/locales/en/stdcm.json +++ b/front/public/locales/en/stdcm.json @@ -25,9 +25,11 @@ "incompleteForm": "Incomplete form", "viaNotDefined": "Au moins une localisation n'est pas renseignée" }, - "indicateAnteriorPath": "Indicate anterior path", - "indicatePosteriorPath": "Indicate posterior path", "leaveAt": "Leave at {{ time }}", + "linkedTrainDefaultCard": { + "anterior": "Indicate anterior train", + "posterior": "Indicate posterior train" + }, "noConfigurationFound": { "title": "A configuration problem prevents you from performing a search", "text": "Please contact the maintenance team so they can get you back on track." @@ -99,14 +101,16 @@ "stdcmSimulationReport": "Path simulation report", "trainPath": { "addVia": "Add intermediate OP", - "anteriorPath": "Anterior path", "asSoonAsPossible": "as soon as possible", "ch": "CH", "ci": "CI", "date": "Date", "destination": "Destination", + "linkedTrain": { + "anterior": "Anterior train", + "posterior": "Posterior train" + }, "origin": "Origin", - "posteriorPath": "Posterior path", "preciseTime": "precise time", "respectDestinationSchedule": "respect the destination schedule", "stopFor": "Minimum stop time", diff --git a/front/public/locales/fr/stdcm.json b/front/public/locales/fr/stdcm.json index b53e8dcafcc..2f7d2da588b 100644 --- a/front/public/locales/fr/stdcm.json +++ b/front/public/locales/fr/stdcm.json @@ -25,9 +25,11 @@ "incompleteForm": "Formulaire incomplet", "viaNotDefined": "Au moins une localisation n'est pas renseignée" }, - "indicateAnteriorPath": "Indiquer le sillon antérieur", - "indicatePosteriorPath": "Indiquer le sillon postérieur", "leaveAt": "Partir à {{ time }}", + "linkedTrainDefaultCard": { + "anterior": "Indiquer le sillon antérieur", + "posterior": "Indiquer le sillon postérieur" + }, "noConfigurationFound": { "title": "Un problème de configuration vous empêche de faire une recherche", "text": "Veuillez contacter l'équipe de maintenance pour qu'elle puisse vous remettre sur les rails." @@ -99,14 +101,16 @@ "stdcmSimulationReport": "Fiche simulation", "trainPath": { "addVia": "Ajouter un PR intermédiaire", - "anteriorPath": "Sillon antérieur", "asSoonAsPossible": "dès que possible", "ch": "CH", "ci": "CI", "date": "Date", "destination": "Destination", + "linkedTrain": { + "anterior": "Sillon antérieur", + "posterior": "Sillon postérieur" + }, "origin": "Origine", - "posteriorPath": "Sillon postérieur", "preciseTime": "horaire précis", "respectDestinationSchedule": "respecter l'horaire de la destination", "stopFor": "Temps d'arrêt minimum", diff --git a/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx b/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx index 594e8cd5c01..51f2add8160 100644 --- a/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx +++ b/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx @@ -1,7 +1,6 @@ import { useEffect, useMemo, useRef, useState } from 'react'; import { Button } from '@osrd-project/ui-core'; -import { ArrowDown, ArrowUp } from '@osrd-project/ui-icons'; import cx from 'classnames'; import { useTranslation } from 'react-i18next'; import { useSelector } from 'react-redux'; @@ -16,7 +15,7 @@ import { useAppDispatch } from 'store'; import StdcmConsist from './StdcmConsist'; import StdcmDestination from './StdcmDestination'; -import StdcmLinkedPathSearch from './StdcmLinkedPathSearch'; +import StdcmLinkedTrainSearch from './StdcmLinkedTrainSearch'; import StdcmOrigin from './StdcmOrigin'; import useStaticPathfinding from '../../hooks/useStaticPathfinding'; import type { StdcmConfigErrors } from '../../types'; @@ -148,13 +147,10 @@ const StdcmConfig = ({ )}
- } - className="anterior-linked-path" - linkedOp={{ extremityType: 'destination', id: origin.id }} + linkedTrainType="anterior" + linkedOpId={origin.id} />
@@ -165,13 +161,10 @@ const StdcmConfig = ({ - } - className="posterior-linked-path" - linkedOp={{ extremityType: 'origin', id: destination.id }} + linkedTrainType="posterior" + linkedOpId={destination.id} />
{ - const { t } = useTranslation('stdcm'); - const [displayLinkedPathSearch, setShowLinkedPathSearch] = useState(false); - - const { - displaySearchButton, - launchTrainScheduleSearch, - linkedPathDate, - linkedPathResults, - resetLinkedPathSearch, - selectableSlot, - setDisplaySearchButton, - setLinkedPathDate, - setTrainNameInput, - trainNameInput, - } = useLinkedPathSearch(); - - const removeLinkedPathCard = () => { - setShowLinkedPathSearch(false); - resetLinkedPathSearch(); - }; - - return ( -
- {!displayLinkedPathSearch ? ( - setShowLinkedPathSearch(true)} - /> - ) : ( - - {t('translation:common.delete').toLowerCase()} - - } - className="linked-path" - > -
- { - setDisplaySearchButton(true); - setTrainNameInput(e.target.value); - }} - label="N°" - /> - { - setDisplaySearchButton(true); - setLinkedPathDate(date); - }} - /> -
- {displaySearchButton && ( - - )} - {!displaySearchButton && !linkedPathResults && ( -
- -
- )} - {linkedPathResults && - (linkedPathResults.length > 0 ? ( - - ) : ( -

{t('noCorrespondingResults')}

- ))} -
- )} -
- ); -}; - -export default StdcmLinkedPathSearch; diff --git a/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathResults.tsx b/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedTrainResults.tsx similarity index 58% rename from front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathResults.tsx rename to front/src/applications/stdcm/components/StdcmForm/StdcmLinkedTrainResults.tsx index 2f4b12af85a..0a7e2b53826 100644 --- a/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathResults.tsx +++ b/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedTrainResults.tsx @@ -5,52 +5,52 @@ import { useDispatch } from 'react-redux'; import { useOsrdConfActions } from 'common/osrdContext'; import type { StdcmConfSliceActions } from 'reducers/osrdconf/stdcmConf'; -import type { StdcmLinkedPathResult, ExtremityPathStepType } from '../../types'; +import type { StdcmLinkedTrainResult, ExtremityPathStepType } from '../../types'; -type StdcmLinkedPathResultsProps = { - linkedPathResults: StdcmLinkedPathResult[]; +type StdcmLinkedTrainResultsProps = { + linkedTrainResults: StdcmLinkedTrainResult[]; linkedOp: { extremityType: ExtremityPathStepType; id: string }; }; -const StdcmLinkedPathResults = ({ - linkedPathResults, +const StdcmLinkedTrainResults = ({ + linkedTrainResults, linkedOp: { extremityType, id }, -}: StdcmLinkedPathResultsProps) => { +}: StdcmLinkedTrainResultsProps) => { const dispatch = useDispatch(); - const { updateLinkedPathStep } = useOsrdConfActions() as StdcmConfSliceActions; + const { updateLinkedTrainExtremity } = useOsrdConfActions() as StdcmConfSliceActions; return ( -
- {linkedPathResults.map(({ trainName, origin, destination }, index) => ( +
+ {linkedTrainResults.map(({ trainName, origin, destination }, index) => ( + } + className="linked-train" + > +
+ { + setDisplaySearchButton(true); + setTrainNameInput(e.target.value); + }} + label="N°" + /> + { + setDisplaySearchButton(true); + setLinkedTrainDate(date); + }} + /> +
+ {displaySearchButton && ( + + )} + {!displaySearchButton && !linkedTrainResults && ( +
+ +
+ )} + {linkedTrainResults && + (linkedTrainResults.length > 0 ? ( + + ) : ( +

{t('noCorrespondingResults')}

+ ))} + + )} +
+ ); +}; + +export default StdcmLinkedTrainSearch; diff --git a/front/src/applications/stdcm/components/StdcmResults/SimulationReportSheet.tsx b/front/src/applications/stdcm/components/StdcmResults/SimulationReportSheet.tsx index 333b79d99e6..bad191ef466 100644 --- a/front/src/applications/stdcm/components/StdcmResults/SimulationReportSheet.tsx +++ b/front/src/applications/stdcm/components/StdcmResults/SimulationReportSheet.tsx @@ -36,7 +36,7 @@ const getArrivalTime = (step: StdcmPathStep, t: TFunction) => { }; const SimulationReportSheet = ({ - stdcmLinkedPaths, + stdcmLinkedTrains, stdcmData, consist, simulationReportSheetNumber, @@ -47,7 +47,7 @@ const SimulationReportSheet = ({ let renderedIndex = 0; const { rollingStock, speedLimitByTag, departure_time: departureTime, creationDate } = stdcmData; - const { anteriorPath, posteriorPath } = stdcmLinkedPaths; + const { anteriorTrain, posteriorTrain } = stdcmLinkedTrains; const convoyMass = consist?.totalMass ?? rollingStock.mass / 1000; const convoyLength = consist?.totalLength ?? rollingStock.length; @@ -168,11 +168,11 @@ const SimulationReportSheet = ({ {t('from')} - {anteriorPath?.trainName || fakeInformation.path_number1} + {anteriorTrain?.trainName || fakeInformation.path_number1} - {anteriorPath && - t('scheduledArrival', { date: anteriorPath.date, time: anteriorPath.time })} + {anteriorTrain && + t('scheduledArrival', { date: anteriorTrain.date, time: anteriorTrain.time })} @@ -237,11 +237,11 @@ const SimulationReportSheet = ({ {/* TODO: Add path number and date from reference path when it becomes avalaible */} - {posteriorPath && - t('scheduledDeparture', { date: posteriorPath.date, time: posteriorPath.time })} + {posteriorTrain && + t('scheduledDeparture', { date: posteriorTrain.date, time: posteriorTrain.time })} - {posteriorPath?.trainName || fakeInformation.path_number2} + {posteriorTrain?.trainName || fakeInformation.path_number2} {t('for')} diff --git a/front/src/applications/stdcm/components/StdcmResults/StdcmResults.tsx b/front/src/applications/stdcm/components/StdcmResults/StdcmResults.tsx index 98f13b1bdeb..b0db7555683 100644 --- a/front/src/applications/stdcm/components/StdcmResults/StdcmResults.tsx +++ b/front/src/applications/stdcm/components/StdcmResults/StdcmResults.tsx @@ -101,7 +101,7 @@ const StcdmResults = ({ { +const useLinkedTrainSearch = () => { const [postSearch] = osrdEditoastApi.endpoints.postSearch.useMutation(); const [postTrainScheduleSimulationSummary] = osrdEditoastApi.endpoints.postTrainScheduleSimulationSummary.useLazyQuery(); @@ -38,8 +38,8 @@ const useLinkedPathSearch = () => { const [displaySearchButton, setDisplaySearchButton] = useState(true); const [trainNameInput, setTrainNameInput] = useState(''); - const [linkedPathDate, setLinkedPathDate] = useState(selectableSlot.start); - const [linkedPathResults, setLinkedPathResults] = useState(); + const [linkedTrainDate, setLinkedTrainDate] = useState(selectableSlot.start); + const [linkedTrainResults, setLinkedTrainResults] = useState(); const getExtremityDetails = useCallback( async (pathItem: PathItem) => { @@ -87,10 +87,10 @@ const useLinkedPathSearch = () => { ); const launchTrainScheduleSearch = useCallback(async () => { - setLinkedPathResults(undefined); + setLinkedTrainResults(undefined); if (!trainNameInput) return; - setDisplaySearchButton(false); + setLinkedTrainResults([]); try { const results = (await postSearch({ searchPayload: { @@ -104,12 +104,12 @@ const useLinkedPathSearch = () => { pageSize: 25, }).unwrap()) as SearchResultItemTrainSchedule[]; const filteredResults = results.filter((result) => - isEqualDate(linkedPathDate, new Date(result.start_time)) + isEqualDate(linkedTrainDate, new Date(result.start_time)) ); if (!filteredResults.length) { setDisplaySearchButton(true); - setLinkedPathResults([]); + setLinkedTrainResults([]); return; } @@ -136,39 +136,38 @@ const useLinkedPathSearch = () => { }; }) ); - setLinkedPathResults(compact(newLinkedPathResults)); + setLinkedTrainResults(compact(newLinkedPathResults)); } catch (error) { console.error('Train schedule search failed:', error); setDisplaySearchButton(true); } - }, [postSearch, trainNameInput, timetableId, linkedPathDate, getExtremityDetails]); + }, [postSearch, trainNameInput, timetableId, linkedTrainDate, getExtremityDetails]); - const resetLinkedPathSearch = () => { + const resetLinkedTrainSearch = () => { setDisplaySearchButton(true); - setLinkedPathResults(undefined); + setLinkedTrainResults(undefined); setTrainNameInput(''); }; useEffect(() => { - if (!isArrivalDateInSearchTimeWindow(linkedPathDate, searchDatetimeWindow)) { - setLinkedPathDate(selectableSlot.start); - resetLinkedPathSearch(); + if (!isArrivalDateInSearchTimeWindow(linkedTrainDate, searchDatetimeWindow)) { + setLinkedTrainDate(selectableSlot.start); + resetLinkedTrainSearch(); } }, [selectableSlot]); return { displaySearchButton, launchTrainScheduleSearch, - linkedPathDate, - linkedPathResults, - resetLinkedPathSearch, + linkedTrainDate, + linkedTrainResults, + resetLinkedTrainSearch, selectableSlot, setDisplaySearchButton, - setLinkedPathDate, - setLinkedPathResults, + setLinkedTrainDate, setTrainNameInput, trainNameInput, }; }; -export default useLinkedPathSearch; +export default useLinkedTrainSearch; diff --git a/front/src/applications/stdcm/hooks/useStdcmForm.ts b/front/src/applications/stdcm/hooks/useStdcmForm.ts index 92ea77c1774..fb3a38c2b76 100644 --- a/front/src/applications/stdcm/hooks/useStdcmForm.ts +++ b/front/src/applications/stdcm/hooks/useStdcmForm.ts @@ -17,7 +17,7 @@ const useStdcmForm = (): StdcmSimulationInputs => { getTotalMass, getTotalLength, getMaxSpeed, - getLinkedPaths, + getLinkedTrains, getStdcmOrigin, } = useOsrdConfSelectors() as StdcmConfSelectors; @@ -26,7 +26,7 @@ const useStdcmForm = (): StdcmSimulationInputs => { const totalMass = useSelector(getTotalMass); const totalLength = useSelector(getTotalLength); const maxSpeed = useSelector(getMaxSpeed); - const linkedPaths = useSelector(getLinkedPaths); + const linkedTrains = useSelector(getLinkedTrains); const origin = useSelector(getStdcmOrigin); const { rollingStock } = useStoreDataForRollingStockSelector(); const towedRollingStock = useStdcmTowedRollingStock(); @@ -46,7 +46,7 @@ const useStdcmForm = (): StdcmSimulationInputs => { maxSpeed, speedLimitByTag, }, - linkedPaths, + linkedTrains, }; }, [ pathSteps, @@ -56,7 +56,7 @@ const useStdcmForm = (): StdcmSimulationInputs => { totalMass, totalLength, maxSpeed, - linkedPaths, + linkedTrains, ]); return currentSimulationInputs; diff --git a/front/src/applications/stdcm/types.ts b/front/src/applications/stdcm/types.ts index a6cc34dc312..123dc5aa4d8 100644 --- a/front/src/applications/stdcm/types.ts +++ b/front/src/applications/stdcm/types.ts @@ -52,7 +52,7 @@ export type StdcmPathProperties = { }; export type SimulationReportSheetProps = { - stdcmLinkedPaths: LinkedPaths; + stdcmLinkedTrains: LinkedTrains; stdcmData: StdcmSuccessResponse; consist: StdcmSimulationInputs['consist']; simulationReportSheetNumber: string; @@ -79,13 +79,13 @@ export type StdcmResults = { spaceTimeData: TrainSpaceTimeData[] | null; }; -export type LinkedPaths = { - anteriorPath?: { +export type LinkedTrains = { + anteriorTrain?: { date: string; time: string; trainName: string; }; - posteriorPath?: { + posteriorTrain?: { date: string; time: string; trainName: string; @@ -121,7 +121,7 @@ export type StdcmSimulationInputs = { maxSpeed?: number; speedLimitByTag?: string; }; - linkedPaths: LinkedPaths; + linkedTrains: LinkedTrains; }; export type StdcmResultsOutput = { @@ -180,7 +180,7 @@ export enum StdcmStopTypes { SERVICE_STOP = 'serviceStop', } -export type StdcmLinkedPathStep = { +export type StdcmLinkedTrainExtremity = { ch: string; date: string; geographic: GeoJsonPoint; @@ -192,9 +192,9 @@ export type StdcmLinkedPathStep = { uic: number; }; -export type StdcmLinkedPathResult = { - destination: StdcmLinkedPathStep; - origin: StdcmLinkedPathStep; +export type StdcmLinkedTrainResult = { + destination: StdcmLinkedTrainExtremity; + origin: StdcmLinkedTrainExtremity; trainName: string; }; @@ -204,3 +204,5 @@ export type LoaderStatus = { status: 'loader-fixed-bottom' | 'loader-fixed-top' | 'loader-absolute'; firstLaunch: boolean; }; + +export type LinkedTrainType = 'anterior' | 'posterior'; diff --git a/front/src/reducers/osrdconf/stdcmConf/index.ts b/front/src/reducers/osrdconf/stdcmConf/index.ts index ac1629ee922..be8576ee1e5 100644 --- a/front/src/reducers/osrdconf/stdcmConf/index.ts +++ b/front/src/reducers/osrdconf/stdcmConf/index.ts @@ -6,7 +6,7 @@ import { ArrivalTimeTypes, StdcmStopTypes, type ExtremityPathStepType, - type StdcmLinkedPathStep, + type StdcmLinkedTrainExtremity, } from 'applications/stdcm/types'; import { defaultCommonConf, buildCommonConfReducers } from 'reducers/osrdconf/osrdConfCommon'; import type { OsrdStdcmConfState, StdcmPathStep } from 'reducers/osrdconf/types'; @@ -35,9 +35,9 @@ export const stdcmConfInitialState: OsrdStdcmConfState = { totalLength: undefined, maxSpeed: undefined, towedRollingStockID: undefined, - linkedPaths: { - anteriorPath: undefined, - posteriorPath: undefined, + linkedTrains: { + anteriorTrain: undefined, + posteriorTrain: undefined, }, ...defaultCommonConf, }; @@ -167,16 +167,16 @@ export const stdcmConfSlice = createSlice({ (pathStep) => pathStep.id !== action.payload ); }, - updateLinkedPathStep( + updateLinkedTrainExtremity( state: Draft, action: PayloadAction<{ - linkedPathStep: ExtremityPathStepType; + linkedTrainExtremity: ExtremityPathStepType; trainName: string; - pathStep: StdcmLinkedPathStep; + pathStep: StdcmLinkedTrainExtremity; pathStepId: string; }> ) { - const { linkedPathStep, trainName, pathStep, pathStepId } = action.payload; + const { linkedTrainExtremity, trainName, pathStep, pathStepId } = action.payload; const { name, ch, uic, geographic, isoArrivalTime, date, time } = pathStep; const newPathStep = { name, @@ -185,15 +185,15 @@ export const stdcmConfSlice = createSlice({ uic, coordinates: geographic.coordinates, arrival: isoArrivalTime, - ...(linkedPathStep === 'origin' && { arrivalType: ArrivalTimeTypes.PRECISE_TIME }), + ...(linkedTrainExtremity === 'origin' && { arrivalType: ArrivalTimeTypes.PRECISE_TIME }), }; - const newLinkedPath = { date, time, trainName }; + const newLinkedTrain = { date, time, trainName }; - if (linkedPathStep === 'destination') { - state.linkedPaths.anteriorPath = newLinkedPath; + if (linkedTrainExtremity === 'destination') { + state.linkedTrains.anteriorTrain = newLinkedTrain; } else { - state.linkedPaths.posteriorPath = newLinkedPath; + state.linkedTrains.posteriorTrain = newLinkedTrain; } const newPathSteps = state.stdcmPathSteps.map((step) => step.id === action.payload.pathStepId diff --git a/front/src/reducers/osrdconf/stdcmConf/selectors.ts b/front/src/reducers/osrdconf/stdcmConf/selectors.ts index 2fb61f6ced2..d3909c675cb 100644 --- a/front/src/reducers/osrdconf/stdcmConf/selectors.ts +++ b/front/src/reducers/osrdconf/stdcmConf/selectors.ts @@ -34,7 +34,7 @@ const buildStdcmConfSelectors = () => { } return destination!; }, - getLinkedPaths: makeOsrdConfSelector('linkedPaths'), + getLinkedTrains: makeOsrdConfSelector('linkedTrains'), }; }; diff --git a/front/src/reducers/osrdconf/types.ts b/front/src/reducers/osrdconf/types.ts index 2edfc71cfb2..df9707e15b9 100644 --- a/front/src/reducers/osrdconf/types.ts +++ b/front/src/reducers/osrdconf/types.ts @@ -4,7 +4,7 @@ import type { PowerRestriction } from 'applications/operationalStudies/types'; import type { AllowanceValue, ArrivalTimeTypes, - LinkedPaths, + LinkedTrains, StdcmStopTypes, } from 'applications/stdcm/types'; import type { @@ -58,7 +58,7 @@ export interface OsrdStdcmConfState extends OsrdConfState { totalLength?: number; maxSpeed?: number; towedRollingStockID?: number; - linkedPaths: LinkedPaths; + linkedTrains: LinkedTrains; } export type PathStep = PathItemLocation & { diff --git a/front/src/styles/scss/applications/_stdcm.scss b/front/src/styles/scss/applications/_stdcm.scss index 5754dda8889..5863755ff51 100644 --- a/front/src/styles/scss/applications/_stdcm.scss +++ b/front/src/styles/scss/applications/_stdcm.scss @@ -3,6 +3,6 @@ @import 'stdcm/header'; @import 'stdcm/helpModule'; @import 'stdcm/home'; -@import 'stdcm/linkedPath'; +@import 'stdcm/linkedTrain'; @import 'stdcm/loader'; @import 'stdcm/results'; diff --git a/front/src/styles/scss/applications/stdcm/_card.scss b/front/src/styles/scss/applications/stdcm/_card.scss index 3dc7b082ed0..fb25345aa26 100644 --- a/front/src/styles/scss/applications/stdcm/_card.scss +++ b/front/src/styles/scss/applications/stdcm/_card.scss @@ -63,8 +63,8 @@ .stdcm-card__body { padding: 14px 24px 24px 8px; - &.add-linked-path, - &.linked-path { + &.add-linked-train, + &.linked-train { width: 450px; padding: 11px 8px 13px; } diff --git a/front/src/styles/scss/applications/stdcm/_linkedPath.scss b/front/src/styles/scss/applications/stdcm/_linkedTrain.scss similarity index 85% rename from front/src/styles/scss/applications/stdcm/_linkedPath.scss rename to front/src/styles/scss/applications/stdcm/_linkedTrain.scss index d42c015a1aa..5d4ec6b09a2 100644 --- a/front/src/styles/scss/applications/stdcm/_linkedPath.scss +++ b/front/src/styles/scss/applications/stdcm/_linkedTrain.scss @@ -1,11 +1,11 @@ -.stdcm-linked-path-search-container { +.stdcm-linked-train-search-container { align-self: flex-end; - &.anterior-linked-path { + &.anterior-linked-train { margin-bottom: 18px; } - &.posterior-linked-path { + &.posterior-linked-train { margin-block: 18px 32px; } @@ -25,8 +25,8 @@ } } - .linked-path { - .stdcm-linked-path-button { + .linked-train { + .stdcm-linked-train-button { text-align: center; width: 402px; height: 40px; @@ -37,18 +37,18 @@ &.white { background-color: var(--white); } - .stdcm-linked-path-loading { + .stdcm-linked-train-loading { color: var(--primary90); align-self: center; } } - .stdcm-linked-path-results { + .stdcm-linked-train-results { padding: 10px 17px 0; border-top: 1px solid var(--grey20); margin-top: 21px; - .linked-path-result-infos { + .linked-train-result-infos { width: 100%; margin-bottom: 7px;