mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
✨ Added "Last seen" filter to members screen
refs https://github.com/TryGhost/Team/issues/1418 - adds "Last seen" option to members filtering that lets you filter by date a member last logged in or opened an email with `before`, `on or before`, `on or after`, and `after` options - adds "Last seen on x" data to the member details screen
This commit is contained in:
parent
4562476d4e
commit
3a9ea11213
@ -44,18 +44,16 @@
|
||||
</p>
|
||||
<p>
|
||||
{{svg-jar "member-add"}}
|
||||
Created on {{moment-format @member.createdAtUTC "D MMM YYYY"}}
|
||||
Created on {{moment-format (moment-site-tz @member.createdAtUTC) "D MMM YYYY"}}
|
||||
</p>
|
||||
<p class="gh-member-last-seen">
|
||||
{{svg-jar "eye"}}
|
||||
{{#if (not (is-empty @member.lastSeenAtUTC))}}
|
||||
Last seen on {{moment-format (moment-site-tz @member.lastSeenAtUTC) "D MMM YYYY"}}
|
||||
{{else}}
|
||||
<span>Not seen yet</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
{{#if (feature "membersLastSeenFilter")}}
|
||||
<p class="gh-member-last-seen">
|
||||
{{svg-jar "eye"}}
|
||||
{{#if (not (is-empty @member.lastSeenAtUTC))}}
|
||||
Last seen on {{moment-format @member.lastSeenAtUTC "D MMM YYYY"}}
|
||||
{{else}}
|
||||
<span>Not seen yet</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and (not-eq this.settings.membersSignupAccess "none") (not-eq this.settings.editorDefaultEmailRecipients "disabled"))}}
|
||||
<div class="gh-member-details-stats-container">
|
||||
@ -64,9 +62,9 @@
|
||||
<div class="gh-members-no-stats">
|
||||
<p>
|
||||
{{#if @member.name}}
|
||||
We'll show {{first-name @member.name}}'s email stats here once they receive their first newsletter.
|
||||
We'll show {{first-name @member.name}}'s email stats here once they receive their first newsletter.
|
||||
{{else}}
|
||||
We'll show this member's email stats here once they receive their first newsletter.
|
||||
We'll show this member's email stats here once they receive their first newsletter.
|
||||
{{/if}}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@ const FILTER_PROPERTIES = [
|
||||
// {label: 'Location', name: 'location', group: 'Basic'},
|
||||
{label: 'Label', name: 'label', group: 'Basic', valueType: 'array'},
|
||||
{label: 'Newsletter subscription', name: 'subscribed', group: 'Basic'},
|
||||
{label: 'Last seen', name: 'last_seen_at', group: 'Basic', valueType: 'date', feature: 'membersLastSeenFilter'},
|
||||
{label: 'Last seen', name: 'last_seen_at', group: 'Basic', valueType: 'date'},
|
||||
{label: 'Created', name: 'created_at', group: 'Basic', valueType: 'date'},
|
||||
|
||||
// Member subscription
|
||||
|
@ -90,9 +90,6 @@ export default class FeatureService extends Service {
|
||||
@feature('membersTableStatus')
|
||||
membersTableStatus;
|
||||
|
||||
@feature('membersLastSeenFilter')
|
||||
membersLastSeenFilter;
|
||||
|
||||
@feature('membersContainsFilters')
|
||||
membersContainsFilters;
|
||||
|
||||
|
@ -365,19 +365,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
<h4 class="gh-expandable-title">Members "Last seen" filter</h4>
|
||||
<p class="gh-expandable-description">
|
||||
Filter members by the date they were last seen (logged in or read an email)
|
||||
</p>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
<GhFeatureFlag @flag="membersLastSeenFilter" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
|
@ -19,7 +19,6 @@ describe('Acceptance: Members filtering', function () {
|
||||
beforeEach(async function () {
|
||||
this.server.loadFixtures('configs');
|
||||
this.server.loadFixtures('settings');
|
||||
enableLabsFlag(this.server, 'membersLastSeenFilter');
|
||||
enableLabsFlag(this.server, 'multipleProducts');
|
||||
|
||||
// test with stripe connected and email turned on
|
||||
|
Loading…
Reference in New Issue
Block a user