fix(currency-symbol): hard-coded dollar symbol removed
This commit is contained in:
parent
40a390c3eb
commit
30299a5f13
|
@ -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
|
||||
|
|
|
@ -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("");
|
||||
})
|
||||
|
|
|
@ -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}`;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue