2022-04-12 18:03:52 +03:00
|
|
|
<section class="gh-dashboard5-section gh-dashboard5-recent-activity">
|
2022-04-12 15:29:10 +03:00
|
|
|
<article class="gh-dashboard5-box">
|
|
|
|
<div class="gh-dashboard5-list" data-test-dashboard-member-activity>
|
|
|
|
<div class="gh-dashboard5-list-header">
|
|
|
|
<div class="gh-dashboard5-list-title">Recent activity</div>
|
|
|
|
</div>
|
2022-04-08 19:49:11 +03:00
|
|
|
|
2022-04-12 15:29:10 +03:00
|
|
|
<div class="gh-dashboard5-list-body">
|
|
|
|
{{#let (members-event-fetcher filter=(members-event-filter excludeEmailEvents=true) pageSize=5) as |eventsFetcher|}}
|
|
|
|
{{#if eventsFetcher.isError}}
|
|
|
|
<div class="gh-dashboard5-list-error">
|
|
|
|
<p>There was an error loading events</p>
|
|
|
|
{{#if eventsFetcher.errorMessage}}
|
|
|
|
<code>{{eventsFetcher.errorMessage}}</code>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-04-06 20:11:46 +03:00
|
|
|
{{/if}}
|
2022-04-12 15:29:10 +03:00
|
|
|
{{#if eventsFetcher.isLoading}}
|
|
|
|
<div class="gh-dashboard5-list-loading">
|
|
|
|
<p>Loading...</p>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
{{#if eventsFetcher.data}}
|
|
|
|
{{#each eventsFetcher.data as |event|}}
|
|
|
|
{{#let (parse-member-event event) as |parsedEvent|}}
|
|
|
|
<div class="gh-dashboard5-list-item" data-test-dashboard-member-activity-item>
|
|
|
|
<LinkTo class="member-details" @route="member" @model="{{parsedEvent.memberId}}">
|
|
|
|
<GhMemberAvatar @member={{parsedEvent.member}} @containerClass="w8 h8 mr3 flex-shrink-0" />
|
|
|
|
{{parsedEvent.subject}}
|
|
|
|
<span>
|
|
|
|
{{parsedEvent.action}}
|
|
|
|
{{parsedEvent.object}}
|
|
|
|
{{parsedEvent.info}}
|
|
|
|
</span>
|
|
|
|
</LinkTo>
|
|
|
|
<span class="gh-dashboard-activity-time">{{moment-from-now parsedEvent.timestamp}}</span>
|
|
|
|
</div>
|
|
|
|
{{/let}}
|
|
|
|
{{/each}}
|
|
|
|
{{else}}
|
|
|
|
<div class="gh-dashboard5-list-empty" data-test-no-member-activities>
|
|
|
|
<p>No activity yet.</p>
|
2022-03-29 18:53:50 +03:00
|
|
|
</div>
|
2022-04-12 15:29:10 +03:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
|
|
|
</div>
|
|
|
|
<div class="gh-dashboard5-list-footer">
|
|
|
|
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}}>See all activity →</LinkTo>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</section>
|