2020-04-23 07:41:00 -04:00
|
|
|
export default Ember.Helper.helper(function(params) {
|
|
|
|
let currencySign;
|
2019-10-30 23:35:19 -04:00
|
|
|
|
2019-11-30 00:39:28 -05:00
|
|
|
switch (params[0]) {
|
2020-04-23 07:41:00 -04:00
|
|
|
case "EUR":
|
|
|
|
case "eur":
|
|
|
|
currencySign = "€";
|
2020-04-23 07:47:06 -04:00
|
|
|
break;
|
2020-04-23 07:41:00 -04:00
|
|
|
case "GBP":
|
|
|
|
case "gbp":
|
|
|
|
currencySign = "£";
|
2020-04-23 07:47:06 -04:00
|
|
|
break;
|
2020-04-23 07:41:00 -04:00
|
|
|
case "INR":
|
|
|
|
case "inr":
|
|
|
|
currencySign = "₹";
|
2020-04-23 07:47:06 -04:00
|
|
|
break;
|
2019-10-30 23:35:19 -04:00
|
|
|
default:
|
2020-04-23 07:41:00 -04:00
|
|
|
currencySign = "$";
|
2019-10-30 23:35:19 -04:00
|
|
|
}
|
|
|
|
|
2020-04-23 07:41:00 -04:00
|
|
|
return currencySign + params.map(p => p.toUpperCase()).join(" ");
|
|
|
|
});
|