mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
design szlaków na liście scenerii
This commit is contained in:
+11
-11
@@ -230,27 +230,27 @@ export const useMainStore = defineStore('store', {
|
||||
return apiStore.sceneryData.map((scenery) => {
|
||||
const routes = scenery.routesInfo.reduce(
|
||||
(acc, route) => {
|
||||
const tracksKey = route.routeTracks == 2 ? 'twoWay' : 'oneWay';
|
||||
const tracksKey = route.routeTracks == 2 ? 'double' : 'single';
|
||||
const isElectric = route.isElectric;
|
||||
const routesKey: keyof StationRoutes = `${tracksKey}${
|
||||
!isElectric ? 'No' : ''
|
||||
}CatenaryRouteNames`;
|
||||
!isElectric ? 'Other' : 'Electrified'
|
||||
}Names`;
|
||||
|
||||
if (!route.isInternal) acc[routesKey].push(route.routeName);
|
||||
if (route.isRouteSBL) acc['sblRouteNames'].push(route.routeName);
|
||||
if (route.isRouteSBL) acc['sblNames'].push(route.routeName);
|
||||
|
||||
acc[tracksKey].push(route);
|
||||
|
||||
return acc;
|
||||
},
|
||||
{
|
||||
oneWay: [],
|
||||
oneWayCatenaryRouteNames: [],
|
||||
oneWayNoCatenaryRouteNames: [],
|
||||
twoWay: [],
|
||||
twoWayCatenaryRouteNames: [],
|
||||
twoWayNoCatenaryRouteNames: [],
|
||||
sblRouteNames: []
|
||||
single: [],
|
||||
singleElectrifiedNames: [],
|
||||
singleOtherNames: [],
|
||||
double: [],
|
||||
doubleElectrifiedNames: [],
|
||||
doubleOtherNames: [],
|
||||
sblNames: []
|
||||
} as StationRoutes
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user