link username

This commit is contained in:
Rimian Perkins 2019-09-14 16:53:07 +10:00
parent cf46065635
commit 0b8b89f1d4
5 changed files with 11 additions and 9 deletions

View File

@ -8,6 +8,7 @@ class PaymentSerializer < ApplicationSerializer
:amount,
:amount_currency,
:username
:user_id
def created_at_age
Time.now - object.created_at

View File

@ -1,2 +1 @@
export default Ember.Controller.extend({
});
export default Ember.Controller.extend({});

View File

@ -1,8 +1,7 @@
export default {
resource: 'admin.adminPlugins',
path: '/plugins',
resource: "admin.adminPlugins",
path: "/plugins",
map() {
this.route('discourse-patrons');
this.route("discourse-patrons");
}
};

View File

@ -4,7 +4,6 @@ export default Discourse.Route.extend({
model() {
return ajax("/patrons/admin", {
method: "get"
})
.then(results => results);
}).then(results => results);
}
});

View File

@ -13,7 +13,11 @@
</thead>
{{#each model as |payment|}}
<tr>
<td>{{payment.username}}</td>
<td>
{{#link-to "adminUser.index" payment.user_id payment.username}}
{{payment.username}}
{{/link-to}}
</td>
<td>{{{stripe-payment-link payment}}}</td>
<td>{{payment.receipt_email}}</td>
<td>{{{format-duration payment.created_at_age}}}</td>