code refactor

This commit is contained in:
MaysWind
2021-01-04 23:52:57 +08:00
parent 5077b93105
commit b7589e57f2
20 changed files with 561 additions and 293 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ export default {
}
},
defaultCurrency() {
return this.$user.getUserInfo() ? this.$user.getUserInfo().defaultCurrency : this.$t('default.currency');
return this.$store.getters.currentUserDefaultCurrency || this.$t('default.currency');
},
hasAvailableExpenseCategories() {
if (!this.allCategories || !this.allCategories[this.$constants.category.allCategoryTypes.Expense] || !this.allCategories[this.$constants.category.allCategoryTypes.Expense].length) {
+1 -1
View File
@@ -394,7 +394,7 @@ export default {
},
computed: {
defaultCurrency() {
return this.$user.getUserInfo() ? this.$user.getUserInfo().defaultCurrency : this.$t('default.currency');
return this.$store.getters.currentUserDefaultCurrency || this.$t('default.currency');
},
noTransaction() {
for (let i = 0; i < this.transactions.length; i++) {