Convert frontend to Vue #3
| @@ -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, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user