mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Dodano filtr dla SUP
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -88,6 +88,14 @@
|
||||
"value": true,
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "SUP",
|
||||
"name": "SUP",
|
||||
"iconName": "SUP",
|
||||
"section": "control",
|
||||
"value": true,
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "SBL",
|
||||
"name": "SBL",
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
"SPE": "SPE",
|
||||
"manual": "MANUAL",
|
||||
"mechanical": "MECHANICAL",
|
||||
"SUP": "SUP",
|
||||
"SBL": "SBL",
|
||||
"modern": "MODERN",
|
||||
"semaphores": "SEMAPHORES",
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
"SCS": "SCS",
|
||||
"SPE": "SPE",
|
||||
"manual": "RĘCZNE",
|
||||
"SUP": "SUP",
|
||||
"SBL": "SBL",
|
||||
"mechanical": "MECHANICZNE",
|
||||
"modern": "WSPÓŁCZESNA",
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user