fetchBudget whenever current budget changes
This commit is contained in:
parent
59ae9f978a
commit
339c230756
@ -54,7 +54,6 @@ const dashboard = {
|
||||
commit("setCurrentBudget", element);
|
||||
break
|
||||
}
|
||||
await dispatch("fetchBudget", budgetid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user