mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Poprawki statystyk
This commit is contained in:
+2
-1
@@ -62,7 +62,7 @@ export const useStore = defineStore('store', {
|
||||
if (!trains) return [];
|
||||
|
||||
this.trainList = trains
|
||||
.filter((train) => train.region === this.region.id && train.online)
|
||||
.filter((train) => train.region === this.region.id)
|
||||
.map((train) => {
|
||||
const stock = train.stockString.split(';');
|
||||
const locoType = stock ? stock[0] : train.stockString;
|
||||
@@ -206,6 +206,7 @@ export const useStore = defineStore('store', {
|
||||
const prevDispatcherStatuses: StoreState['lastDispatcherStatuses'] = [];
|
||||
|
||||
this.apiData.stations?.forEach((stationAPIData) => {
|
||||
|
||||
if (stationAPIData.region !== this.region.id || !stationAPIData.isOnline) return;
|
||||
const station = this.stationList.find((s) => s.name === stationAPIData.stationName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user