Update train detail to include Schedule Start/End date

This commit is contained in:
Fred Boniface 2023-07-02 20:05:42 +01:00
parent 19f84501aa
commit f096544ded
1 changed files with 41 additions and 37 deletions

View File

@ -16,12 +16,13 @@
<span id="container-arrow" class:isExpanded>V</span>
</div>
{#if isExpanded}
<div class="container-detail" in:fly out:fly>
<div class="container-detail" in:fly={{ y: -20, duration: 200}}>
{#if service.pis}
<p class="pis">PIS: {service.pis}</p>
{/if}
<p class="svc-detail">Planned Type: {parseInt(service.planSpeed) || 68 }mph {service.powerType || "Bus" }</p>
<p class="svc-detail">Days Run: {service.daysRun.join(", ").toUpperCase()}</p>
<p class="svc-detail validity">Valid From: {new Date(service.scheduleStartDate).toLocaleDateString('en-GB')} - {new Date(service.scheduleEndDate).toLocaleDateString('en-GB')}</p>
<table>
<tr>
<th>Location</th>
@ -59,16 +60,16 @@
margin-bottom: 20px;
width: 95%;
max-width: 600px;
min-width: 300px;
height: auto;
background-color: var(--overlay-color);
border-radius: 10px;
transition-duration: 500ms;
overflow: hidden;
transition: height 500ms ease-in-out;
}
.container-header {
text-align: left;
padding-left: 10px;
font-size: 18px;
font-size: 14px;
font-weight: 600;
padding-top: 10px;
padding-bottom: 10px;
@ -82,7 +83,7 @@
position: absolute;
right: 16px;
top: 13px;
transition-duration: 500ms;
transition-duration: 300ms;
z-index: 2;
}
.isExpanded {
@ -100,6 +101,9 @@
margin-bottom: 2px;
color: white;
}
.validity {
font-size: 14px;
}
table {
margin: auto;
padding-top: 10px;