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