Browse Source

fix: currency locale list

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6447/head
mertmit 10 months ago
parent
commit
775fd2e5e3
  1. 10
      packages/nc-gui/components/smartsheet/column/CurrencyOptions.vue
  2. 2
      packages/nc-gui/utils/currencyUtils.ts

10
packages/nc-gui/components/smartsheet/column/CurrencyOptions.vue

@ -49,11 +49,7 @@ setAdditionalValidations({
const currencyList = currencyCodes || []
const currencyLocaleList = []
currencyLocales().then((locales) => {
currencyLocaleList.push(...locales)
})
const currencyLocaleList = ref<{ text: string; value: string }[]>([])
const isMoney = computed(() => vModel.value.dt === 'money')
@ -72,6 +68,10 @@ vModel.value.meta = {
currency_code: 'USD',
...vModel.value.meta,
}
currencyLocales().then((locales) => {
currencyLocaleList.value.push(...locales)
})
</script>
<template>

2
packages/nc-gui/utils/currencyUtils.ts

@ -189,7 +189,7 @@ export function validateCurrencyCode(v: string) {
}
export async function currencyLocales() {
const { all } = await import('~/utils/currencyCodes')
const { all } = await import('./currencyCodes')
return all
.filter((l) => validateCurrencyLocale(l.tag))
.map((l) => {

Loading…
Cancel
Save