From cac43456839a543a7d8128368a5e6076eb51f1d3 Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 1 Oct 2024 15:28:22 +0200 Subject: [PATCH] chore: added journal timetable comments --- .../JournalView/JournalTimetables/EntryStops.vue | 11 +++++++---- src/typings/api.ts | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/JournalView/JournalTimetables/EntryStops.vue b/src/components/JournalView/JournalTimetables/EntryStops.vue index 5ac1be3..87a5c8a 100644 --- a/src/components/JournalView/JournalTimetables/EntryStops.vue +++ b/src/components/JournalView/JournalTimetables/EntryStops.vue @@ -94,12 +94,13 @@ import { API } from '../../../typings/api'; interface ITimetableStopDetails { stopName: string; + stopComments: string | null; + stopTime: number; + stopType: string; arrivalTimestamp: number; scheduledArrivalTimestamp: number; departureTimestamp: number; scheduledDepartureTimestamp: number; - stopTime: number; - stopType: string; isConfirmed: boolean; } @@ -164,15 +165,17 @@ export default defineComponent({ const stopTime = Number(timetable.checkpointStopTypes.at(i)?.split(',')[0]) || 0; const stopType = timetable.checkpointStopTypes.at(i)?.split(',').slice(1).join(',') || 'pt'; + const stopComments = timetable.checkpointComments.at(i) ?? null; acc.push({ stopName, + stopTime, + stopType, + stopComments, arrivalTimestamp: this.dateStringToTimestamp(arrivalDate), scheduledArrivalTimestamp: this.dateStringToTimestamp(scheduledArrivalDate), departureTimestamp: this.dateStringToTimestamp(departureDate), scheduledDepartureTimestamp: this.dateStringToTimestamp(scheduledDepartureDate), - stopTime, - stopType, isConfirmed: i < timetable.confirmedStopsCount }); diff --git a/src/typings/api.ts b/src/typings/api.ts index 3eb9de5..3dde248 100644 --- a/src/typings/api.ts +++ b/src/typings/api.ts @@ -263,6 +263,7 @@ export namespace API { checkpointArrivalsScheduled: string[]; checkpointDeparturesScheduled: string[]; checkpointStopTypes: string[]; + checkpointComments: string[]; visitedSceneries: string[]; sceneryNames: string[]; path: string;