27 lines
609 B
JavaScript
27 lines
609 B
JavaScript
import { createApp } from 'vue/dist/vue.esm-bundler'
|
|
import { createStore } from 'vuex'
|
|
import App from './App.vue'
|
|
import router from './router/index.js'
|
|
|
|
const store = createStore({
|
|
state () {
|
|
return {
|
|
Budgets: [],
|
|
CurrentBudget: null,
|
|
}
|
|
},
|
|
mutations: {
|
|
getDashboard (state) {
|
|
fetch("/api/v1/dashboard")
|
|
.then(x => x.json())
|
|
.then(x => console.log(x))
|
|
.then(x => state.Budgets = x.Budgets);
|
|
}
|
|
}
|
|
})
|
|
|
|
const app = createApp(App)
|
|
app.use(router)
|
|
app.use(store)
|
|
app.mount('#app')
|