diff --git a/src/lib/train/train-detail.svelte b/src/lib/train/train-detail.svelte index 8fe22d3..cafd5b2 100644 --- a/src/lib/train/train-detail.svelte +++ b/src/lib/train/train-detail.svelte @@ -15,41 +15,42 @@ {service.operator || "GW"}: {service.stops[0]['publicDeparture'] || service.stops[0]['wttDeparture']} {service.stops[0]['tiploc']} to {service.stops[service['stops'].length -1]['tiploc']} V - {#if isExpanded} -
- {#if service.pis} -

PIS: {service.pis}

- {/if} -

Planned Type: {parseInt(service.planSpeed) || 68 }mph {service.powerType || "Bus" }

-

Days Run: {service.daysRun.join(", ").toUpperCase()}

- - - - - - - {#if service.stops[0]['publicDeparture']} - {#each service.stops as stop} - {#if stop.publicArrival || stop.publicDeparture} - - - - - - {/if} - {/each} - {:else} - {#each service.stops as stop} - + {#if isExpanded} +
+ {#if service.pis} +

PIS: {service.pis}

+ {/if} +

Planned Type: {parseInt(service.planSpeed) || 68 }mph {service.powerType || "Bus" }

+

Days Run: {service.daysRun.join(", ").toUpperCase()}

+

Valid From: {new Date(service.scheduleStartDate).toLocaleDateString('en-GB')} - {new Date(service.scheduleEndDate).toLocaleDateString('en-GB')}

+
LocationSch Arr.Sch Dep.
{stop.tiploc}{stop.publicArrival || '-'}{stop.publicDeparture || '-'}
+ + + + + + {#if service.stops[0]['publicDeparture']} + {#each service.stops as stop} + {#if stop.publicArrival || stop.publicDeparture} + - - + + - {/each} - {/if} -
LocationSch Arr.Sch Dep.
{stop.tiploc}{stop.wttArrival || '-'}{stop.wttDeparture || '-'}{stop.publicArrival || '-'}{stop.publicDeparture || '-'}
-
- {/if} + {/if} + {/each} + {:else} + {#each service.stops as stop} + + {stop.tiploc} + {stop.wttArrival || '-'} + {stop.wttDeparture || '-'} + + {/each} + {/if} + + + {/if}