Skip to content

Commit d10b2e3

Browse files
committed
front: match the width and spacing of the results table to the mockup
Signed-off-by: theocrsb <theo_crosbie@yahoo.fr>
1 parent c98d385 commit d10b2e3

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

front/src/applications/stdcm/components/StdcmResults/StdcmResultsTable.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ const StcdmResultsTable = ({
3939
<th aria-label="line-count" />
4040
<th>{t('operationalPoint')}</th>
4141
<th>{t('code')}</th>
42-
<th>{t('endStop')}</th>
43-
<th>{t('passageStop')}</th>
44-
<th>{t('startStop')}</th>
42+
<th className="head-stop">{t('endStop')}</th>
43+
<th className="head-stop">{t('passageStop')}</th>
44+
<th className="head-stop">{t('startStop')}</th>
4545
<th className="weight">{t('weight')}</th>
4646
<th>{t('refEngine')}</th>
4747
</tr>
@@ -73,7 +73,7 @@ const StcdmResultsTable = ({
7373
>
7474
{index + 1}
7575
</td>
76-
<td style={{ color: 'rgb(49, 46, 43)' }}>
76+
<td className="name" style={{ color: 'rgb(49, 46, 43)' }}>
7777
{isNotExtremity &&
7878
!isRequestedPathStep &&
7979
step.name === prevStep.name &&
@@ -109,7 +109,7 @@ const StcdmResultsTable = ({
109109
<td className="weight" style={{ color: !isFirstStep ? '#797671' : '#312E2B' }}>
110110
{isNotExtremity ? '=' : `${Math.floor(mass)}t`}
111111
</td>
112-
<td style={{ color: !isFirstStep ? '#797671' : '#312E2B' }}>
112+
<td className="ref" style={{ color: !isFirstStep ? '#797671' : '#312E2B' }}>
113113
{isNotExtremity ? '=' : stdcmData.rollingStock.metadata?.reference}
114114
</td>
115115
</tr>

front/src/styles/scss/applications/stdcm/_home.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
box-shadow:
211211
0 0 0 2px rgba(255, 255, 255, 0.75) inset,
212212
0 0 0 1px rgba(0, 0, 0, 0.25) inset;
213-
margin-left: 48px;
213+
margin-left: 32px;
214214
width: 100%;
215215
min-width: 450px;
216216
height: calc(100vh - 64px);

front/src/styles/scss/applications/stdcm/_results.scss

+18-8
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@
143143
.results-and-sheet {
144144
display: flex;
145145
flex-direction: column;
146-
width: 70%;
147146

148147
.table-container::-webkit-scrollbar {
149148
display: none; /* Safari and Chrome */
150149
}
151150

152151
.table-container {
152+
width: 804px;
153153
margin-right: 32px;
154154

155155
.table-results {
@@ -172,6 +172,9 @@
172172
padding-bottom: 5px;
173173
vertical-align: middle;
174174
}
175+
.head-stop {
176+
text-align: center;
177+
}
175178
th:last-child {
176179
text-transform: none;
177180
}
@@ -190,20 +193,23 @@
190193
vertical-align: middle;
191194
}
192195
.index {
193-
padding-left: 32px;
196+
width: 64px;
197+
text-align: end;
198+
padding-right: 24px;
194199
}
195-
.pr {
196-
padding-right: 199px;
200+
.name {
201+
width: 232;
197202
}
198203
.ch {
199-
padding-right: 36px;
204+
width: 56px;
200205
}
201206
.stop {
202207
font-size: 0.875rem;
203208
font-weight: 600;
204209
color: rgb(0, 0, 0);
205210
line-height: 20px;
206-
width: 75px;
211+
width: 72px;
212+
text-align: center;
207213
}
208214
.stop-with-duration {
209215
font-size: 0.875rem;
@@ -216,13 +222,17 @@
216222
text-align: center;
217223
}
218224
.weight {
219-
padding-left: 33px;
220-
color: '#797671';
225+
width: 128px;
226+
padding-left: 40px;
221227

222228
&.lastStep {
223229
color: '#797671';
224230
}
225231
}
232+
.ref {
233+
width: 108px;
234+
}
235+
226236
.semi-bold-output {
227237
font-weight: 600;
228238
}

0 commit comments

Comments
 (0)