mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
feat(app): added min route speed & max route speed station filters
This commit is contained in:
+10
-1
@@ -248,6 +248,13 @@ export const useMainStore = defineStore('store', {
|
||||
if (!route.isInternal) acc[routesKey].push(route.routeName);
|
||||
if (route.isRouteSBL) acc['sblNames'].push(route.routeName);
|
||||
|
||||
acc.minRouteSpeed =
|
||||
acc.minRouteSpeed == 0
|
||||
? route.routeSpeed
|
||||
: Math.min(route.routeSpeed, acc.minRouteSpeed);
|
||||
|
||||
acc.maxRouteSpeed = Math.max(route.routeSpeed, acc.maxRouteSpeed);
|
||||
|
||||
acc[tracksKey].push(route);
|
||||
|
||||
return acc;
|
||||
@@ -259,7 +266,9 @@ export const useMainStore = defineStore('store', {
|
||||
double: [],
|
||||
doubleElectrifiedNames: [],
|
||||
doubleOtherNames: [],
|
||||
sblNames: []
|
||||
sblNames: [],
|
||||
minRouteSpeed: 0,
|
||||
maxRouteSpeed: 0
|
||||
} as StationRoutes
|
||||
);
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ const filterInitStates: Filter = {
|
||||
unsignedStatus: false,
|
||||
withActiveTimetables: false,
|
||||
withoutActiveTimetables: false,
|
||||
maxVmax: 200,
|
||||
minVmax: 0,
|
||||
|
||||
authors: '',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user