From cd4d230d296333797f9c4b519d4d9d460543b7e3 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 17 Aug 2025 01:55:19 +0800 Subject: [PATCH] support changing numeral system --- cmd/user_data.go | 3 +- pkg/api/users.go | 27 +- pkg/core/numeral.go | 34 ++ pkg/models/user.go | 12 +- pkg/services/users.go | 12 +- src/components/base/CommonNumberInputBase.ts | 14 +- src/components/base/NumberInputBase.ts | 47 ++- src/components/base/PieChartBase.ts | 6 +- src/components/common/PinCodeInput.vue | 30 +- .../desktop/AccountBalanceTrendsChart.vue | 24 +- src/components/desktop/AmountInput.vue | 70 ++-- src/components/desktop/MonthlyTrendsChart.vue | 28 +- src/components/desktop/PieChart.vue | 4 +- .../mobile/AccountBalanceTrendsBarChart.vue | 4 +- .../mobile/MonthlyTrendsBarChart.vue | 12 +- src/components/mobile/NumberPadSheet.vue | 100 +++--- src/consts/numeral.ts | 5 + src/core/numeral.ts | 171 +++++++++- src/lib/currency.ts | 8 +- src/lib/numeral.ts | 318 ++++++++---------- src/locales/de.json | 7 + src/locales/en.json | 7 + src/locales/es.json | 7 + src/locales/helpers.ts | 262 ++++++++++----- src/locales/it.json | 7 + src/locales/ja.json | 7 + src/locales/nl.json | 7 + src/locales/pt_BR.json | 7 + src/locales/ru.json | 7 + src/locales/uk.json | 7 + src/locales/vi.json | 7 + src/locales/zh_Hans.json | 7 + src/locales/zh_Hant.json | 7 + src/models/account.ts | 3 +- src/models/user.ts | 23 +- src/stores/account.ts | 75 +++-- src/stores/user.ts | 18 +- src/views/base/ExchangeRatesPageBase.ts | 4 +- src/views/base/HomePageBase.ts | 21 +- .../base/accounts/AccountListPageBase.ts | 29 +- .../ReconciliationStatementPageBase.ts | 41 +-- .../StatisticsTransactionPageBase.ts | 7 +- .../transactions/TransactionEditPageBase.ts | 9 +- .../transactions/TransactionListPageBase.ts | 13 +- .../base/users/DataManagementPageBase.ts | 16 +- src/views/base/users/UserProfilePageBase.ts | 16 +- .../dialogs/ReconciliationStatementDialog.vue | 4 +- src/views/desktop/exchangerates/ListPage.vue | 32 +- .../cards/MonthlyIncomeAndExpenseCard.vue | 14 +- .../desktop/statistics/TransactionPage.vue | 16 +- .../transactions/import/ImportDialog.vue | 8 +- .../settings/tabs/UserBasicSettingTab.vue | 16 +- src/views/mobile/accounts/EditPage.vue | 13 +- .../accounts/ReconciliationStatementPage.vue | 6 +- src/views/mobile/exchangerates/ListPage.vue | 34 +- .../mobile/settings/TextSizeSettingsPage.vue | 8 +- .../mobile/statistics/TransactionPage.vue | 4 +- .../mobile/transactions/AmountFilterPage.vue | 6 +- src/views/mobile/users/UserProfilePage.vue | 24 +- 59 files changed, 1153 insertions(+), 582 deletions(-) diff --git a/cmd/user_data.go b/cmd/user_data.go index dfae76d7..07d5548f 100644 --- a/cmd/user_data.go +++ b/cmd/user_data.go @@ -951,10 +951,11 @@ func printUserInfo(user *models.User) { fmt.Printf("[LongTimeFormat] %s (%d)\n", user.LongTimeFormat, user.LongTimeFormat) fmt.Printf("[ShortTimeFormat] %s (%d)\n", user.ShortTimeFormat, user.ShortTimeFormat) fmt.Printf("[FiscalYearFormat] %s (%d)\n", user.FiscalYearFormat, user.FiscalYearFormat) + fmt.Printf("[CurrencyDisplayType] %s (%d)\n", user.CurrencyDisplayType, user.CurrencyDisplayType) + fmt.Printf("[NumeralSystem] %s (%d)\n", user.NumeralSystem, user.NumeralSystem) fmt.Printf("[DecimalSeparator] %s (%d)\n", user.DecimalSeparator, user.DecimalSeparator) fmt.Printf("[DigitGroupingSymbol] %s (%d)\n", user.DigitGroupingSymbol, user.DigitGroupingSymbol) fmt.Printf("[DigitGrouping] %s (%d)\n", user.DigitGrouping, user.DigitGrouping) - fmt.Printf("[CurrencyDisplayType] %s (%d)\n", user.CurrencyDisplayType, user.CurrencyDisplayType) fmt.Printf("[CoordinateDisplayType] %s (%d)\n", user.CoordinateDisplayType, user.CoordinateDisplayType) fmt.Printf("[ExpenseAmountColor] %s (%d)\n", user.ExpenseAmountColor, user.ExpenseAmountColor) fmt.Printf("[IncomeAmountColor] %s (%d)\n", user.IncomeAmountColor, user.IncomeAmountColor) diff --git a/pkg/api/users.go b/pkg/api/users.go index 257b5710..93871546 100644 --- a/pkg/api/users.go +++ b/pkg/api/users.go @@ -404,6 +404,24 @@ func (a *UsersApi) UserUpdateProfileHandler(c *core.WebContext) (any, *errs.Erro userNew.FiscalYearFormat = core.FISCAL_YEAR_FORMAT_INVALID } + if userUpdateReq.CurrencyDisplayType != nil && *userUpdateReq.CurrencyDisplayType != user.CurrencyDisplayType { + user.CurrencyDisplayType = *userUpdateReq.CurrencyDisplayType + userNew.CurrencyDisplayType = *userUpdateReq.CurrencyDisplayType + modifyProfileBasicInfo = true + anythingUpdate = true + } else { + userNew.CurrencyDisplayType = core.CURRENCY_DISPLAY_TYPE_INVALID + } + + if userUpdateReq.NumeralSystem != nil && *userUpdateReq.NumeralSystem != user.NumeralSystem { + user.NumeralSystem = *userUpdateReq.NumeralSystem + userNew.NumeralSystem = *userUpdateReq.NumeralSystem + modifyProfileBasicInfo = true + anythingUpdate = true + } else { + userNew.NumeralSystem = core.NUMERAL_SYSTEM_INVALID + } + if userUpdateReq.DecimalSeparator != nil && *userUpdateReq.DecimalSeparator != user.DecimalSeparator { user.DecimalSeparator = *userUpdateReq.DecimalSeparator userNew.DecimalSeparator = *userUpdateReq.DecimalSeparator @@ -431,15 +449,6 @@ func (a *UsersApi) UserUpdateProfileHandler(c *core.WebContext) (any, *errs.Erro userNew.DigitGrouping = core.DIGIT_GROUPING_TYPE_INVALID } - if userUpdateReq.CurrencyDisplayType != nil && *userUpdateReq.CurrencyDisplayType != user.CurrencyDisplayType { - user.CurrencyDisplayType = *userUpdateReq.CurrencyDisplayType - userNew.CurrencyDisplayType = *userUpdateReq.CurrencyDisplayType - modifyProfileBasicInfo = true - anythingUpdate = true - } else { - userNew.CurrencyDisplayType = core.CURRENCY_DISPLAY_TYPE_INVALID - } - if userUpdateReq.CoordinateDisplayType != nil && *userUpdateReq.CoordinateDisplayType != user.CoordinateDisplayType { user.CoordinateDisplayType = *userUpdateReq.CoordinateDisplayType userNew.CoordinateDisplayType = *userUpdateReq.CoordinateDisplayType diff --git a/pkg/core/numeral.go b/pkg/core/numeral.go index 86549557..2dd42de7 100644 --- a/pkg/core/numeral.go +++ b/pkg/core/numeral.go @@ -4,6 +4,40 @@ import ( "fmt" ) +// NumeralSystem represents the type of numeral system +type NumeralSystem byte + +// Numeral System +const ( + NUMERAL_SYSTEM_DEFAULT NumeralSystem = 0 + NUMERAL_SYSTEM_WESTERN_ARABIC_NUMERALS NumeralSystem = 1 + NUMERAL_SYSTEM_EASTERN_ARABIC_NUMERALS NumeralSystem = 2 + NUMERAL_SYSTEM_PERSIAN_DIGITS NumeralSystem = 3 + NUMERAL_SYSTEM_BURMESE_NUMERALS NumeralSystem = 4 + NUMERAL_SYSTEM_DEVANAGARI_NUMERALS NumeralSystem = 5 + NUMERAL_SYSTEM_INVALID NumeralSystem = 255 +) + +// String returns a textual representation of the decimal separator enum +func (f NumeralSystem) String() string { + switch f { + case NUMERAL_SYSTEM_DEFAULT: + return "Default" + case NUMERAL_SYSTEM_WESTERN_ARABIC_NUMERALS: + return "Western Arabic Numerals" + case NUMERAL_SYSTEM_EASTERN_ARABIC_NUMERALS: + return "Eastern Arabic Numerals" + case NUMERAL_SYSTEM_PERSIAN_DIGITS: + return "Persian Digits" + case NUMERAL_SYSTEM_BURMESE_NUMERALS: + return "Burmese Numerals" + case NUMERAL_SYSTEM_DEVANAGARI_NUMERALS: + return "Devanagari Numerals" + default: + return fmt.Sprintf("Invalid(%d)", int(f)) + } +} + // DecimalSeparator represents the type of decimal separator type DecimalSeparator byte diff --git a/pkg/models/user.go b/pkg/models/user.go index 5d6cc325..5295ee0e 100644 --- a/pkg/models/user.go +++ b/pkg/models/user.go @@ -100,10 +100,11 @@ type User struct { LongTimeFormat core.LongTimeFormat `xorm:"TINYINT"` ShortTimeFormat core.ShortTimeFormat `xorm:"TINYINT"` FiscalYearFormat core.FiscalYearFormat `xorm:"TINYINT"` + CurrencyDisplayType core.CurrencyDisplayType `xorm:"TINYINT"` + NumeralSystem core.NumeralSystem `xorm:"TINYINT"` DecimalSeparator core.DecimalSeparator `xorm:"TINYINT"` DigitGroupingSymbol core.DigitGroupingSymbol `xorm:"TINYINT"` DigitGrouping core.DigitGroupingType `xorm:"TINYINT"` - CurrencyDisplayType core.CurrencyDisplayType `xorm:"TINYINT"` CoordinateDisplayType core.CoordinateDisplayType `xorm:"TINYINT"` ExpenseAmountColor AmountColorType `xorm:"TINYINT"` IncomeAmountColor AmountColorType `xorm:"TINYINT"` @@ -135,10 +136,11 @@ type UserBasicInfo struct { LongTimeFormat core.LongTimeFormat `json:"longTimeFormat"` ShortTimeFormat core.ShortTimeFormat `json:"shortTimeFormat"` FiscalYearFormat core.FiscalYearFormat `json:"fiscalYearFormat"` + CurrencyDisplayType core.CurrencyDisplayType `json:"currencyDisplayType"` + NumeralSystem core.NumeralSystem `json:"numeralSystem"` DecimalSeparator core.DecimalSeparator `json:"decimalSeparator"` DigitGroupingSymbol core.DigitGroupingSymbol `json:"digitGroupingSymbol"` DigitGrouping core.DigitGroupingType `json:"digitGrouping"` - CurrencyDisplayType core.CurrencyDisplayType `json:"currencyDisplayType"` CoordinateDisplayType core.CoordinateDisplayType `json:"coordinateDisplayType"` ExpenseAmountColor AmountColorType `json:"expenseAmountColor"` IncomeAmountColor AmountColorType `json:"incomeAmountColor"` @@ -198,10 +200,11 @@ type UserProfileUpdateRequest struct { LongTimeFormat *core.LongTimeFormat `json:"longTimeFormat" binding:"omitempty,min=0,max=3"` ShortTimeFormat *core.ShortTimeFormat `json:"shortTimeFormat" binding:"omitempty,min=0,max=3"` FiscalYearFormat *core.FiscalYearFormat `json:"fiscalYearFormat" binding:"omitempty,min=0,max=5"` + CurrencyDisplayType *core.CurrencyDisplayType `json:"currencyDisplayType" binding:"omitempty,min=0,max=11"` + NumeralSystem *core.NumeralSystem `json:"numeralSystem" binding:"omitempty,min=0,max=5"` DecimalSeparator *core.DecimalSeparator `json:"decimalSeparator" binding:"omitempty,min=0,max=3"` DigitGroupingSymbol *core.DigitGroupingSymbol `json:"digitGroupingSymbol" binding:"omitempty,min=0,max=4"` DigitGrouping *core.DigitGroupingType `json:"digitGrouping" binding:"omitempty,min=0,max=3"` - CurrencyDisplayType *core.CurrencyDisplayType `json:"currencyDisplayType" binding:"omitempty,min=0,max=11"` CoordinateDisplayType *core.CoordinateDisplayType `json:"coordinateDisplayType" binding:"omitempty,min=0,max=6"` ExpenseAmountColor *AmountColorType `json:"expenseAmountColor" binding:"omitempty,min=0,max=4"` IncomeAmountColor *AmountColorType `json:"incomeAmountColor" binding:"omitempty,min=0,max=4"` @@ -287,9 +290,10 @@ func (u *User) ToUserBasicInfo(avatarProvider core.UserAvatarProviderType, avata ShortTimeFormat: u.ShortTimeFormat, DecimalSeparator: u.DecimalSeparator, FiscalYearFormat: u.FiscalYearFormat, + CurrencyDisplayType: u.CurrencyDisplayType, + NumeralSystem: u.NumeralSystem, DigitGroupingSymbol: u.DigitGroupingSymbol, DigitGrouping: u.DigitGrouping, - CurrencyDisplayType: u.CurrencyDisplayType, CoordinateDisplayType: u.CoordinateDisplayType, ExpenseAmountColor: u.ExpenseAmountColor, IncomeAmountColor: u.IncomeAmountColor, diff --git a/pkg/services/users.go b/pkg/services/users.go index 3d13ef58..d3726958 100644 --- a/pkg/services/users.go +++ b/pkg/services/users.go @@ -313,6 +313,14 @@ func (s *UserService) UpdateUser(c core.Context, user *models.User, modifyUserLa updateCols = append(updateCols, "fiscal_year_format") } + if core.CURRENCY_DISPLAY_TYPE_DEFAULT <= user.CurrencyDisplayType && user.CurrencyDisplayType <= core.CURRENCY_DISPLAY_TYPE_NAME_AFTER_AMOUNT { + updateCols = append(updateCols, "currency_display_type") + } + + if core.NUMERAL_SYSTEM_DEFAULT <= user.NumeralSystem && user.NumeralSystem <= core.NUMERAL_SYSTEM_DEVANAGARI_NUMERALS { + updateCols = append(updateCols, "numeral_system") + } + if core.DECIMAL_SEPARATOR_DEFAULT <= user.DecimalSeparator && user.DecimalSeparator <= core.DECIMAL_SEPARATOR_COMMA { updateCols = append(updateCols, "decimal_separator") } @@ -325,10 +333,6 @@ func (s *UserService) UpdateUser(c core.Context, user *models.User, modifyUserLa updateCols = append(updateCols, "digit_grouping") } - if core.CURRENCY_DISPLAY_TYPE_DEFAULT <= user.CurrencyDisplayType && user.CurrencyDisplayType <= core.CURRENCY_DISPLAY_TYPE_NAME_AFTER_AMOUNT { - updateCols = append(updateCols, "currency_display_type") - } - if core.COORDINATE_DISPLAY_TYPE_DEFAULT <= user.CoordinateDisplayType && user.CoordinateDisplayType <= core.COORDINATE_DISPLAY_TYPE_LONGITUDE_LATITUDE_DEGREES_MINUTES_SECONDS { updateCols = append(updateCols, "coordinate_display_type") } diff --git a/src/components/base/CommonNumberInputBase.ts b/src/components/base/CommonNumberInputBase.ts index f78a40ef..7e20868a 100644 --- a/src/components/base/CommonNumberInputBase.ts +++ b/src/components/base/CommonNumberInputBase.ts @@ -2,6 +2,8 @@ import { ref } from 'vue'; import { useI18n } from '@/locales/helpers.ts'; +import { NumeralSystem } from '@/core/numeral.ts'; + import { removeAll } from '@/lib/common.ts'; import logger from '@/lib/logger.ts'; @@ -19,6 +21,7 @@ export type GetValidFormattedValueFunction = (value: number, textualValue: strin export function useCommonNumberInputBase(props: CommonNumberInputProps, maxDecimalCount: number, initValue: string, parseNumber: ParseNumberFunction, formatNumber: FormatNumberFunction, getValidFormattedValue: GetValidFormattedValueFunction) { const { + getCurrentNumeralSystemType, getCurrentDecimalSeparator, getCurrentDigitGroupingSymbol } = useI18n(); @@ -38,10 +41,11 @@ export function useCommonNumberInputBase(props: CommonNumberInputProps, maxDecim return; } + const numeralSystem = getCurrentNumeralSystemType(); const digitGroupingSymbol = getCurrentDigitGroupingSymbol(); const decimalSeparator = getCurrentDecimalSeparator(); - if (!('0' <= e.key && e.key <= '9') && e.key !== '-' && e.key !== decimalSeparator) { + if (!NumeralSystem.WesternArabicNumerals.isDigit(e.key) && !numeralSystem.isDigit(e.key) && e.key !== '-' && e.key !== decimalSeparator) { e.preventDefault(); return; } @@ -86,7 +90,7 @@ export function useCommonNumberInputBase(props: CommonNumberInputProps, maxDecim str = str.substring(1); } - str = (negative ? '-0' : '0') + str; + str = (negative ? `-${numeralSystem.digitZero}` : numeralSystem.digitZero) + str; target.value = str; currentValue.value = target.value; e.preventDefault(); @@ -98,14 +102,14 @@ export function useCommonNumberInputBase(props: CommonNumberInputProps, maxDecim if (decimalIndex >= 0) { decimalLength = str.length - str.indexOf(decimalSeparator) - 1; - } else if ((str.startsWith('0') && str.length >= 2) || (str.startsWith('-0') && str.length >= 3)) { + } else if ((str.startsWith(numeralSystem.digitZero) && str.length >= 2) || (str.startsWith(`-${numeralSystem.digitZero}`) && str.length >= 3)) { const negative = str.charAt(0) === '-'; if (negative) { str = str.substring(1); } - while (str.charAt(0) === '0' && (str.length >= 2 || e.key !== '0')) { + while (str.charAt(0) === numeralSystem.digitZero && (str.length >= 2 || e.key !== numeralSystem.digitZero)) { str = str.substring(1); } @@ -138,7 +142,7 @@ export function useCommonNumberInputBase(props: CommonNumberInputProps, maxDecim } } catch (ex) { logger.warn('cannot parse input number, original value is ' + str, ex); - target.value = '0'; + target.value = numeralSystem.digitZero; } } diff --git a/src/components/base/NumberInputBase.ts b/src/components/base/NumberInputBase.ts index c7e6ea79..6e67b194 100644 --- a/src/components/base/NumberInputBase.ts +++ b/src/components/base/NumberInputBase.ts @@ -4,6 +4,7 @@ import { useI18n } from '@/locales/helpers.ts'; import { type CommonNumberInputProps, useCommonNumberInputBase } from '@/components/base/CommonNumberInputBase.ts'; import { isNumber, replaceAll, removeAll } from '@/lib/common.ts'; +import { NumeralSystem } from '@/core/numeral.ts'; export interface NumberInputProps extends CommonNumberInputProps { minValue?: number; @@ -17,6 +18,7 @@ export interface NumberInputEmits { export function useNumberInputBase(props: NumberInputProps, emit: NumberInputEmits) { const { + getCurrentNumeralSystemType, getCurrentDecimalSeparator, getCurrentDigitGroupingSymbol } = useI18n(); @@ -32,17 +34,20 @@ export function useNumberInputBase(props: NumberInputProps, emit: NumberInputEmi return 0; } + const numeralSystem = getCurrentNumeralSystemType(); const decimalSeparator = getCurrentDecimalSeparator(); let finalValue = ''; for (let i = 0; i < value.length; i++) { - if (!('0' <= value[i] && value[i] <= '9') && value[i] !== '-' && value[i] !== decimalSeparator) { + if (!NumeralSystem.WesternArabicNumerals.isDigit(value[i]) && !numeralSystem.isDigit(value[i]) && value[i] !== '-' && value[i] !== decimalSeparator) { break; } finalValue += value[i]; } + finalValue = numeralSystem.replaceLocalizedDigitsToWesternArabicDigits(finalValue); + if (decimalSeparator !== '.') { finalValue = replaceAll(finalValue, decimalSeparator, '.'); } @@ -65,50 +70,72 @@ export function useNumberInputBase(props: NumberInputProps, emit: NumberInputEmi } function getFormattedValue(value: number): string { + const numeralSystem = getCurrentNumeralSystemType(); + if (!Number.isNaN(value) && Number.isFinite(value)) { const decimalSeparator = getCurrentDecimalSeparator(); if (isNumber(props.maxDecimalCount) && props.maxDecimalCount >= 0) { - return replaceAll(value.toFixed(props.maxDecimalCount), '.', decimalSeparator); + return replaceAll(numeralSystem.replaceWesternArabicDigitsToLocalizedDigits(value.toFixed(props.maxDecimalCount)), '.', decimalSeparator); } else { - return replaceAll(value.toString(), '.', decimalSeparator); + return replaceAll(numeralSystem.replaceWesternArabicDigitsToLocalizedDigits(value.toString(10)), '.', decimalSeparator); } } - return '0'; + return numeralSystem.digitZero; } watch(() => props.modelValue, (newValue) => { + const numeralSystem = getCurrentNumeralSystemType(); const numericCurrentValue = parseNumber(currentValue.value); if (newValue !== numericCurrentValue) { const newStringValue = getFormattedValue(newValue); - if (!(newStringValue === '0' && currentValue.value === '')) { + if (!(newStringValue === numeralSystem.digitZero && currentValue.value === '')) { currentValue.value = newStringValue; } } }); watch(currentValue, (newValue) => { + const numeralSystem = getCurrentNumeralSystemType(); + let actualNumeralSystem: NumeralSystem | undefined = undefined; let finalValue = ''; if (newValue) { const decimalSeparator = getCurrentDecimalSeparator(); - for (let i = 0; i < newValue.length; i++) { - if (!('0' <= newValue[i] && newValue[i] <= '9') && newValue[i] !== '-' && newValue[i] !== decimalSeparator) { - break; + if (newValue[0] === '-' || newValue[0] === decimalSeparator) { + actualNumeralSystem = NumeralSystem.detect(newValue[1]); + } else { + actualNumeralSystem = NumeralSystem.detect(newValue[0]); + } + + if (actualNumeralSystem && (actualNumeralSystem.type === NumeralSystem.WesternArabicNumerals.type || actualNumeralSystem.type === numeralSystem.type)) { + for (let i = 0; i < newValue.length; i++) { + if (!NumeralSystem.WesternArabicNumerals.isDigit(newValue[i]) && !numeralSystem.isDigit(newValue[i]) && newValue[i] !== '-' && newValue[i] !== decimalSeparator) { + break; + } + + finalValue += newValue[i]; } - finalValue += newValue[i]; + finalValue = numeralSystem.replaceWesternArabicDigitsToLocalizedDigits(finalValue); + } else if (newValue === '-' || newValue === decimalSeparator || newValue === `-${decimalSeparator}`) { + finalValue = newValue; } } if (finalValue !== newValue) { currentValue.value = finalValue; } else { - const value: number = parseNumber(finalValue); + let value: number = parseNumber(finalValue); + + if (Number.isNaN(value) || !Number.isFinite(value)) { + value = 0; + } + emit('update:modelValue', value); } }); diff --git a/src/components/base/PieChartBase.ts b/src/components/base/PieChartBase.ts index 9886f19f..dff9d38e 100644 --- a/src/components/base/PieChartBase.ts +++ b/src/components/base/PieChartBase.ts @@ -35,7 +35,7 @@ export interface CommonPieChartProps { } export function usePieChartBase(props: CommonPieChartProps) { - const { formatAmountWithCurrency, formatPercent } = useI18n(); + const { formatAmountToLocalizedNumeralsWithCurrency, formatPercentToLocalizedNumerals } = useI18n(); const selectedIndex = ref(0); @@ -72,8 +72,8 @@ export function usePieChartBase(props: CommonPieChartProps) { sourceItem: item }; - finalItem.displayPercent = formatPercent(finalItem.percent, 2, '<0.01'); - finalItem.displayValue = formatAmountWithCurrency(finalItem.value, props.defaultCurrency); + finalItem.displayPercent = formatPercentToLocalizedNumerals(finalItem.percent, 2, '<0.01'); + finalItem.displayValue = formatAmountToLocalizedNumeralsWithCurrency(finalItem.value, props.defaultCurrency); validItems.push(finalItem); } diff --git a/src/components/common/PinCodeInput.vue b/src/components/common/PinCodeInput.vue index 85c2a50f..0ba7842a 100644 --- a/src/components/common/PinCodeInput.vue +++ b/src/components/common/PinCodeInput.vue @@ -21,6 +21,10 @@