1
0
mirror of synced 2026-08-04 06:06:55 +00:00

Merge pull request #9 from StarWar/feature/inr-currency

Feature/inr currency: INR added to supported currencies
This commit is contained in:
Rimian Perkins
2020-04-27 19:24:29 +10:00
committed by GitHub
6 changed files with 12 additions and 2 deletions
+2
View File
@@ -42,6 +42,8 @@ class PaymentSerializer < ApplicationSerializer
""
when "gbp"
"£"
when "inr"
""
else
"$"
end
@@ -3,7 +3,7 @@ import DiscourseURL from "discourse/lib/url";
export default Ember.Controller.extend({
// Also defined in settings.
currencies: ["AUD", "CAD", "EUR", "GBP", "USD"],
currencies: ["AUD", "CAD", "EUR", "GBP", "USD", "INR"],
@computed("model.plan.isNew")
planFieldDisabled(isNew) {
@@ -9,6 +9,9 @@ export default Ember.Helper.helper(function(params) {
case "GBP":
currencySign = "£";
break;
case "INR":
currencySign = "₹";
break;
default:
currencySign = "$";
}
@@ -10,6 +10,10 @@ export default Ember.Helper.helper(function(params) {
case "gbp":
currencySign = "£";
break;
case "INR":
case "inr":
currencySign = "₹";
break;
default:
currencySign = "$";
}
@@ -16,7 +16,7 @@ const Plan = EmberObject.extend({
@computed("amountDollars", "currency", "interval")
subscriptionRate(amountDollars, currency, interval) {
return `$${amountDollars} ${currency.toUpperCase()} / ${interval}`;
return `${amountDollars} ${currency.toUpperCase()} / ${interval}`;
}
});
+1
View File
@@ -27,3 +27,4 @@ plugins:
- GBP
- USD
- NZD
- INR