2022-01-26 12:52:51 +03:00
|
|
|
<section class="gh-canvas gh-members-activity {{if this.memberRecord "gh-members-activity-single"}}">
|
2022-03-10 18:24:31 +03:00
|
|
|
<GhCanvasHeader class="gh-canvas-header">
|
2022-01-25 19:40:44 +03:00
|
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
2022-01-27 20:45:13 +03:00
|
|
|
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}} data-test-link="members-activity-back">Activity</LinkTo>
|
2022-01-26 12:52:51 +03:00
|
|
|
{{#if this.memberRecord}}
|
2022-01-27 18:09:17 +03:00
|
|
|
<span>{{svg-jar "arrow-right"}}</span>
|
2022-02-01 12:50:40 +03:00
|
|
|
<span class="truncate">{{or this.memberRecord.name this.memberRecord.email}}</span>
|
2022-01-26 12:52:51 +03:00
|
|
|
{{/if}}
|
2022-01-25 19:40:44 +03:00
|
|
|
</h2>
|
2022-01-24 20:31:24 +03:00
|
|
|
|
|
|
|
<div class="view-actions">
|
2022-03-10 18:24:31 +03:00
|
|
|
<MembersActivity::EventTypeFilter
|
|
|
|
@excludedEvents={{this.excludedEvents}}
|
|
|
|
@hiddenEvents={{this.hiddenEvents}}
|
|
|
|
@onChange={{this.changeExcludedEvents}} />
|
2022-01-27 17:59:12 +03:00
|
|
|
|
2022-03-10 18:24:31 +03:00
|
|
|
<MembersActivity::MemberFilter
|
|
|
|
@selected={{this.memberRecord}}
|
|
|
|
@onChange={{this.changeMember}} />
|
2022-01-24 20:31:24 +03:00
|
|
|
</div>
|
2022-01-17 21:05:10 +03:00
|
|
|
</GhCanvasHeader>
|
2022-01-22 18:35:08 +03:00
|
|
|
<div class="view-container">
|
2022-03-10 18:24:31 +03:00
|
|
|
{{#let (members-event-fetcher filter=(members-event-filter excludedEvents=this.fullExcludedEvents member=this.member) pageSize=50) as |eventsFetcher|}}
|
|
|
|
{{#if eventsFetcher.data}}
|
|
|
|
{{#if this.memberRecord}}
|
|
|
|
<GhMemberDetailsActivity @member={{this.memberRecord}} />
|
|
|
|
{{/if}}
|
|
|
|
<div class="gh-list-scrolling">
|
2022-05-04 11:21:42 +03:00
|
|
|
<MembersActivity::Table @hideMemberColumn={{if this.member true}} @events={{eventsFetcher.data}} @hasMultipleNewsletters={{eventsFetcher.hasMultipleNewsletters}} />
|
2022-01-22 18:35:08 +03:00
|
|
|
|
2022-03-07 15:15:06 +03:00
|
|
|
{{#if (not (or eventsFetcher.isLoading eventsFetcher.hasReachedEnd))}}
|
2022-01-22 18:35:08 +03:00
|
|
|
<GhScrollTrigger @enter={{eventsFetcher.loadNextPage}} @triggerOffset={{250}} />
|
2022-03-07 15:15:06 +03:00
|
|
|
{{/if}}
|
2022-03-10 18:24:31 +03:00
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
{{#unless eventsFetcher.isLoading}}
|
2022-07-12 14:47:48 +03:00
|
|
|
<MembersActivity::NoEvents @filter={{or this.member this.excludedEvents}} />
|
2022-03-10 18:24:31 +03:00
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
2022-01-22 18:35:08 +03:00
|
|
|
|
2022-03-10 18:24:31 +03:00
|
|
|
{{#if eventsFetcher.isLoading}}
|
|
|
|
<div class="no-posts-box"><GhLoadingSpinner /></div>
|
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|
2022-01-22 18:35:08 +03:00
|
|
|
</div>
|
2022-01-17 21:05:10 +03:00
|
|
|
</section>
|
|
|
|
|
2022-05-04 11:21:42 +03:00
|
|
|
{{outlet}}
|