show the plans in the buttons proper
This commit is contained in:
@@ -5,12 +5,10 @@ import Subscription from "discourse/plugins/discourse-subscriptions/discourse/mo
|
||||
export default Discourse.Route.extend({
|
||||
model(params) {
|
||||
const product_id = params["subscription-id"];
|
||||
const product = Product.find(product_id);
|
||||
|
||||
const product = Product.find(product_id);
|
||||
const subscription = Subscription.create();
|
||||
const plans = Plan.findAll({ product_id: product_id }).then(results =>
|
||||
results.map(p => ({ id: p.id, name: p.subscriptionRate }))
|
||||
);
|
||||
const plans = Plan.findAll({ product_id: product_id });
|
||||
|
||||
return Ember.RSVP.hash({ plans, product, subscription });
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
class="btn btn-discourse-subscriptions-subscribe"
|
||||
}}
|
||||
<div class="interval">
|
||||
{{plan.interval}}
|
||||
{{i18n (concat "discourse_subscriptions.plans.interval.adverb." plan.interval)}}
|
||||
</div>
|
||||
<span class="amount">
|
||||
{{format-currency plan.currency plan.amountDollars}}
|
||||
|
||||
Reference in New Issue
Block a user