diff --git a/assets/javascripts/discourse/models/admin-subscription.js.es6 b/assets/javascripts/discourse/models/admin-subscription.js.es6 index 9ef13f7..6fd6bfd 100644 --- a/assets/javascripts/discourse/models/admin-subscription.js.es6 +++ b/assets/javascripts/discourse/models/admin-subscription.js.es6 @@ -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() { diff --git a/assets/javascripts/discourse/templates/admin/plugins-discourse-patrons-subscriptions.hbs b/assets/javascripts/discourse/templates/admin/plugins-discourse-patrons-subscriptions.hbs index 20d4d27..383f50a 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-discourse-patrons-subscriptions.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-discourse-patrons-subscriptions.hbs @@ -2,16 +2,18 @@ - + + {{#each model as |subscription|}} - + + {{/each}}
{{i18n 'discourse_patrons.admin.subscriptions.subscription.subscription_id'}}{{i18n 'discourse_patrons.admin.subscriptions.subscription.customer'}} {{i18n 'discourse_patrons.admin.subscriptions.subscription.plan'}} {{i18n 'discourse_patrons.admin.subscriptions.subscription.status'}}{{i18n 'discourse_patrons.admin.subscriptions.subscription.created_at'}}
{{subscription.id}}{{subscription.customer}} {{subscription.plan.id}} {{subscription.status}}{{format-date subscription.createdFormatted}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 4cd7630..4edc029 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -100,6 +100,7 @@ en: title: Subscriptions subscription: subscription_id: Subscription ID - user: User + customer: Customer plan: Plan status: Status + created_at: Created