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,