mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
code refactor
This commit is contained in:
@@ -421,6 +421,7 @@
|
||||
|
||||
<script>
|
||||
import { mapStores } from 'pinia';
|
||||
import { useSettingsStore } from '@/stores/setting.js';
|
||||
import { useUserStore } from '@/stores/user.js';
|
||||
import { useAccountsStore } from '@/stores/account.js';
|
||||
|
||||
@@ -467,7 +468,7 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useUserStore, useAccountsStore),
|
||||
...mapStores(useSettingsStore, useUserStore, useAccountsStore),
|
||||
title() {
|
||||
if (!this.editAccountId) {
|
||||
return 'Add Account';
|
||||
@@ -720,7 +721,13 @@ export default {
|
||||
return this.$t(categoryName);
|
||||
},
|
||||
getAccountBalance(account) {
|
||||
return this.$locale.getDisplayCurrency(account.balance, account.currency)
|
||||
return this.getDisplayCurrency(account.balance, account.currency);
|
||||
},
|
||||
getDisplayCurrency(value, currencyCode) {
|
||||
return this.$locale.getDisplayCurrency(value, currencyCode, {
|
||||
currencyDisplayMode: this.settingsStore.appSettings.currencyDisplayMode,
|
||||
enableThousandsSeparator: this.settingsStore.appSettings.thousandsSeparator
|
||||
});
|
||||
},
|
||||
chooseSuitableIcon(oldCategory, newCategory) {
|
||||
for (let i = 0; i < this.allAccountCategories.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user