mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
show currency code in currency selection popup
This commit is contained in:
@@ -11,8 +11,9 @@
|
||||
<f7-list strong inset dividers class="margin-vertical" v-if="exchangeRatesData && exchangeRatesData.exchangeRates && exchangeRatesData.exchangeRates.length">
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
link="#"
|
||||
:header="tt('Base Currency')"
|
||||
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: tt('Currency Name'), searchbarDisableText: tt('Cancel'), appendSearchbarNotFound: tt('No results'), pageTitle: tt('Base Currency'), popupCloseLinkText: tt('Done') }"
|
||||
@click="showBaseCurrencyPopup = true"
|
||||
>
|
||||
<template #title>
|
||||
<div class="no-padding no-margin">
|
||||
@@ -20,11 +21,18 @@
|
||||
<small class="smaller">{{ baseCurrency }}</small>
|
||||
</div>
|
||||
</template>
|
||||
<select v-model="baseCurrency">
|
||||
<option :value="exchangeRate.currencyCode"
|
||||
:key="exchangeRate.currencyCode"
|
||||
v-for="exchangeRate in availableExchangeRates">{{ exchangeRate.currencyDisplayName }}</option>
|
||||
</select>
|
||||
<list-item-selection-popup value-type="item"
|
||||
value-field="currencyCode"
|
||||
title-field="currencyDisplayName"
|
||||
after-field="currencyCode"
|
||||
:title="tt('Base Currency')"
|
||||
:enable-filter="true"
|
||||
:filter-placeholder="tt('Currency Name')"
|
||||
:filter-no-items-text="tt('No results')"
|
||||
:items="availableExchangeRates"
|
||||
v-model:show="showBaseCurrencyPopup"
|
||||
v-model="baseCurrency">
|
||||
</list-item-selection-popup>
|
||||
</f7-list-item>
|
||||
<f7-list-item
|
||||
class="currency-base-amount"
|
||||
@@ -111,6 +119,7 @@ const exchangeRatesStore = useExchangeRatesStore();
|
||||
|
||||
const updating = ref<boolean>(false);
|
||||
const showMoreActionSheet = ref<boolean>(false);
|
||||
const showBaseCurrencyPopup = ref<boolean>(false);
|
||||
const showBaseAmountSheet = ref<boolean>(false);
|
||||
|
||||
const displayBaseAmount = computed<string>(() => formatAmount(baseAmount.value, baseCurrency.value));
|
||||
|
||||
@@ -74,9 +74,10 @@
|
||||
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
link="#"
|
||||
:key="currentLocale + '_currency'"
|
||||
:header="tt('Default Currency')"
|
||||
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: tt('Currency Name'), searchbarDisableText: tt('Cancel'), appendSearchbarNotFound: tt('No results'), pageTitle: tt('Default Currency'), popupCloseLinkText: tt('Done') }"
|
||||
@click="showDefaultCurrencyPopup = true"
|
||||
>
|
||||
<template #title>
|
||||
<f7-block class="no-padding no-margin">
|
||||
@@ -84,11 +85,18 @@
|
||||
<small class="smaller">{{ user.defaultCurrency }}</small>
|
||||
</f7-block>
|
||||
</template>
|
||||
<select autocomplete="transaction-currency" v-model="user.defaultCurrency">
|
||||
<option :value="currency.currencyCode"
|
||||
:key="currency.currencyCode"
|
||||
v-for="currency in allCurrencies">{{ currency.displayName }}</option>
|
||||
</select>
|
||||
<list-item-selection-popup value-type="item"
|
||||
value-field="currencyCode"
|
||||
title-field="displayName"
|
||||
after-field="currencyCode"
|
||||
:title="tt('Default Currency')"
|
||||
:enable-filter="true"
|
||||
:filter-placeholder="tt('Currency Name')"
|
||||
:filter-no-items-text="tt('No results')"
|
||||
:items="allCurrencies"
|
||||
v-model:show="showDefaultCurrencyPopup"
|
||||
v-model="user.defaultCurrency">
|
||||
</list-item-selection-popup>
|
||||
</f7-list-item>
|
||||
|
||||
<f7-list-item
|
||||
@@ -217,6 +225,7 @@ const {
|
||||
const rootStore = useRootStore();
|
||||
|
||||
const usePresetCategories = ref<boolean>(false);
|
||||
const showDefaultCurrencyPopup = ref<boolean>(false);
|
||||
const showPresetCategories = ref<boolean>(false);
|
||||
const showPresetCategoriesMoreActionSheet = ref<boolean>(false);
|
||||
const showPresetCategoriesChangeLocaleSheet = ref<boolean>(false);
|
||||
|
||||
@@ -155,10 +155,11 @@
|
||||
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
link="#"
|
||||
:class="{ 'disabled': editAccountId }"
|
||||
:header="tt('Currency')"
|
||||
:no-chevron="!!editAccountId"
|
||||
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: tt('Currency Name'), searchbarDisableText: tt('Cancel'), appendSearchbarNotFound: tt('No results'), pageTitle: tt('Currency Name'), popupCloseLinkText: tt('Done') }"
|
||||
@click="accountContext.showCurrencyPopup = true"
|
||||
>
|
||||
<template #title>
|
||||
<div class="no-padding no-margin">
|
||||
@@ -166,11 +167,18 @@
|
||||
<small class="smaller">{{ account.currency }}</small>
|
||||
</div>
|
||||
</template>
|
||||
<select autocomplete="transaction-currency" v-model="account.currency">
|
||||
<option :value="currency.currencyCode"
|
||||
:key="currency.currencyCode"
|
||||
v-for="currency in allCurrencies">{{ currency.displayName }}</option>
|
||||
</select>
|
||||
<list-item-selection-popup value-type="item"
|
||||
value-field="currencyCode"
|
||||
title-field="displayName"
|
||||
after-field="currencyCode"
|
||||
:title="tt('Currency Name')"
|
||||
:enable-filter="true"
|
||||
:filter-placeholder="tt('Currency Name')"
|
||||
:filter-no-items-text="tt('No results')"
|
||||
:items="allCurrencies"
|
||||
v-model:show="accountContext.showCurrencyPopup"
|
||||
v-model="account.currency">
|
||||
</list-item-selection-popup>
|
||||
</f7-list-item>
|
||||
|
||||
<f7-list-item
|
||||
@@ -398,10 +406,11 @@
|
||||
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
link="#"
|
||||
:class="{ 'disabled': editAccountId }"
|
||||
:header="tt('Currency')"
|
||||
:no-chevron="!!editAccountId"
|
||||
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: tt('Currency Name'), searchbarDisableText: tt('Cancel'), appendSearchbarNotFound: tt('No results'), pageTitle: tt('Currency Name'), popupCloseLinkText: tt('Done') }"
|
||||
@click="subAccountContexts[idx].showCurrencyPopup = true"
|
||||
>
|
||||
<template #title>
|
||||
<div class="no-padding no-margin">
|
||||
@@ -409,11 +418,18 @@
|
||||
<small class="smaller">{{ subAccount.currency }}</small>
|
||||
</div>
|
||||
</template>
|
||||
<select autocomplete="transaction-currency" v-model="subAccount.currency">
|
||||
<option :value="currency.currencyCode"
|
||||
:key="currency.currencyCode"
|
||||
v-for="currency in allCurrencies">{{ currency.displayName }}</option>
|
||||
</select>
|
||||
<list-item-selection-popup value-type="item"
|
||||
value-field="currencyCode"
|
||||
title-field="displayName"
|
||||
after-field="currencyCode"
|
||||
:title="tt('Currency Name')"
|
||||
:enable-filter="true"
|
||||
:filter-placeholder="tt('Currency Name')"
|
||||
:filter-no-items-text="tt('No results')"
|
||||
:items="allCurrencies"
|
||||
v-model:show="subAccountContexts[idx].showCurrencyPopup"
|
||||
v-model="subAccount.currency">
|
||||
</list-item-selection-popup>
|
||||
</f7-list-item>
|
||||
|
||||
<f7-list-item
|
||||
@@ -516,6 +532,7 @@ import {
|
||||
interface AccountContext {
|
||||
showIconSelectionSheet: boolean;
|
||||
showColorSelectionSheet: boolean;
|
||||
showCurrencyPopup: boolean;
|
||||
showBalanceSheet: boolean;
|
||||
showBalanceDateTimeSheet: boolean;
|
||||
balanceDateTimeSheetMode: string;
|
||||
@@ -554,6 +571,7 @@ const accountsStore = useAccountsStore();
|
||||
const DEFAULT_ACCOUNT_CONTEXT: AccountContext = {
|
||||
showIconSelectionSheet: false,
|
||||
showColorSelectionSheet: false,
|
||||
showCurrencyPopup: false,
|
||||
showBalanceSheet: false,
|
||||
showBalanceDateTimeSheet: false,
|
||||
balanceDateTimeSheetMode: 'time'
|
||||
|
||||
@@ -141,8 +141,9 @@
|
||||
|
||||
<f7-list-item
|
||||
class="list-item-with-header-and-title list-item-no-item-after"
|
||||
link="#"
|
||||
:header="tt('Default Currency')"
|
||||
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: tt('Currency Name'), searchbarDisableText: tt('Cancel'), appendSearchbarNotFound: tt('No results'), pageTitle: tt('Default Currency'), popupCloseLinkText: tt('Done') }"
|
||||
@click="showDefaultCurrencyPopup = true"
|
||||
>
|
||||
<template #title>
|
||||
<f7-block class="no-padding no-margin">
|
||||
@@ -150,11 +151,18 @@
|
||||
<small class="smaller">{{ newProfile.defaultCurrency }}</small>
|
||||
</f7-block>
|
||||
</template>
|
||||
<select autocomplete="transaction-currency" v-model="newProfile.defaultCurrency">
|
||||
<option :value="currency.currencyCode"
|
||||
:key="currency.currencyCode"
|
||||
v-for="currency in allCurrencies">{{ currency.displayName }}</option>
|
||||
</select>
|
||||
<list-item-selection-popup value-type="item"
|
||||
value-field="currencyCode"
|
||||
title-field="displayName"
|
||||
after-field="currencyCode"
|
||||
:title="tt('Default Currency')"
|
||||
:enable-filter="true"
|
||||
:filter-placeholder="tt('Currency Name')"
|
||||
:filter-no-items-text="tt('No results')"
|
||||
:items="allCurrencies"
|
||||
v-model:show="showDefaultCurrencyPopup"
|
||||
v-model="newProfile.defaultCurrency">
|
||||
</list-item-selection-popup>
|
||||
</f7-list-item>
|
||||
|
||||
<f7-list-item
|
||||
@@ -402,6 +410,7 @@ const currentPassword = ref<string>('');
|
||||
const loadingError = ref<unknown | null>(null);
|
||||
const showInputPasswordSheet = ref<boolean>(false);
|
||||
const showAccountSheet = ref<boolean>(false);
|
||||
const showDefaultCurrencyPopup = ref<boolean>(false);
|
||||
const showMoreActionSheet = ref<boolean>(false);
|
||||
|
||||
const currentLanguageName = computed<string>(() => {
|
||||
|
||||
Reference in New Issue
Block a user