mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-18 12:54:27 +01:00
Override angular currency filter, use Intl.NumberFormat to format amount
This commit is contained in:
parent
f40f80dd1f
commit
d45c03d36e
@ -10,6 +10,7 @@
|
||||
- Run the docker image with the system user
|
||||
- During the setup, autoconfigure the main domain
|
||||
- During the setup, ask to set ALLOW_INSECURE_HTTP if DEFAULT_PROTOCOL was set to http
|
||||
- Override angular currency filter, use Intl.NumberFormat to format amount
|
||||
- Fix a bug: unable to set the twitter input empty
|
||||
- Fix a bug: unable to edit an event
|
||||
- Fix a bug: times are not shown in admin/events monitoring page
|
||||
|
@ -350,3 +350,12 @@ Application.Filters.filter('filterDisabled', [function () {
|
||||
}
|
||||
};
|
||||
}]);
|
||||
|
||||
Application.Filters.filter('currency', [function ($locale) {
|
||||
return function (amount) {
|
||||
// if null or undefined pass it through
|
||||
return (amount == null)
|
||||
? amount
|
||||
: new Intl.NumberFormat(Fablab.intl_locale, { style: 'currency', currency: Fablab.intl_currency }).format(amount);
|
||||
};
|
||||
}]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user