Fix transaction details

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2020-03-17 21:52:49 -06:00
parent ba1ffd5cc6
commit 6712eef4c2

View file

@ -42,14 +42,14 @@ export default {
if (!transaction || !transaction.categoryId) {
return undefined;
}
return this.$store.getters.category(transaction.categoryId)
return this.$store.getters.categories.find(category => category.id === transaction.categoryId)
},
budget: function(state) {
const transaction = this.$store.getters.transaction
if (!transaction || !transaction.budgetId) {
return undefined;
}
return this.$store.getters.budget(transaction.budgetId)
return this.$store.getters.budgets.find(budget => budget.id === transaction.budgetId)
}
},
methods: {