Migrate farther

This commit is contained in:
2022-02-09 23:12:26 +00:00
parent 2d0737a10c
commit 08330ce33c
3 changed files with 21 additions and 25 deletions

View File

@ -59,31 +59,6 @@ export const store = createStore<State>({
await dispatch(FETCH_BUDGET, budgetid)
},
},
getters: {
AuthHeaders(state) {
return {
'Authorization': 'Bearer ' + state.Session.Token
}
},
CurrentBudget(state) : Budget | undefined {
if (state.CurrentBudgetID == null)
return undefined;
return state.Budgets.get(state.CurrentBudgetID);
},
CurrentBudgetID(state) : string | undefined {
return state.CurrentBudgetID;
},
CurrentBudgetName(state) : string {
if (state.CurrentBudgetID == null)
return "";
const currentBudget = state.Budgets.get(state.CurrentBudgetID);
if(currentBudget != undefined)
return currentBudget.Name;
return "";
},
},
plugins: [createLogger()],
modules: {
budget: budgetStore