chore: added journal timetable comments

This commit is contained in:
2024-10-01 15:28:22 +02:00
parent 6fd9e21213
commit cac4345683
2 changed files with 8 additions and 4 deletions
@@ -94,12 +94,13 @@ import { API } from '../../../typings/api';
interface ITimetableStopDetails { interface ITimetableStopDetails {
stopName: string; stopName: string;
stopComments: string | null;
stopTime: number;
stopType: string;
arrivalTimestamp: number; arrivalTimestamp: number;
scheduledArrivalTimestamp: number; scheduledArrivalTimestamp: number;
departureTimestamp: number; departureTimestamp: number;
scheduledDepartureTimestamp: number; scheduledDepartureTimestamp: number;
stopTime: number;
stopType: string;
isConfirmed: boolean; isConfirmed: boolean;
} }
@@ -164,15 +165,17 @@ export default defineComponent({
const stopTime = Number(timetable.checkpointStopTypes.at(i)?.split(',')[0]) || 0; const stopTime = Number(timetable.checkpointStopTypes.at(i)?.split(',')[0]) || 0;
const stopType = timetable.checkpointStopTypes.at(i)?.split(',').slice(1).join(',') || 'pt'; const stopType = timetable.checkpointStopTypes.at(i)?.split(',').slice(1).join(',') || 'pt';
const stopComments = timetable.checkpointComments.at(i) ?? null;
acc.push({ acc.push({
stopName, stopName,
stopTime,
stopType,
stopComments,
arrivalTimestamp: this.dateStringToTimestamp(arrivalDate), arrivalTimestamp: this.dateStringToTimestamp(arrivalDate),
scheduledArrivalTimestamp: this.dateStringToTimestamp(scheduledArrivalDate), scheduledArrivalTimestamp: this.dateStringToTimestamp(scheduledArrivalDate),
departureTimestamp: this.dateStringToTimestamp(departureDate), departureTimestamp: this.dateStringToTimestamp(departureDate),
scheduledDepartureTimestamp: this.dateStringToTimestamp(scheduledDepartureDate), scheduledDepartureTimestamp: this.dateStringToTimestamp(scheduledDepartureDate),
stopTime,
stopType,
isConfirmed: i < timetable.confirmedStopsCount isConfirmed: i < timetable.confirmedStopsCount
}); });
+1
View File
@@ -263,6 +263,7 @@ export namespace API {
checkpointArrivalsScheduled: string[]; checkpointArrivalsScheduled: string[];
checkpointDeparturesScheduled: string[]; checkpointDeparturesScheduled: string[];
checkpointStopTypes: string[]; checkpointStopTypes: string[];
checkpointComments: string[];
visitedSceneries: string[]; visitedSceneries: string[];
sceneryNames: string[]; sceneryNames: string[];
path: string; path: string;