Dodano filtr dla SUP

This commit is contained in:
2022-01-16 19:37:20 +01:00
parent 1b0c1cb9d6
commit 8580a81454
6 changed files with 14 additions and 1 deletions
@@ -99,7 +99,7 @@
</template>
<script lang="ts">
import { defineComponent, inject, ref } from '@vue/runtime-core';
import { defineComponent, inject } from '@vue/runtime-core';
import { ACTIONS, GETTERS, MUTATIONS } from '@/constants/storeConstants';
import inputData from '@/data/options.json';
+8
View File
@@ -88,6 +88,14 @@
"value": true,
"defaultValue": true
},
{
"id": "SUP",
"name": "SUP",
"iconName": "SUP",
"section": "control",
"value": true,
"defaultValue": true
},
{
"id": "SBL",
"name": "SBL",
+1
View File
@@ -72,6 +72,7 @@
"SPE": "SPE",
"manual": "MANUAL",
"mechanical": "MECHANICAL",
"SUP": "SUP",
"SBL": "SBL",
"modern": "MODERN",
"semaphores": "SEMAPHORES",
+1
View File
@@ -71,6 +71,7 @@
"SCS": "SCS",
"SPE": "SPE",
"manual": "RĘCZNE",
"SUP": "SUP",
"SBL": "SBL",
"mechanical": "MECHANICZNE",
"modern": "WSPÓŁCZESNA",
+1
View File
@@ -7,6 +7,7 @@ export default interface Filter {
"SPK": boolean;
"SCS": boolean;
"SPE": boolean;
"SUP": boolean;
ręczne: boolean;
mechaniczne: boolean;
"SBL": boolean;
@@ -103,6 +103,7 @@ const filterStations = (station: Station, filters: Filter) => {
if (filters['SPK'] && (station.generalInfo.controlType === 'SPK' || station.generalInfo.controlType.includes('+SPK'))) return returnMode;
if (filters['SCS'] && (station.generalInfo.controlType === 'SCS' || station.generalInfo.controlType.includes('+SCS'))) return returnMode;
if (filters['SPE'] && (station.generalInfo.controlType === 'SPE' || station.generalInfo.controlType.includes('+SPE'))) return returnMode;
if (filters['SUP'] && station.generalInfo.SUP) return returnMode;
if (filters['SCS'] && filters['SPK'] && (station.generalInfo.controlType.includes('SPK') || station.generalInfo.controlType.includes('SCS'))) return returnMode;
@@ -125,6 +126,7 @@ export default class StationFilterManager {
SPK: false,
SCS: false,
SPE: false,
SUP: false,
ręczne: false,
mechaniczne: false,
współczesna: false,