2022-08-22 19:50:52 +03:00
|
|
|
<section class="gh-canvas gh-members-activity {{if this.memberRecord "gh-members-activity-single"}} {{if (feature "memberAttribution") "feature-memberAttribution"}}">
|
2022-03-10 18:24:31 +03:00
|
|
|
<GhCanvasHeader class="gh-canvas-header">
|
2022-10-04 09:51:01 +03:00
|
|
|
{{#if this.memberRecord}}
|
|
|
|
<div class="flex flex-column">
|
|
|
|
<div class="gh-canvas-breadcrumb">
|
|
|
|
<LinkTo @route="members-activity" @query={{reset-query-params "members-activity"}} data-test-link="members-activity-back">
|
|
|
|
Member activity
|
|
|
|
</LinkTo>
|
|
|
|
{{svg-jar "arrow-right-small"}} Member
|
|
|
|
</div>
|
|
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
|
|
{{or this.memberRecord.name this.memberRecord.email}}
|
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
|
|
Member activity
|
|
|
|
</h2>
|
|
|
|
{{/if}}
|
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-11-18 13:33:48 +03:00
|
|
|
{{#let (members-event-fetcher filter=(members-event-filter excludedEvents=this.fullExcludedEvents member=this.member) pageSize=50 memberId=this.member) as |eventsFetcher|}}
|
2022-03-10 18:24:31 +03:00
|
|
|
{{#if eventsFetcher.data}}
|
|
|
|
{{#if this.memberRecord}}
|
|
|
|
<GhMemberDetailsActivity @member={{this.memberRecord}} />
|
|
|
|
{{/if}}
|
2022-11-18 13:33:48 +03:00
|
|
|
<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}}
|