From c5201326a128264f9754fcdbcb80135b6e14ef44 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Wed, 30 Aug 2023 19:09:02 +0100 Subject: [PATCH] Remove original table-generator and staff-ldb components --- src/lib/ldb/staff/staff-ldb-dev.svelte | 135 ------ src/lib/ldb/staff/staff-ldb.svelte | 217 +--------- .../ldb/staff/table/table-generator.svelte | 404 +++++------------- .../staff/table/table-generator_dev.svelte | 313 -------------- 4 files changed, 117 insertions(+), 952 deletions(-) delete mode 100644 src/lib/ldb/staff/staff-ldb-dev.svelte delete mode 100644 src/lib/ldb/staff/table/table-generator_dev.svelte diff --git a/src/lib/ldb/staff/staff-ldb-dev.svelte b/src/lib/ldb/staff/staff-ldb-dev.svelte deleted file mode 100644 index 2ac0ee8..0000000 --- a/src/lib/ldb/staff/staff-ldb-dev.svelte +++ /dev/null @@ -1,135 +0,0 @@ - - -{#key detail} - {#if detail.show} - - {/if} -{/key} - -{#if isLoading} - -{:else if isErr} - -

{errMsg}

-
-{:else} - {#if alerts.length} - - {/if} -

Data from: {dataAge.toLocaleString([])}

- {#if trainServices && trainServices.length} - - {:else} -

There are no scheduled train services in the next two hours

- {/if} - {#if busServices && busServices.length} - -
- Bus Services - - {/if} - {#if ferryServices && ferryServices.length} - -
- Ferry Services - - {/if} -{/if} - - diff --git a/src/lib/ldb/staff/staff-ldb.svelte b/src/lib/ldb/staff/staff-ldb.svelte index 2ddda0f..a584d68 100644 --- a/src/lib/ldb/staff/staff-ldb.svelte +++ b/src/lib/ldb/staff/staff-ldb.svelte @@ -1,220 +1,5 @@ - -{#key detail} - {#if detail.show} - - {/if} -{/key} -{#if isLoading} - -{:else if isErr} - -

{errMsg}

-
-{:else} - {#if alerts.length} - - {/if} -

Data from: {dataAge.toLocaleString([])}

- {#if trainServices && trainServices.length} - - {:else} -

There are no scheduled train services in the next two hours

- {/if} - {#if busServices && busServices.length} - -
- Bus Services - - {/if} - {#if ferryServices && ferryServices.length} - -
- Ferry Services - - {/if} -{/if} - - diff --git a/src/lib/ldb/staff/table/table-generator.svelte b/src/lib/ldb/staff/table/table-generator.svelte index f60df89..a6c3cc7 100644 --- a/src/lib/ldb/staff/table/table-generator.svelte +++ b/src/lib/ldb/staff/table/table-generator.svelte @@ -1,155 +1,90 @@ -

Your display is too small to view this data

@@ -170,51 +105,43 @@ Departure {#each services as service} - {#await generateServiceData(service)} - Loading Service Data... - {:then serviceData} - detail(event, service.rid, service.uid, service.trainid)} - on:keypress={(event) => detail(event, service.rid, service.uid, service.trainid)} - > - {service.trainid} - {serviceData.from} - {serviceData.to} - {serviceData.platform.number || '-'} - {serviceData.schArr} - {serviceData.isArrDelayed ? 'LATE' : serviceData.expArr} - {serviceData.schDep} - {serviceData.isDepDelayed ? 'LATE' : serviceData.expDep} - - - - {tocMap.get(service.operatorCode.toLowerCase()) || service.operatorCode} - {#if service.isCharter}charter{/if} - {#if serviceData.length} | {serviceData.length} carriages{/if} - {#if service.delayReason} -
- - {/if} - {#if service.cancelReason} -
- - {/if} - - - {:catch} - - Unable to display service - - {/await} + detail(event, service.rid, service.uid, service.trainid)} + on:keypress={(event) => detail(event, service.rid, service.uid, service.trainid)} + > + {#await classGenerator(service) then classes} + {service.trainid} + {#await formatLocations(service.origin) then txt}{txt}{/await} + {#await formatLocations(service.destination) then txt}{txt}{/await} + {service.platform || '-'} + {service.sta || '-'} + + {service.eta || service.ata || '-'} + + {service.std || '-'} + + {service.etd || service.atd || '-'} + + {/await} + + + + {tocMap.get(service.operatorCode.toLowerCase()) || service.operatorCode} + {#if service.length} | {service.length} carriages{/if} + {#if service.delayReason} +
+ + {/if} + {#if service.cancelReason} +
+ + {/if} + + + + Unable to display service + {/each} @@ -383,103 +310,4 @@ color: rgb(136, 164, 255); } } - - /* CARRIED OVER FROM OLD COMPONENT: - - #timestamp { - color: var(--second-text-color); - } - - .transport-mode { - width: 30px; - margin: auto; - } - - .dataTable { - color: white; - font-weight: normal; - width: 100%; - margin: 0px, 0px; - padding-left: 8px; - padding-right: 8px; - } - - .id { - width: 12%; - } - - .from { - width: 20%; - } - - .to { - width: 20%; - } - - .plat { - width: 8%; - } - - .timePair { - width: 20%; - } - - .time { - width: 10%; - } - - .data { - font-weight: normal; - } - - .id-data { - color: lightgray; - text-align: left; - } - - .from-data, - .to-data { - color: yellow; - text-decoration: none; - text-align: left; - } - - .text-row { - margin-top: 0px; - padding-bottom: 5px; - width: 100%; - } - - .text-data { - text-align: left; - color: cyan; - font-size: smaller; - } - - .can-dat { - color: grey; - text-decoration: line-through; - } - - .hidden { - opacity: 0.5; - } - - .ecs { - opacity: 0.75; - } - - .can-time { - animation: pulse-cancel 1.5s linear infinite; - } - - .early { - animation: pulse-early 1.5s linear infinite; - } - - .late { - animation: pulse-late 1.5s linear infinite; - } - - */ diff --git a/src/lib/ldb/staff/table/table-generator_dev.svelte b/src/lib/ldb/staff/table/table-generator_dev.svelte deleted file mode 100644 index a6c3cc7..0000000 --- a/src/lib/ldb/staff/table/table-generator_dev.svelte +++ /dev/null @@ -1,313 +0,0 @@ - - -

Your display is too small to view this data

- - - - - - - - - - - - - - - - {#each services as service} - detail(event, service.rid, service.uid, service.trainid)} - on:keypress={(event) => detail(event, service.rid, service.uid, service.trainid)} - > - {#await classGenerator(service) then classes} - - - - - - - - - - - - - {/await} - - - - - - - - {/each} -
IDFromToPlatSchExpSchExp
- ArrivalDeparture
{service.trainid}{#await formatLocations(service.origin) then txt}{txt}{/await}{#await formatLocations(service.destination) then txt}{txt}{/await}{service.platform || '-'}{service.sta || '-'}{service.eta || service.ata || '-'}{service.std || '-'}{service.etd || service.atd || '-'}
- {tocMap.get(service.operatorCode.toLowerCase()) || service.operatorCode} - {#if service.length} | {service.length} carriages{/if} - {#if service.delayReason} -
- - {/if} - {#if service.cancelReason} -
- - {/if} -
Unable to display service
- -