Fix public-ldb for multiple origin/destination

This commit is contained in:
Fred Boniface 2023-06-21 16:04:58 +01:00
parent 7eaaa1034a
commit b54b99aa21
2 changed files with 20 additions and 4 deletions

View File

@ -125,8 +125,24 @@
</tr>
{#each services as service}
<tr>
<td class="origdest from">{service.origin?.location?.locationName || ''}</td>
<td class="origdest to">{service.destination?.location?.locationName || ''}</td>
<td class="origdest from">
{#if Array.isArray(service.origin?.location)}
{service.origin.location[0]['locationName'] +
" & " +
service.origin.location[1]['locationName']}
{:else}
{service.origin?.location?.locationName || ''}
{/if}
</td>
<td class="origdest to">
{#if Array.isArray(service.destination?.location)}
{service.destination.location[0]['locationName'] +
" & " +
service.destination.location[0]['locationName']}
{:else}
{service.destination?.location?.locationName || ''}
{/if}
</td>
<td class="plat">{service.platform || '-'}</td>
<td class="time">{parseTime(service.sta).data}</td>
<td class="time {parseTime(service.eta).changed}">{parseTime(service.eta).data}</td>

View File

@ -38,9 +38,9 @@ header {
top: 3px;
font-family: urwgothic, sans-serif;
font-weight: 600;
margin-top: 6px;
margin-top: 7px;
margin-left: 20px;
font-size: 17pt;
font-size: 15pt;
}
.headerBlock {