Files
discourse-subscriptions/assets/javascripts/discourse/templates/admin/plugins-discourse-subscriptions-plans-index.hbs
T
Justin DiRose c9ff55b46a REFACTOR: Use the Prices API in place of Plans (#17)
Stripe has a newer API called Prices where you can create a price for any product and it can either be recurring or one-time. The easy part is existing Plans work with the Prices API by passing a Plan ID, but objects are returned in the slightly-different Prices API object format.

This commit is a refactor to the new API to handle the data in its new form, and lays the foundation for a one time payment plan to be added to any subscriptions product.
2020-07-15 08:44:40 -05:00

30 lines
920 B
Handlebars

<table class="table discourse-patrons-table">
<thead>
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.plan_id'}}</th>
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.nickname.title'}}</th>
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.interval'}}</th>
<th>{{i18n 'discourse_subscriptions.admin.plans.plan.amount'}}</th>
<th></th>
</thead>
{{#each model as |plan|}}
<tr>
<td>{{plan.id}}</td>
<td>{{plan.nickname}}</td>
<td>{{plan.interval}}</td>
<td>{{plan.unit_amount}}</td>
<td class="td-right">
{{d-button
action=(action "editPlan" plan.id)
icon="far-edit"
class="btn no-text btn-icon"}}
{{d-button
action=(route-action "destroyPlan")
actionParam=plan
icon="trash-alt"
class="btn-danger btn no-text btn-icon"}}
</td>
</tr>
{{/each}}
</table>