From 18cb69f4f4af8abca738c4b1d8a55e66a98a8161 Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 6 Nov 2024 06:43:14 +0100 Subject: [PATCH] stash --- web/src/components/CollapsableCards.vue | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/web/src/components/CollapsableCards.vue b/web/src/components/CollapsableCards.vue index 554a960..c91420d 100644 --- a/web/src/components/CollapsableCards.vue +++ b/web/src/components/CollapsableCards.vue @@ -73,23 +73,15 @@ export default { data() { return { collapsed: [], - symbols: ['▲', '▼', '▶', '◀'], }; }, created() { - const query = this.$router.currentRoute ? (this.$router.currentRoute.query ? this.$router.currentRoute.query.collapsed : null) : null; + const query = this.route ? (this.route.query ? this.route.query.collapsed : null) : null; if (query !== null && query !== undefined) { this.collapsed = this.unpackInt(parseInt(query), this.sections.length); } else { this.collapsed = this.sections.map(() => true); } - - //this.$router.push({...this.$router.currentRoute, query: {...this.$router.currentRoute.query, layout}}); - //this.collapsed = this.sections.map(() => true); - /*this.columns.map(e => ({ - k: e, - v: this.$store.getters.getFilters[e] - })).filter(e => e.v).forEach(e => this.setFilter(e.k, e.v));*/ }, computed: { grouped_items() { @@ -116,8 +108,8 @@ export default { const encoded = this.packInt(this.collapsed).toString() if (this.route.query.collapsed !== encoded) this.$router.push({ - ...this.$router.currentRoute, - query: {...this.$router.currentRoute.query, collapsed: encoded} + ...this.route, + query: {...this.route.query, collapsed: encoded} }); }, deep: true,