more info on subscription page

This commit is contained in:
Rimian Perkins 2019-10-23 10:30:04 +11:00
parent c6bf9ca4d3
commit fb37c200cd
3 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,12 @@
import computed from "ember-addons/ember-computed-decorators";
import { ajax } from "discourse/lib/ajax";
const AdminSubscription = Discourse.Model.extend({});
const AdminSubscription = Discourse.Model.extend({
@computed("created")
createdFormatted(created) {
return moment.unix(created).format();
}
});
AdminSubscription.reopenClass({
find() {

View File

@ -2,16 +2,18 @@
<table class="table discourse-patrons-admin">
<thead>
<tr>
<th>{{i18n 'discourse_patrons.admin.subscriptions.subscription.subscription_id'}}</th>
<th>{{i18n 'discourse_patrons.admin.subscriptions.subscription.customer'}}</th>
<th>{{i18n 'discourse_patrons.admin.subscriptions.subscription.plan'}}</th>
<th>{{i18n 'discourse_patrons.admin.subscriptions.subscription.status'}}</th>
<th class="td-right">{{i18n 'discourse_patrons.admin.subscriptions.subscription.created_at'}}</th>
</tr>
</thead>
{{#each model as |subscription|}}
<tr>
<td>{{subscription.id}}</td>
<td>{{subscription.customer}}</td>
<td>{{subscription.plan.id}}</td>
<td>{{subscription.status}}</td>
<td class="td-right">{{format-date subscription.createdFormatted}}</td>
</tr>
{{/each}}
</table>

View File

@ -100,6 +100,7 @@ en:
title: Subscriptions
subscription:
subscription_id: Subscription ID
user: User
customer: Customer
plan: Plan
status: Status
created_at: Created