From 336530cff9f8e1397b898e86e58601043537dd7e Mon Sep 17 00:00:00 2001 From: Spythere Date: Thu, 6 Feb 2025 22:34:30 +0100 Subject: [PATCH] chore: added APO support --- src/components/Timetable/TrainTimetable.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Timetable/TrainTimetable.vue b/src/components/Timetable/TrainTimetable.vue index 1b39ada..7c9ac75 100644 --- a/src/components/Timetable/TrainTimetable.vue +++ b/src/components/Timetable/TrainTimetable.vue @@ -42,7 +42,7 @@ const globalStore = useGlobalStore(); const apiStore = useApiStore(); // Tymczasowa tabelka z posterunkami APO -// const apoNames = ['Stary Kisielin, pe', 'Czerwony Dwór, pe', 'Szczejkowice, pe']; +const apoNames = ['Stary Kisielin, pe', 'Czerwony Dwór, pe', 'Szczejkowice, pe']; const computedTimetableRows = computed(() => { const timetableData = globalStore.currentTimetableData; @@ -120,6 +120,9 @@ const computedTimetableRows = computed(() => { departureTracks = internalRouteInfo.routeTracks; } + let pointAbbrevs = []; + if (apoNames.includes(stop.stopNameRAW)) pointAbbrevs.unshift(`APO ${currentPath.sceneryData?.abbr}`); + let rowData: StopRow = { isMain: stop.mainStop, pointKm: stop.stopDistance.toFixed(3), @@ -132,7 +135,7 @@ const computedTimetableRows = computed(() => { realLine: realLineNo == 0 ? '' : realLineNo.toString(), driveTime: lastDepartureTimestamp ? stop.arrivalTimestamp - lastDepartureTimestamp : 0, - abbrevs, + abbrevs: [...pointAbbrevs, ...abbrevs], arrivalKm: arrivalKm.toFixed(3), departureKm: stop.stopDistance.toFixed(3), @@ -149,7 +152,6 @@ const computedTimetableRows = computed(() => { stockMass, }; - // if (apoNames.includes(stop.stopNameRAW)) abbrevs.unshift(`APO ${currentPath.sceneryData?.abbr}`); // console.debug(stop.stopNameRAW, stop.departureLine);