Implement dummy Budget-Settings and extract setTitle mutation
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { TITLE } from "../mutation-types";
|
||||
|
||||
const budget = {
|
||||
state () {
|
||||
return {
|
||||
@ -62,7 +64,7 @@ const budget = {
|
||||
continue
|
||||
|
||||
commit("setCurrentAccount", element);
|
||||
commit("setTitle", element.Name);
|
||||
commit(TITLE, element.Name);
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { createStore } from 'vuex'
|
||||
import dashboard from './dashboard/index'
|
||||
import budget from './budget/index'
|
||||
import { LOGIN_SUCCESS, LOGOUT } from './mutation-types'
|
||||
import { LOGIN_SUCCESS, LOGOUT, TITLE } from './mutation-types'
|
||||
|
||||
const store = createStore({
|
||||
state () {
|
||||
@ -21,7 +21,7 @@ const store = createStore({
|
||||
);
|
||||
}
|
||||
},
|
||||
setTitle (state, title) {
|
||||
[TITLE](state, title) {
|
||||
document.title = "Budgeteer - " + title;
|
||||
},
|
||||
[LOGIN_SUCCESS](state, session) {
|
||||
|
Reference in New Issue
Block a user