mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
show currency code in currency select
This commit is contained in:
@@ -506,7 +506,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import type { Router } from 'framework7/types';
|
||||
|
||||
import { useI18n } from '@/locales/helpers.ts';
|
||||
@@ -515,6 +515,7 @@ import { useAccountEditPageBaseBase } from '@/views/base/accounts/AccountEditPag
|
||||
|
||||
import { useAccountsStore } from '@/stores/account.ts';
|
||||
|
||||
import type { LocalizedCurrencyInfo } from '@/core/currency.ts';
|
||||
import { AccountType } from '@/core/account.ts';
|
||||
import { ALL_ACCOUNT_ICONS } from '@/consts/icon.ts';
|
||||
import { ALL_ACCOUNT_COLORS } from '@/consts/color.ts';
|
||||
@@ -543,7 +544,7 @@ const props = defineProps<{
|
||||
f7router: Router.Router;
|
||||
}>();
|
||||
|
||||
const { tt, getCurrencyName, formatUnixTimeToLongDate, formatUnixTimeToLongTime, formatAmountWithCurrency } = useI18n();
|
||||
const { tt, getAllCurrencies, getCurrencyName, formatUnixTimeToLongDate, formatUnixTimeToLongTime, formatAmountWithCurrency } = useI18n();
|
||||
const { showAlert, showToast, routeBackOnError } = useI18nUIComponents();
|
||||
const {
|
||||
editAccountId,
|
||||
@@ -556,7 +557,6 @@ const {
|
||||
saveButtonTitle,
|
||||
allAccountCategories,
|
||||
allAccountTypes,
|
||||
allCurrencies,
|
||||
allAvailableMonthDays,
|
||||
isAccountSupportCreditCardStatementDate,
|
||||
getAccountCreditCardStatementDate,
|
||||
@@ -586,6 +586,8 @@ const showAccountTypeSheet = ref<boolean>(false);
|
||||
const showMoreActionSheet = ref<boolean>(false);
|
||||
const showDeleteActionSheet = ref<boolean>(false);
|
||||
|
||||
const allCurrencies = computed<LocalizedCurrencyInfo[]>(() => getAllCurrencies());
|
||||
|
||||
function formatAccountDisplayBalance(selectedAccount: Account): string {
|
||||
const balance = account.value.isLiability ? -selectedAccount.balance : selectedAccount.balance;
|
||||
return formatAmountWithCurrency(balance, selectedAccount.currency);
|
||||
|
||||
@@ -353,6 +353,8 @@ import { useRootStore } from '@/stores/index.ts';
|
||||
import { useUserStore } from '@/stores/user.ts';
|
||||
import { useAccountsStore } from '@/stores/account.ts';
|
||||
|
||||
import type { LocalizedCurrencyInfo } from '@/core/currency.ts';
|
||||
|
||||
import type { UserProfileResponse } from '@/models/user.ts';
|
||||
import { Account } from '@/models/account.ts';
|
||||
|
||||
@@ -363,7 +365,7 @@ const props = defineProps<{
|
||||
f7router: Router.Router;
|
||||
}>();
|
||||
|
||||
const { tt, getAllLanguageOptions, getCurrencyName } = useI18n();
|
||||
const { tt, getAllLanguageOptions, getAllCurrencies, getCurrencyName } = useI18n();
|
||||
const { showAlert, showToast, routeBackOnError } = useI18nUIComponents();
|
||||
|
||||
const {
|
||||
@@ -372,7 +374,6 @@ const {
|
||||
loading,
|
||||
resending,
|
||||
saving,
|
||||
allCurrencies,
|
||||
allAccounts,
|
||||
allVisibleAccounts,
|
||||
allVisibleCategorizedAccounts,
|
||||
@@ -414,6 +415,7 @@ const showDefaultCurrencyPopup = ref<boolean>(false);
|
||||
const showMoreActionSheet = ref<boolean>(false);
|
||||
|
||||
const allLanguages = computed<LanguageOption[]>(() => getAllLanguageOptions(true));
|
||||
const allCurrencies = computed<LocalizedCurrencyInfo[]>(() => getAllCurrencies());
|
||||
|
||||
const currentLanguageName = computed<string>(() => {
|
||||
for (let i = 0; i < allLanguages.value.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user