2020-05-28 11:32:57 -04:00
|
|
|
import Helper from "@ember/component/helper";
|
|
|
|
|
2020-09-16 10:53:50 -04:00
|
|
|
export default Helper.helper(function (params) {
|
2020-04-23 07:41:00 -04:00
|
|
|
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;
|
2020-06-30 11:13:05 -04:00
|
|
|
case "BRL":
|
|
|
|
case "brl":
|
|
|
|
currencySign = "R$";
|
|
|
|
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-09-16 10:53:50 -04:00
|
|
|
return currencySign + params.map((p) => p.toUpperCase()).join(" ");
|
2020-04-23 07:41:00 -04:00
|
|
|
});
|