diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue
index 3d7c584..6e60a75 100644
--- a/src/components/Navbar.vue
+++ b/src/components/Navbar.vue
@@ -67,7 +67,7 @@ export default {
views: [
{'title':'items','path':'items'},
{'title':'boxes','path':'boxes'},
- {'title':'mass-edit','path':'/#'},
+ //{'title':'mass-edit','path':'massedit'},
],
links: [
{'title':'howto engel','path':'/howto/'}
diff --git a/src/router.js b/src/router.js
index 9bed565..6954e19 100644
--- a/src/router.js
+++ b/src/router.js
@@ -9,9 +9,10 @@ import Vue from 'vue';
Vue.use(VueRouter);
const routes = [
- { path: '/', redirect: '/items/36C3' },
- { path: '/boxes/:event', component: Boxes},
- { path: '/items/:event', component: Items},
+ { path: '/', redirect: '/36C3/items' },
+ { path: '/howto', component: Error},
+ { path: '/:event/boxes', name: 'boxes', component: Boxes},
+ { path: '/:event/items', name: 'items', component: Items},
{ path: '*', component: Error},
];
diff --git a/src/store/index.js b/src/store/index.js
index 536063d..71dde0a 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -14,23 +14,22 @@ const store = new Vuex.Store({
events: Array,
layout: 'cards',
loadedItems: Array,
- currentview: 'items',
+ loadedBoxes: Array,
},
getters: {
getEventSlug: state => state.route.params.event,
- getActiveView: state => state.currentview,
+ getActiveView: state => state.route.name,
},
mutations: {
replaceEvents(state, events) {
state.events = events;
- //if (!state.activeEvent || !events.includes(state.activeEvent))
- // state.activeEvent = _.reverse(events)[0];
},
changeEvent(state, event) {
- router.push({path: `/${state.currentview}/${event.slug}`});
+ router.push({path: `/${event.slug}/${state.currentview}`});
},
changeView(state, link) {
- router.push({path: `/${link.path}/${state.route.params.event}`});
+ router.push({path: `/${state.route.params.event}/${link.path}`});
+ state.currentview = link.path;
},
replaceLoadedItems(state, newItems) {
state.loadedItems = newItems;
@@ -59,8 +58,6 @@ const store = new Vuex.Store({
auth: getAuth(),
});
- console.log(resp.data);
-
commit('replaceLoadedItems', resp.data);
}
}
diff --git a/src/views/Boxes.vue b/src/views/Boxes.vue
index 8ca29d9..06575b7 100644
--- a/src/views/Boxes.vue
+++ b/src/views/Boxes.vue
@@ -1,10 +1,24 @@
- boxes
+