mirror of
https://github.com/wekan/wekan.git
synced 2025-12-21 09:50:13 +01:00
use Intl.NumberFormat to format currency
This commit is contained in:
parent
d26786a628
commit
8732e4b18f
7 changed files with 70 additions and 25 deletions
|
|
@ -16,7 +16,11 @@ BlazeComponent.extendComponent({
|
|||
const customFieldTrueValue =
|
||||
customField && customField.trueValue ? customField.trueValue : '';
|
||||
|
||||
return `${definition.settings.currencySymbol}${customFieldTrueValue}`;
|
||||
const locale = TAPi18n.getLanguage();
|
||||
return new Intl.NumberFormat(locale, {
|
||||
style: 'currency',
|
||||
currency: definition.settings.currencyCode,
|
||||
}).format(customFieldTrueValue);
|
||||
},
|
||||
|
||||
events() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue