Update to handle new serviceDetails object
This commit is contained in:
parent
1b21dacfd9
commit
2a615a822e
@ -61,7 +61,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<div class="detailOperator"><StylesToc toc={service?.operator || ''} full={true} /></div>
|
<div class="detailOperator"><StylesToc toc={service?.operator || ''} full={true} /></div>
|
||||||
|
|
||||||
<TrainIcons firstClass={serviceDetail.firstClass} hasCatering={serviceDetail.catering} sleeper={serviceDetail.sleeper} vstp={serviceDetail.vstp} />
|
<TrainIcons serviceDetails={serviceDetail.serviceDetails} />
|
||||||
{#if serviceDetail.pis}
|
{#if serviceDetail.pis}
|
||||||
<PisHandler pisObject={serviceDetail.pis} />
|
<PisHandler pisObject={serviceDetail.pis} />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -1,35 +1,33 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Tooltip from "$lib/Tooltip.svelte";
|
import Tooltip from "$lib/Tooltip.svelte";
|
||||||
|
import type { ServiceDetail } from "@owlboard/ts-types";
|
||||||
import { IconBed, IconSquare1, IconSquareLetterV, IconToolsKitchen2 } from "@tabler/icons-svelte";
|
import { IconBed, IconSquare1, IconSquareLetterV, IconToolsKitchen2 } from "@tabler/icons-svelte";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export let firstClass: boolean
|
export let serviceDetails: ServiceDetail
|
||||||
export let hasCatering: boolean
|
|
||||||
export let sleeper: boolean
|
|
||||||
export let vstp: boolean
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{#if firstClass}
|
{#if serviceDetails.firstClass}
|
||||||
<Tooltip text="First Class is available">
|
<Tooltip text="First Class is available">
|
||||||
<IconSquare1 />
|
<IconSquare1 />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if hasCatering}
|
{#if serviceDetails.catering}
|
||||||
<Tooltip text="Catering is available">
|
<Tooltip text="Catering is available">
|
||||||
<IconToolsKitchen2 />
|
<IconToolsKitchen2 />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if sleeper}
|
{#if serviceDetails.sleeper}
|
||||||
<Tooltip text="Sleeping Berths are available">
|
<Tooltip text="Sleeping Berths are available">
|
||||||
<IconBed />
|
<IconBed />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if vstp}
|
{#if serviceDetails.vstp}
|
||||||
<Tooltip text="This is a VSTP planned service">
|
<Tooltip text="This is a VSTP planned service">
|
||||||
<IconSquareLetterV />
|
<IconSquareLetterV />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
Loading…
Reference in New Issue
Block a user