diff --git a/web/src/store/dashboard/index.js b/web/src/store/dashboard/index.js index 4138f41..632b249 100644 --- a/web/src/store/dashboard/index.js +++ b/web/src/store/dashboard/index.js @@ -54,7 +54,6 @@ const dashboard = { commit("setCurrentBudget", element); break } - await dispatch("fetchBudget", budgetid); } } } diff --git a/web/src/store/index.js b/web/src/store/index.js index aa21cd8..43d58d2 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -38,6 +38,13 @@ const store = createStore({ } }) +store.subscribe((mutation, state) => { + if(mutation.type == "setCurrentBudget"){ + console.log(mutation, state); + store.dispatch("fetchBudget", mutation.payload.ID) + } +}) + store.subscribe((mutation, state) => { let persistedState = { Session: state.Session,