Convert frontend to Vue #3

Merged
jacob1123 merged 158 commits from vue into master 2022-02-08 22:20:11 +01:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 0bd63636bb - Show all commits

View File

@ -1,10 +1,5 @@
<script>
export default {
computed: {
dashboard () {
return this.$store.state;
}
},
mounted () {
this.$store.dispatch("fetchDashboard");
}
@ -12,7 +7,7 @@ export default {
</script>
<template>
<div v-if="dashboard != nil" v-for="budget in dashboard.Budgets" class="budget-item">
<div v-for="budget in $store.getters.Budgets" class="budget-item">
<router-link v-bind:to="'/budget/'+budget.ID">{{budget.Name}}</router-link>
<span class="time"></span>
</div>

View File

@ -10,6 +10,11 @@ const dashboard = {
state.Budgets = budgets;
}
},
getters: {
Budgets(state) {
return state.Budgets || [];
}
},
actions: {
fetchDashboard ({state, commit, rootState}) {
fetch("/api/v1/dashboard", {