2022-01-18 18:16:22 +03:00
|
|
|
{{#if this.shouldDisplay}}
|
2022-01-26 17:37:34 +03:00
|
|
|
<div class="gh-dashboard-box activity" data-test-dashboard-member-activity>
|
|
|
|
<h4 class="gh-dashboard-header-container">
|
|
|
|
<h4 class="gh-dashboard-header">
|
2022-01-27 18:09:17 +03:00
|
|
|
Activity
|
2022-01-26 17:37:34 +03:00
|
|
|
</h4>
|
|
|
|
</h4>
|
2022-01-18 18:16:22 +03:00
|
|
|
<div class="content">
|
2022-03-30 14:43:52 +03:00
|
|
|
{{#let (members-event-fetcher filter=(members-event-filter excludeEmailEvents=true) pageSize=5) as |eventsFetcher|}}
|
2022-01-22 19:04:54 +03:00
|
|
|
{{#if eventsFetcher.isLoading}}
|
|
|
|
Loading...
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if eventsFetcher.isError}}
|
2022-01-18 18:16:22 +03:00
|
|
|
<p class="error">
|
|
|
|
There was an error loading events
|
2022-01-22 19:04:54 +03:00
|
|
|
{{#if eventsFetcher.errorMessage}}
|
|
|
|
<code>{{eventsFetcher.errorMessage}}</code>
|
|
|
|
{{/if}}
|
2022-01-18 18:16:22 +03:00
|
|
|
</p>
|
2022-01-22 19:04:54 +03:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#unless (or eventsFetcher.isLoading eventsFetcher.isError)}}
|
2022-01-25 14:50:10 +03:00
|
|
|
<div class="gh-event-timeline">
|
|
|
|
{{#if eventsFetcher.data}}
|
2022-01-26 17:37:34 +03:00
|
|
|
<ul class="gh-dashboard-activity-list">
|
2022-01-25 14:50:10 +03:00
|
|
|
{{#each eventsFetcher.data as |event|}}
|
|
|
|
{{#let (parse-member-event event) as |parsedEvent|}}
|
2022-01-26 17:37:34 +03:00
|
|
|
<li class="gh-dashboard-activity-item" data-test-dashboard-member-activity-item>
|
2022-01-25 14:50:10 +03:00
|
|
|
<LinkTo class="member-details" @route="member" @model="{{parsedEvent.memberId}}">
|
2022-01-26 17:37:34 +03:00
|
|
|
<div class="gh-dashboard-activity-container">
|
|
|
|
{{svg-jar parsedEvent.icon}}
|
|
|
|
<div class="gh-dashboard-activity-detail">
|
|
|
|
<div class="gh-dashboard-activity-name">
|
|
|
|
{{parsedEvent.subject}}
|
|
|
|
</div>
|
|
|
|
<div class="gh-dashboard-activity-event">
|
|
|
|
{{parsedEvent.action}}
|
|
|
|
{{parsedEvent.object}}
|
2022-04-13 12:28:13 +03:00
|
|
|
{{parsedEvent.info}}
|
2022-01-26 17:37:34 +03:00
|
|
|
</div>
|
2022-01-19 15:57:58 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</LinkTo>
|
2022-01-26 17:37:34 +03:00
|
|
|
<span class="gh-dashboard-activity-time">{{moment-from-now parsedEvent.timestamp}}</span>
|
2022-01-19 15:57:58 +03:00
|
|
|
</li>
|
2022-01-25 14:50:10 +03:00
|
|
|
{{/let}}
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
|
|
|
<div class="gh-no-data-list" data-test-no-member-activities>
|
|
|
|
{{svg-jar "no-data-list"}}
|
|
|
|
<span>No member activity available.</span>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-01-18 18:16:22 +03:00
|
|
|
|
2022-03-30 14:43:52 +03:00
|
|
|
<div class="footer">
|
|
|
|
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}}>See all activity →</LinkTo>
|
|
|
|
</div>
|
2022-01-22 19:04:54 +03:00
|
|
|
{{/unless}}
|
|
|
|
{{/let}}
|
2022-01-18 18:16:22 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-01-26 17:37:34 +03:00
|
|
|
{{/if}}
|