diff --git a/src/components/JournalView/JournalOptions.vue b/src/components/JournalView/JournalOptions.vue
index 28a2d58..c0813c6 100644
--- a/src/components/JournalView/JournalOptions.vue
+++ b/src/components/JournalView/JournalOptions.vue
@@ -49,15 +49,6 @@
-
-
-
-
-
{{ $t('options.sort-title') }}
@@ -75,7 +66,7 @@
{{ $t('options.filter-title') }}
-
+
{{ $t(`options.filter-section-${section}`) }}
@@ -92,6 +83,15 @@
+
+
+
+
+
diff --git a/src/styles/filters_options.scss b/src/styles/filters_options.scss
index fb92009..adcab45 100644
--- a/src/styles/filters_options.scss
+++ b/src/styles/filters_options.scss
@@ -122,17 +122,6 @@ h1.option-title {
margin: 0.5em auto;
}
- .search_actions {
- display: flex;
- gap: 0.5em;
- margin: 1em 0;
- width: 100%;
-
- button {
- width: 100%;
- }
- }
-
.search-box {
.search-exit {
position: absolute;
@@ -143,6 +132,17 @@ h1.option-title {
}
}
+.options_actions {
+ display: flex;
+ gap: 0.5em;
+ width: 100%;
+ margin-top: 1em;
+
+ button {
+ width: 100%;
+ }
+}
+
@include smallScreen() {
h1 {
text-align: center;
diff --git a/src/views/JournalTimetables.vue b/src/views/JournalTimetables.vue
index 8fc6419..7fea211 100644
--- a/src/views/JournalTimetables.vue
+++ b/src/views/JournalTimetables.vue
@@ -122,7 +122,7 @@ export default defineComponent({
const sorterActive: JournalTimetableSorter = reactive({ id: 'timetableId', dir: 'desc' });
// const journalFilterActive = ref(journalTimetableFilters[0]);
const initFilters: readonly JournalFilter[] = JSON.parse(JSON.stringify(journalTimetableFilters));
- const filterList = reactive([...initFilters]);
+ const filterList: JournalFilter[] = reactive(JSON.parse(JSON.stringify(initFilters)));
const searchersValues = reactive({
'search-train': '',
@@ -145,6 +145,7 @@ export default defineComponent({
sorterActive,
searchersValues,
filterList,
+ initFilters,
countFromIndex,
countLimit,
@@ -198,9 +199,12 @@ export default defineComponent({
resetOptions() {
this.setSearchers('', '', '', '', '');
- // this.journalFilterActive = this.journalTimetableFilters[0];
this.sorterActive.id = 'timetableId';
+ this.filterList.forEach(
+ (f) => (f.isActive = this.initFilters.find((initFilter) => initFilter.id == f.id)?.isActive || false)
+ );
+
this.fetchHistoryData();
},