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, diff --git a/web/src/components/ExpandableTable.vue b/web/src/components/ExpandableTable.vue new file mode 100644 index 0000000..6bd5175 --- /dev/null +++ b/web/src/components/ExpandableTable.vue @@ -0,0 +1,124 @@ + + + + + \ No newline at end of file diff --git a/web/src/store.js b/web/src/store.js index 9ab6504..87b13a5 100644 --- a/web/src/store.js +++ b/web/src/store.js @@ -359,6 +359,13 @@ const store = createStore({ commit('replaceEvents', [...state.events.filter(e => e.eid !== event_id)]) } }, + async updateEvent({commit, dispatch, state}, {id, partial_event}){ + console.log(id, partial_event); + const {data, success} = await http.patch(`/2/events/${id}/`, partial_event, state.user.token); + if (success) { + commit('replaceEvents', [...state.events.filter(e => e.eid !== id), data]) + } + }, async fetchTicketStates({commit, state, getters}) { if (!state.user.token) return; if (state.fetchedData.states > Date.now() - 1000 * 60 * 60 * 24) return; diff --git a/web/src/views/admin/Events.vue b/web/src/views/admin/Events.vue index 1aab608..e2ff952 100644 --- a/web/src/views/admin/Events.vue +++ b/web/src/views/admin/Events.vue @@ -1,50 +1,102 @@ \ No newline at end of file