From 90b9d63bb551f56d33fac4addc0ab71263cc8cd9 Mon Sep 17 00:00:00 2001 From: jedi Date: Sun, 22 Dec 2019 22:32:15 +0100 Subject: [PATCH] add direct link from box view to items filtered by box --- src/components/Table.vue | 6 ++++++ src/store/index.js | 3 +++ src/views/Boxes.vue | 10 ++++++++-- src/views/Items.vue | 9 +++++++-- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/components/Table.vue b/src/components/Table.vue index 0cef0c2..6cd6dee 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -24,11 +24,17 @@ > + actions {{ item[column] }} + +
+ +
+ diff --git a/src/store/index.js b/src/store/index.js index 56ab823..88e6483 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -64,6 +64,9 @@ const store = new Vuex.Store({ changeView({ getters }, link) { router.push({path: `/${getters.getEventSlug}/${link.path}`}); }, + showBoxContent({ getters }, box) { + router.push({path: `/${getters.getEventSlug}/items`, query: {box}}); + }, async loadEventItems({ commit, getters }) { const { data } = await axios.get(`/1/${getters.getEventSlug}/items`); commit('replaceLoadedItems', data); diff --git a/src/views/Boxes.vue b/src/views/Boxes.vue index f1d1f19..2cda19e 100644 --- a/src/views/Boxes.vue +++ b/src/views/Boxes.vue @@ -4,7 +4,11 @@
@@ -14,12 +18,14 @@ diff --git a/src/views/Items.vue b/src/views/Items.vue index 0502ea2..48b9601 100644 --- a/src/views/Items.vue +++ b/src/views/Items.vue @@ -16,7 +16,10 @@