fix bug and remove unused code

This commit is contained in:
MaysWind
2021-01-09 21:09:40 +08:00
parent 2375e2741b
commit 097eb659f5
+2 -6
View File
@@ -186,7 +186,7 @@
{{ transaction.category.name }} {{ transaction.category.name }}
</span> </span>
<span v-else-if="transaction.type !== $constants.transaction.allTransactionTypes.ModifyBalance && !transaction.category"> <span v-else-if="transaction.type !== $constants.transaction.allTransactionTypes.ModifyBalance && !transaction.category">
{{ transaction.type | transactionTypeName($constants.transaction.allTransactionTypes) }} {{ transaction.type | transactionTypeName($constants.transaction.allTransactionTypes) | t }}
</span> </span>
</div> </div>
<div slot="text" class="transaction-comment" v-if="transaction.comment"> <div slot="text" class="transaction-comment" v-if="transaction.comment">
@@ -414,9 +414,6 @@ export default {
}, },
allCategories() { allCategories() {
return this.$store.state.allTransactionCategoriesMap; return this.$store.state.allTransactionCategoriesMap;
},
allTags() {
return this.$store.state.allTransactionTagsMap;
} }
}, },
created() { created() {
@@ -454,7 +451,6 @@ export default {
const promises = [ const promises = [
self.$store.dispatch('loadAllAccounts', { force: false }), self.$store.dispatch('loadAllAccounts', { force: false }),
self.$store.dispatch('loadAllCategories', { force: false }), self.$store.dispatch('loadAllCategories', { force: false }),
self.$store.dispatch('loadAllTags', { force: false }),
self.$store.dispatch('getTransactions', { self.$store.dispatch('getTransactions', {
reload: true, reload: true,
autoExpand: true, autoExpand: true,
@@ -687,7 +683,7 @@ export default {
return 'Income'; return 'Income';
} else if (type === allTransactionTypes.Expense) { } else if (type === allTransactionTypes.Expense) {
return 'Expense'; return 'Expense';
} else if (type === allTransactionTypes.Income) { } else if (type === allTransactionTypes.Transfer) {
return 'Transfer'; return 'Transfer';
} else { } else {
return 'Transaction'; return 'Transaction';