diff --git a/ghost/admin/app/components/gh-member-settings-form.hbs b/ghost/admin/app/components/gh-member-settings-form.hbs index a1382c5c0b..a015165487 100644 --- a/ghost/admin/app/components/gh-member-settings-form.hbs +++ b/ghost/admin/app/components/gh-member-settings-form.hbs @@ -302,10 +302,14 @@ {{/if}} - + {{#if (feature "membersActivityFeed")}} + + {{else}} + + {{/if}} diff --git a/ghost/admin/app/components/member/activity-feed.hbs b/ghost/admin/app/components/member/activity-feed.hbs new file mode 100644 index 0000000000..bbaafe8c26 --- /dev/null +++ b/ghost/admin/app/components/member/activity-feed.hbs @@ -0,0 +1,38 @@ +{{#let (members-event-fetcher filter=(concat "data.member_id:" @member.id) pageSize=5) as |eventsFetcher|}} + {{#if eventsFetcher.data}}

Member activity

{{/if}} +
+
+
+
+ {{#if eventsFetcher.isLoading}} +
+ {{else if eventsFetcher.data}} + {{#each eventsFetcher.data as |rawEvent|}} + {{#let (parse-member-event rawEvent) as |event|}} +
+ {{svg-jar event.icon class=event.iconClass}} + {{#if event.email}} + + {{else}} + {{event.action}} {{event.object}} + {{/if}} + {{moment-format event.timestamp "D MMM YYYY"}} +
+ {{/let}} + {{/each}} + + View all activity + {{else}} +
+
{{svg-jar "no-data-list"}}
+

Member activity

+

+ All events related to this member will be shown here. +

+
+ {{/if}} +
+
+
+
+{{/let}} \ No newline at end of file diff --git a/ghost/admin/app/routes/member.js b/ghost/admin/app/routes/member.js index 80dd9fb110..8543a88c90 100644 --- a/ghost/admin/app/routes/member.js +++ b/ghost/admin/app/routes/member.js @@ -3,6 +3,7 @@ import {action} from '@ember/object'; import {inject as service} from '@ember/service'; export default class MembersRoute extends AdminRoute { + @service feature; @service router; _requiresBackgroundRefresh = true; @@ -18,7 +19,11 @@ export default class MembersRoute extends AdminRoute { this._requiresBackgroundRefresh = false; if (params.member_id) { - return this.store.queryRecord('member', {id: params.member_id, include: 'email_recipients,products'}); + if (this.feature.membersActivityFeed) { + return this.store.queryRecord('member', {id: params.member_id, include: 'products'}); + } else { + return this.store.queryRecord('member', {id: params.member_id, include: 'email_recipients,products'}); + } } else { return this.store.createRecord('member'); }