|
6 | 6 | import Platform from "$components/timetable/info/Platform.svelte";
|
7 | 7 | import ViaStops from "$components/timetable/info/ViaStops.svelte";
|
8 | 8 | import Messages from "$components/timetable/messages/Messages.svelte";
|
| 9 | + import type { Station } from "$models/station"; |
| 10 | + import { DateTime } from "luxon"; |
9 | 11 |
|
10 | 12 | let {
|
11 | 13 | connection,
|
|
17 | 19 | renderInformation: boolean;
|
18 | 20 | } = $props();
|
19 | 21 | const isDeparture = getContext<boolean>("isDeparture");
|
| 22 | + const station = getContext<Station>("station"); |
20 | 23 | </script>
|
21 | 24 |
|
22 | 25 | <div
|
|
30 | 33 | <Messages {connection} />
|
31 | 34 |
|
32 | 35 | <!-- 2nd row; Line Name -->
|
33 |
| - <span class="text-lg font-bold"> |
34 |
| - {connection?.lineInformation?.lineName} |
35 |
| - {connection?.lineInformation?.additionalLineName ? " / " + connection?.lineInformation?.additionalLineName : ""} |
36 |
| - </span> |
| 36 | + <div class="flex flex-row text-lg font-bold"> |
| 37 | + <a href={`/journey/coach-sequence?lineDetails=${connection?.lineInformation?.product}_${connection?.lineInformation?.fahrtNr}&evaNumber=${station?.evaNumber}&date=${DateTime.local().toFormat("yyyyMMdd")}`} |
| 38 | + target="_blank" |
| 39 | + > |
| 40 | + {connection?.lineInformation?.lineName} |
| 41 | + </a> |
| 42 | + {#if connection?.lineInformation?.additionalLineName} |
| 43 | + <span>/ {connection?.lineInformation?.additionalLineName}</span> |
| 44 | + {/if} |
| 45 | + </div> |
37 | 46 |
|
38 | 47 | <!-- 3rd row; Time & Platform Information -->
|
39 | 48 | <div class="flex flex-row items-center justify-between text-2xl font-semibold">
|
|
66 | 75 | <!-- 2nd row -->
|
67 | 76 | <div class="flex flex-row">
|
68 | 77 | <!-- Line Name -->
|
69 |
| - <span class="mr-8 flex flex-[1] justify-end text-xl font-semibold"> |
70 |
| - {connection?.lineInformation?.lineName} |
71 |
| - {connection?.lineInformation?.additionalLineName ? " / " + connection?.lineInformation?.additionalLineName : ""} |
72 |
| - </span> |
| 78 | + <div class="mr-8 flex-[1] justify-end flex flex-row text-right text-xl font-semibold"> |
| 79 | + <a href={`/journey/coach-sequence?lineDetails=${connection?.lineInformation?.product}_${connection?.lineInformation?.fahrtNr}&evaNumber=${station?.evaNumber}&date=${DateTime.local().toFormat("yyyyMMdd")}`} |
| 80 | + target="_blank" |
| 81 | + > |
| 82 | + {connection?.lineInformation?.lineName} |
| 83 | + </a> |
| 84 | + {#if connection?.lineInformation?.additionalLineName} |
| 85 | + <span>/ {connection?.lineInformation?.additionalLineName}</span> |
| 86 | + {/if} |
| 87 | + </div> |
73 | 88 |
|
74 | 89 | <!-- viaStops -->
|
75 | 90 | <div class="mr-4 flex-[4] text-lg">
|
|
0 commit comments