mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 22:08:12 +00:00
Dodano filtr dla SUP
This commit is contained in:
@@ -99,7 +99,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<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 { ACTIONS, GETTERS, MUTATIONS } from '@/constants/storeConstants';
|
||||||
import inputData from '@/data/options.json';
|
import inputData from '@/data/options.json';
|
||||||
|
|||||||
@@ -88,6 +88,14 @@
|
|||||||
"value": true,
|
"value": true,
|
||||||
"defaultValue": true
|
"defaultValue": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "SUP",
|
||||||
|
"name": "SUP",
|
||||||
|
"iconName": "SUP",
|
||||||
|
"section": "control",
|
||||||
|
"value": true,
|
||||||
|
"defaultValue": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "SBL",
|
"id": "SBL",
|
||||||
"name": "SBL",
|
"name": "SBL",
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
"SPE": "SPE",
|
"SPE": "SPE",
|
||||||
"manual": "MANUAL",
|
"manual": "MANUAL",
|
||||||
"mechanical": "MECHANICAL",
|
"mechanical": "MECHANICAL",
|
||||||
|
"SUP": "SUP",
|
||||||
"SBL": "SBL",
|
"SBL": "SBL",
|
||||||
"modern": "MODERN",
|
"modern": "MODERN",
|
||||||
"semaphores": "SEMAPHORES",
|
"semaphores": "SEMAPHORES",
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
"SCS": "SCS",
|
"SCS": "SCS",
|
||||||
"SPE": "SPE",
|
"SPE": "SPE",
|
||||||
"manual": "RĘCZNE",
|
"manual": "RĘCZNE",
|
||||||
|
"SUP": "SUP",
|
||||||
"SBL": "SBL",
|
"SBL": "SBL",
|
||||||
"mechanical": "MECHANICZNE",
|
"mechanical": "MECHANICZNE",
|
||||||
"modern": "WSPÓŁCZESNA",
|
"modern": "WSPÓŁCZESNA",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export default interface Filter {
|
|||||||
"SPK": boolean;
|
"SPK": boolean;
|
||||||
"SCS": boolean;
|
"SCS": boolean;
|
||||||
"SPE": boolean;
|
"SPE": boolean;
|
||||||
|
"SUP": boolean;
|
||||||
ręczne: boolean;
|
ręczne: boolean;
|
||||||
mechaniczne: boolean;
|
mechaniczne: boolean;
|
||||||
"SBL": 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['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['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['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;
|
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,
|
SPK: false,
|
||||||
SCS: false,
|
SCS: false,
|
||||||
SPE: false,
|
SPE: false,
|
||||||
|
SUP: false,
|
||||||
ręczne: false,
|
ręczne: false,
|
||||||
mechaniczne: false,
|
mechaniczne: false,
|
||||||
współczesna: false,
|
współczesna: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user