Ghost/ghost/admin/app/components/members-activity/table-row.hbs
Kevin Ansfield acbc4233a8 Humanized event details on members activity screen
refs https://github.com/TryGhost/Team/issues/1277

- moved event parsing from a component to a helper
  - keeps code as a plain function
  - allows for per-event parsing which helps with rendering as we're not rebuilding/re-rendering a whole array each time the events data changes when a new page is loaded
  - updated to include full member and email objects (will be used later for email preview popup)
- updated members-activity table row component to use the event parser helper for better event details
2022-01-25 11:50:10 +00:00

17 lines
584 B
Handlebars

{{#let (parse-member-event @event) as |event|}}
<tr>
<div class="gh-list-data">
<LinkTo @route="member" @model={{event.memberId}}>
<strong>{{event.member.name}}</strong>
<br>
{{event.member.email}}
</LinkTo>
</div>
<div class="gh-list-data">
{{event.action}}
{{event.object}}
<span class="highlight">{{event.info}}</span>
</div>
<div class="gh-list-data">{{moment-format event.timestamp "D MMM YYYY HH:MM"}}</div>
</tr>
{{/let}}