mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 08:14:25 +08:00
show currency code in currency select
This commit is contained in:
@@ -99,21 +99,10 @@
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-autocomplete
|
||||
item-title="displayName"
|
||||
item-value="currencyCode"
|
||||
auto-select-first
|
||||
:disabled="submitting || navigateToHomePage"
|
||||
:label="tt('Default Currency')"
|
||||
:placeholder="tt('Default Currency')"
|
||||
:items="allCurrencies"
|
||||
:no-data-text="tt('No results')"
|
||||
v-model="user.defaultCurrency"
|
||||
>
|
||||
<template #append-inner>
|
||||
<small class="text-field-append-text smaller">{{ user.defaultCurrency }}</small>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<currency-select :disabled="submitting || navigateToHomePage"
|
||||
:label="tt('Default Currency')"
|
||||
:placeholder="tt('Default Currency')"
|
||||
v-model="user.defaultCurrency" />
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
@@ -229,7 +218,6 @@ import { useSignupPageBase } from '@/views/base/SignupPageBase.ts';
|
||||
import { useRootStore } from '@/stores/index.ts';
|
||||
|
||||
import type { PartialRecord, TypeAndDisplayName } from '@/core/base.ts';
|
||||
import type { LocalizedCurrencyInfo } from '@/core/currency.ts';
|
||||
import { type LocalizedPresetCategory, CategoryType } from '@/core/category.ts';
|
||||
import { ThemeType } from '@/core/theme.ts';
|
||||
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
|
||||
@@ -248,7 +236,7 @@ type SnackBarType = InstanceType<typeof SnackBar>;
|
||||
const router = useRouter();
|
||||
const theme = useTheme();
|
||||
|
||||
const { tt, getAllCurrencies, getAllWeekDays, getAllTransactionDefaultCategories } = useI18n();
|
||||
const { tt, getAllWeekDays, getAllTransactionDefaultCategories } = useI18n();
|
||||
|
||||
const {
|
||||
user,
|
||||
@@ -270,7 +258,6 @@ const usePresetCategories = ref<boolean>(false);
|
||||
const finalResultMessage = ref<string | null>(null);
|
||||
const navigateToHomePage = ref<boolean>(false);
|
||||
|
||||
const allCurrencies = computed<LocalizedCurrencyInfo[]>(() => getAllCurrencies());
|
||||
const allWeekDays = computed<TypeAndDisplayName[]>(() => getAllWeekDays());
|
||||
const allPresetCategories = computed<PartialRecord<CategoryType, LocalizedPresetCategory[]>>(() => getAllTransactionDefaultCategories(0, currentLocale.value));
|
||||
const isDarkMode = computed<boolean>(() => theme.global.name.value === ThemeType.Dark);
|
||||
|
||||
@@ -109,22 +109,10 @@
|
||||
v-model="selectedAccount.color" />
|
||||
</v-col>
|
||||
<v-col cols="12" :md="currentAccountIndex < 0 && isAccountSupportCreditCardStatementDate ? 6 : 12" v-if="account.type === AccountType.SingleAccount.type || currentAccountIndex >= 0">
|
||||
<v-autocomplete
|
||||
item-title="displayName"
|
||||
item-value="currencyCode"
|
||||
auto-select-first
|
||||
persistent-placeholder
|
||||
:disabled="loading || submitting || !!editAccountId"
|
||||
:label="tt('Currency')"
|
||||
:placeholder="tt('Currency')"
|
||||
:items="allCurrencies"
|
||||
:no-data-text="tt('No results')"
|
||||
v-model="selectedAccount.currency"
|
||||
>
|
||||
<template #append-inner>
|
||||
<small class="text-field-append-text smaller">{{ selectedAccount.currency }}</small>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<currency-select :disabled="loading || submitting || !!editAccountId"
|
||||
:label="tt('Currency')"
|
||||
:placeholder="tt('Currency')"
|
||||
v-model="selectedAccount.currency" />
|
||||
</v-col>
|
||||
<v-col cols="12" :md="account.type === AccountType.SingleAccount.type || currentAccountIndex >= 0 ? 6 : 12" v-if="currentAccountIndex < 0 && isAccountSupportCreditCardStatementDate">
|
||||
<v-autocomplete
|
||||
@@ -248,7 +236,6 @@ const {
|
||||
saveButtonTitle,
|
||||
allAccountCategories,
|
||||
allAccountTypes,
|
||||
allCurrencies,
|
||||
allAvailableMonthDays,
|
||||
isAccountSupportCreditCardStatementDate,
|
||||
isInputEmpty,
|
||||
|
||||
@@ -124,22 +124,10 @@
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<v-autocomplete
|
||||
item-title="displayName"
|
||||
item-value="currencyCode"
|
||||
auto-select-first
|
||||
persistent-placeholder
|
||||
:disabled="loading || saving"
|
||||
:label="tt('Default Currency')"
|
||||
:placeholder="tt('Default Currency')"
|
||||
:items="allCurrencies"
|
||||
:no-data-text="tt('No results')"
|
||||
v-model="newProfile.defaultCurrency"
|
||||
>
|
||||
<template #append-inner>
|
||||
<small class="text-field-append-text smaller">{{ newProfile.defaultCurrency }}</small>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<currency-select :disabled="loading || saving"
|
||||
:label="tt('Default Currency')"
|
||||
:placeholder="tt('Default Currency')"
|
||||
v-model="newProfile.defaultCurrency" />
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
@@ -361,7 +349,6 @@ const {
|
||||
loading,
|
||||
resending,
|
||||
saving,
|
||||
allCurrencies,
|
||||
allVisibleAccounts,
|
||||
allVisibleCategorizedAccounts,
|
||||
allWeekDays,
|
||||
|
||||
Reference in New Issue
Block a user