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

View File

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