From 53c2562b70cd137bfadc40639e6af9f4e721d91f Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Wed, 27 Sep 2023 19:40:22 +0100 Subject: [PATCH] Add NRCC to new board --- src/lib/ldb/staff/staff-ldb.svelte | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/ldb/staff/staff-ldb.svelte b/src/lib/ldb/staff/staff-ldb.svelte index 04ebab8..e4f994b 100644 --- a/src/lib/ldb/staff/staff-ldb.svelte +++ b/src/lib/ldb/staff/staff-ldb.svelte @@ -5,6 +5,7 @@ import { detailInit, defineDetail } from './train-detail'; import TrainDetail from './train-detail.svelte'; import { fetchStaffLdb } from './fetch'; + import AlertBar from '../nrcc/alert-bar.svelte'; export let station: string; export let title: string | undefined = 'Loading...'; @@ -13,6 +14,7 @@ code: '', message: '', }; + let nrcc: string[] = []; let detail = detailInit(); function hideDetail() { @@ -28,6 +30,11 @@ const data = await fetchStaffLdb(station); if (data.data) { title = data.data.locationName; + if (data.data?.nrccMessages) { + for (const msg of data.data.nrccMessages) { + nrcc.push(msg.xhtmlMessage); + } + } return data.data; } errorDetail.code = data.obStatus.toString() || "UNKNOWN"; @@ -60,6 +67,9 @@ Ferry Services {/if} + {#if nrcc.length} + + {/if} {/if} {:catch}