reaktywne filtry URL w dzienniku RJ

This commit is contained in:
2023-12-17 16:10:13 +01:00
parent f4be32aa39
commit e8ed36df16
7 changed files with 141 additions and 71 deletions
@@ -33,7 +33,7 @@
<h1 class="option-title">{{ $t('options.search-title') }}</h1>
<div class="search_content">
<div class="search" v-for="(_, propName) in searchersValues" :key="propName">
<label v-if="propName == 'search-date'" for="date">{{
<label v-if="propName == 'search-date'" for="search-date">{{
$t(`options.search-${optionsType}-date`)
}}</label>
@@ -47,6 +47,7 @@
:placeholder="$t(`options.${propName}`)"
:type="propName == 'search-date' ? 'date' : 'text'"
:min="propName == 'search-date' ? '2022-02-01' : undefined"
:id="`${propName}`"
:list="propName.toString()"
/>
+4 -2
View File
@@ -20,10 +20,11 @@ export namespace Journal {
};
export const enum TimetableFilterId {
ALL_STATUSES = 'all-statuses',
ACTIVE = 'active',
FULFILLED = 'fulfilled',
ABANDONED = 'abandoned',
ALL = 'all',
ALL_SPECIALS = 'all-specials',
TWR = 'twr',
SKR = 'skr',
TWR_SKR = 'twr-skr'
@@ -31,13 +32,14 @@ export namespace Journal {
export enum FilterSection {
TIMETABLE_STATUS = 'timetable-status',
TWRSKR = 'twrskr'
SPECIAL = 'special'
}
export interface TimetableFilter {
id: TimetableFilterId;
filterSection: string;
isActive: boolean;
default: boolean;
}
export type TimetableSorterKey = 'timetableId' | 'beginDate' | 'distance' | 'total-stops';