From 7edccf294bdb36a3d797d696d39b085df48033f4 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Mon, 11 May 2026 12:04:40 +0100 Subject: [PATCH] Update table display on board page, in preparation for offering different 'table' styles. --- .../station-board/StaffServicesTable.svelte | 69 ++++++++++++++----- .../ui/station-board/StationAlertCard.svelte | 2 +- src/lib/global.css | 4 ++ src/lib/utils/time.ts | 24 +++++++ src/routes/+layout.svelte | 5 +- src/routes/board/+page.svelte | 38 +++++----- 6 files changed, 97 insertions(+), 45 deletions(-) diff --git a/src/lib/components/ui/station-board/StaffServicesTable.svelte b/src/lib/components/ui/station-board/StaffServicesTable.svelte index 26f7ec1..20c733f 100644 --- a/src/lib/components/ui/station-board/StaffServicesTable.svelte +++ b/src/lib/components/ui/station-board/StaffServicesTable.svelte @@ -1,6 +1,6 @@ -
- @@ -26,13 +24,12 @@ - {#each services as service (getRowKey(service))} - + @@ -40,46 +37,67 @@ {#if service.wtp} - + - + {:else} - + - + {/if} - - {#if service} - {@const delay = calculateDelay(service)} - - {/if} {#if service.c && service.cr?.r} - + + + + {/if} + {#if service.dr?.r} + + + {/if} {/each}
Arr Dep
IDAct Sch Act+/-
{service.h} {service.og.t} {service.dt.t}PassPass {formatUkTime(service.wtp)}{formatUkTime(service.atp || service.etp)}{formatUkTime(service.atp || service.etp)}{formatUkTime(service.sta)}{formatUkTime(service.ata || service.eta)}{formatUkTime(service.ata || service.eta)} {formatUkTime(service.std)}{formatUkTime(service.atd || service.etd)}{formatUkTime(service.atd || service.etd)}{delay.val}
{service.cr.r} + {service.cr.r} + {#if service.cr.l} + {service.cr.n ? "near" : "at"} + {service.cr.l} + {/if} +
+ {service.dr.r} + {#if service.dr.l} + {service.dr.n ? "near" : "at"} + {service.dr.l} + {/if} +
-
\ No newline at end of file diff --git a/src/lib/components/ui/station-board/StationAlertCard.svelte b/src/lib/components/ui/station-board/StationAlertCard.svelte index dd72e90..3bbe14a 100644 --- a/src/lib/components/ui/station-board/StationAlertCard.svelte +++ b/src/lib/components/ui/station-board/StationAlertCard.svelte @@ -41,7 +41,7 @@