Implement account-view
This commit is contained in:
39
web/src/pages/Account.vue
Normal file
39
web/src/pages/Account.vue
Normal file
@ -0,0 +1,39 @@
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
this.$store.dispatch("setCurrentAccount", {budgetid: this.budgetid, accountid: this.accountid})
|
||||
},
|
||||
props: ["budgetid", "accountid"]
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-container>
|
||||
<table class="container col-lg-12" id="content">
|
||||
<tr v-for="transaction in $store.getters.Transactions" class="{{transaction.Date.After now ? 'future' : ''}}">
|
||||
<td>{{transaction.Date}}</td>
|
||||
<td>
|
||||
{{transaction.Account}}
|
||||
</td>
|
||||
<td>
|
||||
{{transaction.Payee}}
|
||||
</td>
|
||||
<td>
|
||||
{{transaction.CategoryGroup ? transaction.CategoryGroup + " : " + transaction.Category : ""}}
|
||||
</td>
|
||||
<td>
|
||||
{{transaction.GroupID ? "☀" : ""}}
|
||||
</td>
|
||||
<td>
|
||||
<a :href="'/budget/'+$store.getters.CurrentBudget.ID+'/transaction/'+transaction.ID">{{transaction.Memo}}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{transaction.Amount}}
|
||||
</td>
|
||||
<td>
|
||||
{{transaction.Status}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</v-container>
|
||||
</template>
|
@ -1,6 +1,6 @@
|
||||
<script>
|
||||
export default {
|
||||
props: ['budgetid'],
|
||||
props: ['budgetid', 'accountid'],
|
||||
mounted () {
|
||||
this.$store.dispatch("setCurrentBudget", this.budgetid)
|
||||
}
|
||||
@ -22,7 +22,7 @@ export default {
|
||||
On-Budget Accounts
|
||||
<ul v-for="account in $store.getters.OnBudgetAccounts" class="two-valued">
|
||||
<li>
|
||||
<router-link :to="'/budget/'+$store.getters.CurrentBudget.ID+'/account/'+$store.getters.CurrentBudget.ID">{{account.Name}}</router-link>
|
||||
<router-link :to="'/budget/'+$store.getters.CurrentBudget.ID+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<span>{{account.Balance.Int / 100}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -31,7 +31,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/'+$store.getters.CurrentBudget.ID">{{account.Name}}</router-link>
|
||||
<router-link :to="'/budget/'+$store.getters.CurrentBudget.ID+'/account/'+account.ID">{{account.Name}}</router-link>
|
||||
<span>{{account.Balance.Int / 100}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user