Remove vuex
This commit is contained in:
@ -20,35 +20,9 @@ export const useSessionStore = defineStore('session', {
|
||||
Budgets: new Map<string, Budget>(),
|
||||
}),
|
||||
getters: {
|
||||
Budgets(): IterableIterator<Budget> {
|
||||
return this.Budgets.values();
|
||||
},
|
||||
AuthHeaders(): HeadersInit {
|
||||
return {
|
||||
'Authorization': 'Bearer ' + this.Token
|
||||
}
|
||||
},
|
||||
/*// must define return type because of using `this`
|
||||
fullUserDetails (state): FullUserDetails {
|
||||
// import from other stores
|
||||
const authPreferencesStore = useAuthPreferencesStore()
|
||||
const authEmailStore = useAuthEmailStore()
|
||||
return {
|
||||
...state,
|
||||
// other getters now on `this`
|
||||
fullName: this.fullName,
|
||||
...authPreferencesStore.$state,
|
||||
...authEmailStore.details
|
||||
}
|
||||
|
||||
// alternative if other modules are still in Vuex
|
||||
// return {
|
||||
// ...state,
|
||||
// fullName: this.fullName,
|
||||
// ...vuexStore.state.auth.preferences,
|
||||
// ...vuexStore.getters['auth/email'].details
|
||||
// }
|
||||
}*/
|
||||
BudgetsList: (state) => state.Budgets.values(),
|
||||
AuthHeaders: (state) => ({'Authorization': 'Bearer ' + state.Token}),
|
||||
LoggedIn: (state) => state.Token != null,
|
||||
},
|
||||
actions: {
|
||||
setTitle(title : string) {
|
||||
|
Reference in New Issue
Block a user