diff --git a/web/src/main.js b/web/src/main.js index cb1f72a..68dfa0f 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -12,3 +12,12 @@ app.use(router) app.use(store) app.use(vuetify) app.mount('#app') + +router.beforeEach(async (to, from, next) => { + await store.dispatch("setCurrentBudget", to.params.budgetid); + await store.dispatch("setCurrentAccount", { + accountid: to.params.accountid, + budgetid: to.params.budgetid + }); + next(); +}) diff --git a/web/src/pages/Account.vue b/web/src/pages/Account.vue index b166ca6..88890cb 100644 --- a/web/src/pages/Account.vue +++ b/web/src/pages/Account.vue @@ -1,13 +1,5 @@ @@ -21,9 +13,6 @@ export default { - diff --git a/web/src/pages/BudgetSidebar.vue b/web/src/pages/BudgetSidebar.vue index 3ef8ea9..2b934c7 100644 --- a/web/src/pages/BudgetSidebar.vue +++ b/web/src/pages/BudgetSidebar.vue @@ -1,11 +1,7 @@
{{transaction.Date.substring(0, 10)}} {{transaction.Payee}}