From 34ac7b97bd22a888529e4c803f74a3aa53a7cdcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 30 Oct 2023 15:57:30 +0100 Subject: [PATCH] Make filter menu visible if categories are inactive --- .../FilterMenu/FilterMenuComponent.vue | 28 ++++++++++--------- webapp/pages/index.vue | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/webapp/components/FilterMenu/FilterMenuComponent.vue b/webapp/components/FilterMenu/FilterMenuComponent.vue index e362e758f..7897a285d 100644 --- a/webapp/components/FilterMenu/FilterMenuComponent.vue +++ b/webapp/components/FilterMenu/FilterMenuComponent.vue @@ -3,7 +3,7 @@

{{ $t('filter-menu.filter-by') }}

-
+
{ - this.$emit('showFilterMenu') - this.$toast.success(this.$t('filter-menu.save.success')) - }) - .catch(() => { - this.$toast.error(this.$t('filter-menu.save.error')) - }) + if (this.categoriesActive) { + this.$apollo + .mutate({ + mutation: SaveCategories(), + variables: { activeCategories: this.filteredCategoryIds }, + }) + .then(() => { + this.$emit('showFilterMenu') + this.$toast.success(this.$t('filter-menu.save.success')) + }) + .catch(() => { + this.$toast.error(this.$t('filter-menu.save.error')) + }) + } }, }, } diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index 7b5c4a903..6067119e1 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -19,7 +19,7 @@
-
+