Merge stores and handle fetching from router
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
<script>
|
||||
export default {
|
||||
props: ['budgetid', 'accountid'],
|
||||
mounted () {
|
||||
this.$store.dispatch("setCurrentBudget", this.budgetid)
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -14,14 +10,14 @@ export default {
|
||||
{{$store.getters.CurrentBudget.Name}}
|
||||
</h1>
|
||||
<ul>
|
||||
<li><router-link :to="'/budget/'+$store.getters.CurrentBudget.ID">Budget</router-link></li>
|
||||
<li><router-link :to="'/budget/'+budgetid">Budget</router-link></li>
|
||||
<li>Reports (Coming Soon)</li>
|
||||
<!--<li><router-link :to="'/budget/'+$store.getters.CurrentBudget.ID+'/all-accounts'">All Accounts</router-link></li>-->
|
||||
<li>
|
||||
On-Budget Accounts
|
||||
<ul v-for="account in $store.getters.OnBudgetAccounts" class="two-valued">
|
||||
<li>
|
||||
<router-link :to="'/budget/'+$store.getters.CurrentBudget.ID+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<router-link :to="'/budget/'+budgetid+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<span>{{account.Balance.Int / 100}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -30,7 +26,7 @@ export default {
|
||||
Off-Budget Accounts
|
||||
<ul v-for="account in $store.getters.OffBudgetAccounts" class="two-valued">
|
||||
<li>
|
||||
<router-link :to="'/budget/'+$store.getters.CurrentBudget.ID+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<router-link :to="'/budget/'+budgetid+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<span>{{account.Balance.Int / 100}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user