Changes to staff :DB

This commit is contained in:
Fred Boniface 2023-07-07 11:44:20 +01:00
parent c0997e92d4
commit e3f47dc43a

View File

@ -87,8 +87,7 @@
isDelayed: service?.arrivalType === 'Delayed',
isArrDelayed: service?.arrivalType === 'Delayed',
isDepDelayed: service?.departureType === 'Delayed',
isEarly: false,
isNonPublic: false
isNonPublic: service?.isPassengerService === "false" ? true : false
};
return serviceData;
}
@ -243,15 +242,12 @@
<td colspan="8"> Loading... </td>
</tr>
{:then serviceStats}
<!-- Await a 'Generate Stats' function here which can evaluate the data and provide
relevant BOOLs like isCancelled, isEarly, isLate, isNonPassenger and calculate train length
where 'length' is not provided but 'formation' is. -->
<tr>
<tr class="{serviceStats.isCancelled && 'can-dat'}">
<td class="id id-data data">{service.trainid}</td>
<td class="from from-data data {serviceStats.isCancelled && 'can-dat'}">{serviceStats.from}</td>
<td class="to to-data data {serviceStats.isCancelled && 'can-dat'}">{serviceStats.to}</td>
<td class="plat plat-data data {serviceStats.isCancelled && 'can-dat'} {serviceStats.platformHidden && 'hidden'}">{serviceStats.platform.number || '-'}</td>
<td class="time time-data data {serviceStats.isCancelled && 'can-dat'}">{serviceStats.schArr}</td>
<td class="from from-data data {serviceStats.isCancelled && 'can-dat'} {serviceStats.isNonPublic && 'ecs'}">{serviceStats.from}</td>
<td class="to to-data data {serviceStats.isCancelled && 'can-dat'} {serviceStats.isNonPublic && 'ecs'}">{serviceStats.to}</td>
<td class="plat plat-data data {serviceStats.platformHidden && 'hidden'}">{serviceStats.platform.number || '-'}</td>
<td class="time time-data data">{serviceStats.schArr}</td>
<td class="time time-data data {serviceStats.isArrDelayed && 'late'} {serviceStats.isEarlyArr && 'early'} {serviceStats.isLateArr && 'late'}"
>{serviceStats.isArrDelayed ? 'LATE' : serviceStats.expArr}</td
>
@ -343,6 +339,10 @@
color: grey;
}
.ecs {
opacity: 0.75;
}
.can-time {
animation: pulse-cancel 1.5s linear infinite;
}