mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 05:48:11 +00:00
poprawki filtrów dziennia DR
This commit is contained in:
@@ -1,12 +1,5 @@
|
|||||||
export namespace Journal {
|
export namespace Journal {
|
||||||
export type DispatcherSearcher = {
|
export type DispatcherSearchKey = 'search-dispatcher' | 'search-station' | 'search-date';
|
||||||
[key in 'search-dispatcher' | 'search-station' | 'search-date']: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface DispatcherSorter {
|
|
||||||
id: 'timestampFrom' | 'duration';
|
|
||||||
dir: -1 | 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type TimetableSearchKey =
|
export type TimetableSearchKey =
|
||||||
| 'search-driver'
|
| 'search-driver'
|
||||||
@@ -19,6 +12,23 @@ export namespace Journal {
|
|||||||
[key in TimetableSearchKey]: string;
|
[key in TimetableSearchKey]: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type DispatcherSearchType = {
|
||||||
|
[key in DispatcherSearchKey]: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type TimetableSorterKey = 'timetableId' | 'beginDate' | 'distance' | 'total-stops';
|
||||||
|
export type DispatcherSorterKey = 'timestampFrom' | 'duration';
|
||||||
|
|
||||||
|
export interface DispatcherSorter {
|
||||||
|
id: DispatcherSorterKey;
|
||||||
|
dir: -1 | 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TimetableSorter {
|
||||||
|
id: TimetableSorterKey;
|
||||||
|
dir: 'asc' | 'desc';
|
||||||
|
}
|
||||||
|
|
||||||
export const enum TimetableFilterId {
|
export const enum TimetableFilterId {
|
||||||
ALL_STATUSES = 'all-statuses',
|
ALL_STATUSES = 'all-statuses',
|
||||||
ACTIVE = 'active',
|
ACTIVE = 'active',
|
||||||
@@ -42,13 +52,6 @@ export namespace Journal {
|
|||||||
default: boolean;
|
default: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TimetableSorterKey = 'timetableId' | 'beginDate' | 'distance' | 'total-stops';
|
|
||||||
|
|
||||||
export interface TimetableSorter {
|
|
||||||
id: TimetableSorterKey;
|
|
||||||
dir: 'asc' | 'desc';
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum StatsTab {
|
export enum StatsTab {
|
||||||
DRIVER_STATS = 'journal-driver-stats',
|
DRIVER_STATS = 'journal-driver-stats',
|
||||||
DISPATCHER_STATS = 'journal-dispatcher-stats',
|
DISPATCHER_STATS = 'journal-dispatcher-stats',
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ h1.option-title {
|
|||||||
|
|
||||||
.sort-option[data-selected='true'] {
|
.sort-option[data-selected='true'] {
|
||||||
color: $accentCol;
|
color: $accentCol;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-option {
|
.filter-option {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default defineComponent({
|
|||||||
'search-dispatcher': '',
|
'search-dispatcher': '',
|
||||||
'search-station': '',
|
'search-station': '',
|
||||||
'search-date': ''
|
'search-date': ''
|
||||||
} as Journal.DispatcherSearcher);
|
} as Journal.DispatcherSearchType);
|
||||||
|
|
||||||
const countFromIndex = ref(0);
|
const countFromIndex = ref(0);
|
||||||
const countLimit = 15;
|
const countLimit = 15;
|
||||||
@@ -216,10 +216,13 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setOptions(searchers: { [key: string]: string }) {
|
setOptions(options: { [key: string]: string }) {
|
||||||
this.searchersValues['search-date'] = searchers['search-date'] ?? '';
|
this.searchersValues['search-date'] = options['search-date'] ?? '';
|
||||||
this.searchersValues['search-station'] = searchers['search-station'] ?? '';
|
this.searchersValues['search-station'] = options['search-station'] ?? '';
|
||||||
this.searchersValues['search-dispatcher'] = searchers['search-dispatcher'] ?? '';
|
this.searchersValues['search-dispatcher'] = options['search-dispatcher'] ?? '';
|
||||||
|
|
||||||
|
this.sorterActive.id =
|
||||||
|
(options['sorter-active'] as Journal.DispatcherSorterKey) ?? 'timestampFrom';
|
||||||
},
|
},
|
||||||
|
|
||||||
resetOptions() {
|
resetOptions() {
|
||||||
|
|||||||
Reference in New Issue
Block a user