From c6daa017cfaf91e485cc2fff5890c1f5cd4be46e Mon Sep 17 00:00:00 2001 From: SarahBellaha Date: Thu, 5 Dec 2024 08:32:09 +0100 Subject: [PATCH] front: lmr: linked path adjustments Signed-off-by: SarahBellaha --- .../stdcm/components/StdcmForm/StdcmLinkedPathSearch.tsx | 1 + front/src/applications/stdcm/hooks/useLinkedPathSearch.ts | 1 + front/src/applications/stdcm/hooks/useStdcmEnv.tsx | 2 +- front/src/styles/scss/applications/stdcm/_linkedPath.scss | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathSearch.tsx b/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathSearch.tsx index ac38f698c1a..4a12d01b864 100644 --- a/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathSearch.tsx +++ b/front/src/applications/stdcm/components/StdcmForm/StdcmLinkedPathSearch.tsx @@ -90,6 +90,7 @@ const StdcmLinkedPathSearch = ({ selectableSlot={selectableSlot} value={linkedPathDate} onDateChange={(date) => { + setDisplaySearchButton(true); setLinkedPathDate(date); }} /> diff --git a/front/src/applications/stdcm/hooks/useLinkedPathSearch.ts b/front/src/applications/stdcm/hooks/useLinkedPathSearch.ts index 355b1734aa4..8876a593f84 100644 --- a/front/src/applications/stdcm/hooks/useLinkedPathSearch.ts +++ b/front/src/applications/stdcm/hooks/useLinkedPathSearch.ts @@ -109,6 +109,7 @@ const useLinkedPathSearch = () => { if (!filteredResults.length) { setDisplaySearchButton(true); + setLinkedPathResults([]); return; } diff --git a/front/src/applications/stdcm/hooks/useStdcmEnv.tsx b/front/src/applications/stdcm/hooks/useStdcmEnv.tsx index 01495c98cad..82f2a435eb6 100644 --- a/front/src/applications/stdcm/hooks/useStdcmEnv.tsx +++ b/front/src/applications/stdcm/hooks/useStdcmEnv.tsx @@ -31,7 +31,7 @@ export default function useStdcmEnvironment() { workScheduleGroupId: data.work_schedule_group_id, temporarySpeedLimitGroupId: data.temporary_speed_limit_group_id, searchDatetimeWindow: { - begin: new Date(data.search_window_begin), + begin: new Date(`${data.search_window_begin}Z`), // TODO: Remove this temporary fix when editoast returns the date in UTC end: new Date(data.search_window_end), }, }) diff --git a/front/src/styles/scss/applications/stdcm/_linkedPath.scss b/front/src/styles/scss/applications/stdcm/_linkedPath.scss index d94595e1ac9..d42c015a1aa 100644 --- a/front/src/styles/scss/applications/stdcm/_linkedPath.scss +++ b/front/src/styles/scss/applications/stdcm/_linkedPath.scss @@ -58,9 +58,11 @@ } .train-name { + font-weight: 500; font-size: 1rem; padding-top: 4px; margin-bottom: 4px; + text-align: start; } .opDetails { font-size: 0.875rem;