2019-12-17 16:31:58 +11:00
|
|
|
{{#if model}}
|
|
|
|
|
<table class="table discourse-subscriptions-user-table">
|
|
|
|
|
<thead>
|
2021-07-04 21:53:55 +02:00
|
|
|
<th>{{i18n "discourse_subscriptions.user.subscriptions.id"}}</th>
|
|
|
|
|
<th>{{i18n "discourse_subscriptions.user.plans.product"}}</th>
|
|
|
|
|
<th>{{i18n "discourse_subscriptions.user.plans.rate"}}</th>
|
|
|
|
|
<th>{{i18n "discourse_subscriptions.user.subscriptions.discounted"}}</th>
|
|
|
|
|
<th>{{i18n "discourse_subscriptions.user.subscriptions.status"}}</th>
|
|
|
|
|
<th>{{i18n "discourse_subscriptions.user.subscriptions.renews"}}</th>
|
|
|
|
|
<th>{{i18n "discourse_subscriptions.user.subscriptions.created_at"}}</th>
|
2019-12-17 16:31:58 +11:00
|
|
|
<th></th>
|
|
|
|
|
</thead>
|
2021-07-04 21:53:55 +02:00
|
|
|
<tbody>
|
|
|
|
|
{{#each model as |subscription|}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{subscription.id}}</td>
|
|
|
|
|
<td>{{subscription.product.name}}</td>
|
|
|
|
|
<td>{{subscription.plan.subscriptionRate}}</td>
|
|
|
|
|
<td>{{subscription.discounted}}</td>
|
|
|
|
|
<td>{{subscription.status}}</td>
|
|
|
|
|
<td>{{subscription.endDate}}</td>
|
|
|
|
|
<td>{{format-unix-date subscription.created}}</td>
|
|
|
|
|
<td class="td-right">
|
|
|
|
|
{{#if subscription.loading}}
|
|
|
|
|
{{loading-spinner size="small"}}
|
2020-09-16 09:49:45 -05:00
|
|
|
{{else}}
|
2021-07-04 21:53:55 +02:00
|
|
|
{{#if subscription.canceled_at}}
|
2023-05-02 09:24:28 -05:00
|
|
|
<DButton
|
|
|
|
|
@disabled={{subscription.canceled_at}}
|
|
|
|
|
@label="discourse_subscriptions.user.subscriptions.cancelled"
|
|
|
|
|
/>
|
2021-07-04 21:53:55 +02:00
|
|
|
{{else}}
|
2023-05-02 09:24:28 -05:00
|
|
|
<DButton
|
|
|
|
|
@action={{route-action "updateCard" subscription.id}}
|
|
|
|
|
@icon="far-edit"
|
2022-07-06 07:23:27 +05:30
|
|
|
class="btn no-text btn-icon"
|
2023-05-02 09:24:28 -05:00
|
|
|
/>
|
|
|
|
|
<DButton
|
2022-07-06 07:23:27 +05:30
|
|
|
class="btn-danger btn no-text btn-icon"
|
2023-05-02 09:24:28 -05:00
|
|
|
@icon="trash-alt"
|
|
|
|
|
@disabled={{subscription.canceled_at}}
|
|
|
|
|
@action={{route-action "cancelSubscription" subscription}}
|
|
|
|
|
/>
|
2021-07-04 21:53:55 +02:00
|
|
|
{{/if}}
|
2020-09-16 09:49:45 -05:00
|
|
|
{{/if}}
|
2021-07-04 21:53:55 +02:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{/each}}
|
|
|
|
|
</tbody>
|
2019-12-17 16:31:58 +11:00
|
|
|
</table>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div class="alert alert-info">
|
2021-07-04 21:53:55 +02:00
|
|
|
{{i18n "discourse_subscriptions.user.subscriptions_help"}}
|
2019-12-17 16:31:58 +11:00
|
|
|
</div>
|
2023-01-04 12:39:58 +00:00
|
|
|
{{/if}}
|