From d10b2e3d8d9dbb5535c2288aa16b1637f91bfe2f Mon Sep 17 00:00:00 2001 From: theocrsb Date: Fri, 29 Nov 2024 15:21:02 +0100 Subject: [PATCH] front: match the width and spacing of the results table to the mockup Signed-off-by: theocrsb --- .../StdcmResults/StdcmResultsTable.tsx | 10 +++---- .../styles/scss/applications/stdcm/_home.scss | 2 +- .../scss/applications/stdcm/_results.scss | 26 +++++++++++++------ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/front/src/applications/stdcm/components/StdcmResults/StdcmResultsTable.tsx b/front/src/applications/stdcm/components/StdcmResults/StdcmResultsTable.tsx index 61509086f78..b4062d0a050 100644 --- a/front/src/applications/stdcm/components/StdcmResults/StdcmResultsTable.tsx +++ b/front/src/applications/stdcm/components/StdcmResults/StdcmResultsTable.tsx @@ -39,9 +39,9 @@ const StcdmResultsTable = ({ {t('operationalPoint')} {t('code')} - {t('endStop')} - {t('passageStop')} - {t('startStop')} + {t('endStop')} + {t('passageStop')} + {t('startStop')} {t('weight')} {t('refEngine')} @@ -73,7 +73,7 @@ const StcdmResultsTable = ({ > {index + 1} - + {isNotExtremity && !isRequestedPathStep && step.name === prevStep.name && @@ -109,7 +109,7 @@ const StcdmResultsTable = ({ {isNotExtremity ? '=' : `${Math.floor(mass)}t`} - + {isNotExtremity ? '=' : stdcmData.rollingStock.metadata?.reference} diff --git a/front/src/styles/scss/applications/stdcm/_home.scss b/front/src/styles/scss/applications/stdcm/_home.scss index 84c15be6ad9..c0c0bb19d49 100644 --- a/front/src/styles/scss/applications/stdcm/_home.scss +++ b/front/src/styles/scss/applications/stdcm/_home.scss @@ -210,7 +210,7 @@ box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75) inset, 0 0 0 1px rgba(0, 0, 0, 0.25) inset; - margin-left: 48px; + margin-left: 32px; width: 100%; min-width: 450px; height: calc(100vh - 64px); diff --git a/front/src/styles/scss/applications/stdcm/_results.scss b/front/src/styles/scss/applications/stdcm/_results.scss index f524c2524cb..fbba17c0c48 100644 --- a/front/src/styles/scss/applications/stdcm/_results.scss +++ b/front/src/styles/scss/applications/stdcm/_results.scss @@ -143,13 +143,13 @@ .results-and-sheet { display: flex; flex-direction: column; - width: 70%; .table-container::-webkit-scrollbar { display: none; /* Safari and Chrome */ } .table-container { + width: 804px; margin-right: 32px; .table-results { @@ -172,6 +172,9 @@ padding-bottom: 5px; vertical-align: middle; } + .head-stop { + text-align: center; + } th:last-child { text-transform: none; } @@ -190,20 +193,23 @@ vertical-align: middle; } .index { - padding-left: 32px; + width: 64px; + text-align: end; + padding-right: 24px; } - .pr { - padding-right: 199px; + .name { + width: 232; } .ch { - padding-right: 36px; + width: 56px; } .stop { font-size: 0.875rem; font-weight: 600; color: rgb(0, 0, 0); line-height: 20px; - width: 75px; + width: 72px; + text-align: center; } .stop-with-duration { font-size: 0.875rem; @@ -216,13 +222,17 @@ text-align: center; } .weight { - padding-left: 33px; - color: '#797671'; + width: 128px; + padding-left: 40px; &.lastStep { color: '#797671'; } } + .ref { + width: 108px; + } + .semi-bold-output { font-weight: 600; }