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