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,
:amount_currency, :amount_currency,
:username :username
:user_id
def created_at_age def created_at_age
Time.now - object.created_at 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 { export default {
resource: 'admin.adminPlugins', resource: "admin.adminPlugins",
path: '/plugins', path: "/plugins",
map() { map() {
this.route('discourse-patrons'); this.route("discourse-patrons");
} }
}; };

View File

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

View File

@ -13,7 +13,11 @@
</thead> </thead>
{{#each model as |payment|}} {{#each model as |payment|}}
<tr> <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>{{{stripe-payment-link payment}}}</td>
<td>{{payment.receipt_email}}</td> <td>{{payment.receipt_email}}</td>
<td>{{{format-duration payment.created_at_age}}}</td> <td>{{{format-duration payment.created_at_age}}}</td>