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
commit 83b75ab771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 2 deletions

View File

@ -42,6 +42,8 @@ class PaymentSerializer < ApplicationSerializer
""
when "gbp"
"£"
when "inr"
""
else
"$"
end

View File

@ -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) {

View File

@ -9,6 +9,9 @@ export default Ember.Helper.helper(function(params) {
case "GBP":
currencySign = "£";
break;
case "INR":
currencySign = "₹";
break;
default:
currencySign = "$";
}

View File

@ -10,6 +10,10 @@ export default Ember.Helper.helper(function(params) {
case "gbp":
currencySign = "£";
break;
case "INR":
case "inr":
currencySign = "₹";
break;
default:
currencySign = "$";
}

View File

@ -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}`;
}
});

View File

@ -27,3 +27,4 @@ plugins:
- GBP
- USD
- NZD
- INR