mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 13:58:12 +00:00
Merge pull request #95 from Spythere/development
hotfix: timetables for unknown sceneries
This commit is contained in:
@@ -213,7 +213,10 @@ export default defineComponent({
|
|||||||
const mainStore = useMainStore();
|
const mainStore = useMainStore();
|
||||||
|
|
||||||
const chosenCheckpoint = ref(
|
const chosenCheckpoint = ref(
|
||||||
props.station?.generalInfo?.checkpoints[0] ?? props.station?.name ?? ''
|
props.station?.generalInfo?.checkpoints[0] ??
|
||||||
|
props.station?.name ??
|
||||||
|
route.query['station']?.toString() ??
|
||||||
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -233,9 +236,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
sceneryTimetables(): SceneryTimetableRow[] {
|
sceneryTimetables(): SceneryTimetableRow[] {
|
||||||
if (!this.station) return [];
|
|
||||||
if (!this.onlineScenery) return [];
|
if (!this.onlineScenery) return [];
|
||||||
|
|
||||||
|
const sceneryName = this.$route.query['station']?.toString() ?? '';
|
||||||
|
|
||||||
return this.onlineScenery.scheduledTrains
|
return this.onlineScenery.scheduledTrains
|
||||||
.filter(
|
.filter(
|
||||||
(ct) =>
|
(ct) =>
|
||||||
@@ -247,7 +251,7 @@ export default defineComponent({
|
|||||||
const trainStopStatus = getTrainStopStatus(
|
const trainStopStatus = getTrainStopStatus(
|
||||||
ct.checkpointStop,
|
ct.checkpointStop,
|
||||||
ct.train.currentStationName,
|
ct.train.currentStationName,
|
||||||
this.station!.name
|
sceneryName
|
||||||
);
|
);
|
||||||
|
|
||||||
const trainStopIndex =
|
const trainStopIndex =
|
||||||
|
|||||||
Reference in New Issue
Block a user