fix(currency-symbol): hard-coded dollar symbol removed

This commit is contained in:
Raj Rathore 2020-04-23 16:06:02 +05:30
parent 40a390c3eb
commit 30299a5f13
4 changed files with 18 additions and 16 deletions

View File

@ -29,10 +29,12 @@ class PaymentSerializer < ApplicationSerializer
private
def user
begin
User.find(object.user_id)
rescue StandardError
nil
end
end
def currency_unit
case object.currency

View File

@ -3,18 +3,18 @@ export default Ember.Helper.helper(function (params) {
let currencySign
switch (Discourse.SiteSettings.discourse_subscriptions_currency) {
case 'EUR':
currencySign = '€'
case "EUR":
currencySign = "€";
break
case 'GBP':
currencySign = '£'
case "GBP":
currencySign = "£";
break
case 'INR':
currencySign = '₹'
case "INR":
currencySign = "₹";
break
default:
currencySign = '$'
currencySign = "$";
}
return [currencySign, params[0]].join('')
return [currencySign, params[0]].join("");
})

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

@ -5,20 +5,20 @@ plugins:
default: false
client: true
discourse_subscriptions_public_key:
default: ""
default: ''
client: true
discourse_subscriptions_secret_key:
default: ""
default: ''
client: false
discourse_subscriptions_webhook_secret:
default: ""
default: ''
client: false
discourse_subscriptions_allow_payments:
default: false
client: true
discourse_subscriptions_currency:
client: true
default: "USD"
default: 'USD'
type: enum
choices:
- AUD