summaryrefslogtreecommitdiffstats
path: root/client/components/cards/minicard.js
diff options
context:
space:
mode:
authorHaben Amare <haben.amare@outlook.com>2020-05-25 22:05:06 +0000
committerHaben Amare <haben.amare@outlook.com>2020-05-25 22:05:06 +0000
commit8732e4b18f65e88947f3d334fc0bcc42a809c76e (patch)
tree77855ff4ba613b71e3b9e890332e12f384be01ec /client/components/cards/minicard.js
parentd26786a62821e50926e71ea57f7b330cd3ed2964 (diff)
downloadwekan-8732e4b18f65e88947f3d334fc0bcc42a809c76e.tar.gz
wekan-8732e4b18f65e88947f3d334fc0bcc42a809c76e.tar.bz2
wekan-8732e4b18f65e88947f3d334fc0bcc42a809c76e.zip
use `Intl.NumberFormat` to format currency
Diffstat (limited to 'client/components/cards/minicard.js')
-rw-r--r--client/components/cards/minicard.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js
index e40dad5d..2eb6131c 100644
--- a/client/components/cards/minicard.js
+++ b/client/components/cards/minicard.js
@@ -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() {