diff --git a/front/src/applications/osrd/components/DriverTrainSchedule/DriverTrainSchedule.scss b/front/src/applications/osrd/components/DriverTrainSchedule/DriverTrainSchedule.scss new file mode 100644 index 00000000000..330269d6b47 --- /dev/null +++ b/front/src/applications/osrd/components/DriverTrainSchedule/DriverTrainSchedule.scss @@ -0,0 +1,55 @@ +.container-drivertrainschedule { + max-height: 30rem; + } + + .modal-drivertrainschedule { + height: 50%; + } + + .simulation-drivertrainschedule { + max-height: 15rem; + overflow: auto; + } + + .table-drivertrainschedule, .table-drivertrainschedule th, .table-drivertrainschedule td { + border : none !important; + padding-right: 10px; + + .drivertrainschedule-pk { + text-align: right; + width: 2rem; + } + + .stoptime-container { + .box{ + width:100%; + display:table; + .box-row { + display:table-row; + } + .box-cell { + display:table-cell; + width:calc(100% / 3); + text-align:left; + position: relative; + .box-cell::after { + content: '+'; + position: absolute; + } + } + } + } + + .drivertrainschedule-stop { + font-weight: bold; + small { + font-weight: bold; + } + } + } + + .table-drivertrainschedule th, thead { + position: sticky; + top: 0; + z-index: 1; + } \ No newline at end of file diff --git a/front/src/applications/osrd/components/DriverTrainSchedule/DriverTrainScheduleHelpers.js b/front/src/applications/osrd/components/DriverTrainSchedule/DriverTrainScheduleHelpers.js index fb2a9627c12..96d4ae287f9 100644 --- a/front/src/applications/osrd/components/DriverTrainSchedule/DriverTrainScheduleHelpers.js +++ b/front/src/applications/osrd/components/DriverTrainSchedule/DriverTrainScheduleHelpers.js @@ -132,15 +132,28 @@ export default function formatStops(stop, idx, data) { stop.position, data.base.speeds ); + const pk = Math.round(stop.position / 100) / 10; const stopTime = getTime(stop.time).at(-1) === '+' ? ( - {getTime(stop.time).slice(0, -1)} + {getTime(stop.time).slice(0, -1)} ) : ( getTime(stop.time) ); - const pk = Math.round(stop.position / 100) / 10; + const departureTime = + getTime(stop.time + stop.duration).at(-1) === '+' ? ( + {getTime(stop.time + stop.duration).slice(0, -1)} + ) : ( + getTime(stop.time + stop.duration) + ); return ( -