|
|
@ -27,7 +27,6 @@ const validators = computed(() => { |
|
|
|
{ |
|
|
|
{ |
|
|
|
validator: (_: any, currencyCode: any) => { |
|
|
|
validator: (_: any, currencyCode: any) => { |
|
|
|
return new Promise<void>((resolve, reject) => { |
|
|
|
return new Promise<void>((resolve, reject) => { |
|
|
|
console.log("currencyCode=" + currencyCode) |
|
|
|
|
|
|
|
if (!validateCurrencyCode(currencyCode)) { |
|
|
|
if (!validateCurrencyCode(currencyCode)) { |
|
|
|
return reject(new Error('Invalid Currency Code')) |
|
|
|
return reject(new Error('Invalid Currency Code')) |
|
|
|
} |
|
|
|
} |
|
|
@ -69,9 +68,10 @@ function filterOption(input: string, option: Option) { |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<a-row> |
|
|
|
<a-row> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-form-item v-bind="validateInfos['meta.currency_locale']"> |
|
|
|
<a-form-item v-bind="validateInfos['meta.currency_locale']" label="Currency Locale"> |
|
|
|
<a-select |
|
|
|
<a-select |
|
|
|
v-model:value="formState.meta.currency_locale" |
|
|
|
v-model:value="formState.meta.currency_locale" |
|
|
|
|
|
|
|
size="small" |
|
|
|
class="w-52" |
|
|
|
class="w-52" |
|
|
|
show-search |
|
|
|
show-search |
|
|
|
:options="currencyLocaleList ?? []" |
|
|
|
:options="currencyLocaleList ?? []" |
|
|
@ -80,8 +80,14 @@ function filterOption(input: string, option: Option) { |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-col :span="12"> |
|
|
|
<a-form-item v-bind="validateInfos['meta.currency_code']"> |
|
|
|
<a-form-item v-bind="validateInfos['meta.currency_code']" label="Currency Code"> |
|
|
|
<a-select v-model:value="formState.meta.currency_code" class="w-52" show-search :filter-option="filterOption"> |
|
|
|
<a-select |
|
|
|
|
|
|
|
v-model:value="formState.meta.currency_code" |
|
|
|
|
|
|
|
class="w-52" |
|
|
|
|
|
|
|
show-search |
|
|
|
|
|
|
|
:filter-option="filterOption" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
> |
|
|
|
<a-select-option v-for="(currencyCode, i) in currencyList ?? []" :key="i" :value="currencyCode"> |
|
|
|
<a-select-option v-for="(currencyCode, i) in currencyList ?? []" :key="i" :value="currencyCode"> |
|
|
|
{{ currencyCode }} |
|
|
|
{{ currencyCode }} |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|