Show inactive column in Lists
[MAILPOET-1973]
This commit is contained in:
committed by
Rostislav Wolný
parent
07af1df3a5
commit
2e7de9ce13
@@ -32,6 +32,10 @@ const columns = [
|
|||||||
name: 'unsubscribed',
|
name: 'unsubscribed',
|
||||||
label: MailPoet.I18n.t('unsubscribed'),
|
label: MailPoet.I18n.t('unsubscribed'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'inactive',
|
||||||
|
label: MailPoet.I18n.t('inactive'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'bounced',
|
name: 'bounced',
|
||||||
label: MailPoet.I18n.t('bounced'),
|
label: MailPoet.I18n.t('bounced'),
|
||||||
@@ -212,6 +216,7 @@ class SegmentList extends React.Component {
|
|||||||
const subscribed = Number(segment.subscribers_count.subscribed || 0);
|
const subscribed = Number(segment.subscribers_count.subscribed || 0);
|
||||||
const unconfirmed = Number(segment.subscribers_count.unconfirmed || 0);
|
const unconfirmed = Number(segment.subscribers_count.unconfirmed || 0);
|
||||||
const unsubscribed = Number(segment.subscribers_count.unsubscribed || 0);
|
const unsubscribed = Number(segment.subscribers_count.unsubscribed || 0);
|
||||||
|
const inactive = Number(segment.subscribers_count.inactive || 0);
|
||||||
const bounced = Number(segment.subscribers_count.bounced || 0);
|
const bounced = Number(segment.subscribers_count.bounced || 0);
|
||||||
|
|
||||||
let segmentName;
|
let segmentName;
|
||||||
@@ -253,6 +258,9 @@ class SegmentList extends React.Component {
|
|||||||
<td className="column-date" data-colname={MailPoet.I18n.t('unsubscribed')}>
|
<td className="column-date" data-colname={MailPoet.I18n.t('unsubscribed')}>
|
||||||
<abbr>{ unsubscribed.toLocaleString() }</abbr>
|
<abbr>{ unsubscribed.toLocaleString() }</abbr>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="column-date" data-colname={MailPoet.I18n.t('inactive')}>
|
||||||
|
<abbr>{ inactive.toLocaleString() }</abbr>
|
||||||
|
</td>
|
||||||
<td className="column-date" data-colname={MailPoet.I18n.t('bounced')}>
|
<td className="column-date" data-colname={MailPoet.I18n.t('bounced')}>
|
||||||
<abbr>{ bounced.toLocaleString() }</abbr>
|
<abbr>{ bounced.toLocaleString() }</abbr>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -97,6 +97,11 @@ class Segment extends Model {
|
|||||||
OR relation.status = "' . Subscriber::STATUS_UNSUBSCRIBED . '" THEN 1 ELSE 0 END)',
|
OR relation.status = "' . Subscriber::STATUS_UNSUBSCRIBED . '" THEN 1 ELSE 0 END)',
|
||||||
Subscriber::STATUS_UNSUBSCRIBED
|
Subscriber::STATUS_UNSUBSCRIBED
|
||||||
)
|
)
|
||||||
|
->select_expr(
|
||||||
|
'SUM(CASE WHEN subscribers.status = "' . Subscriber::STATUS_INACTIVE . '"
|
||||||
|
OR relation.status = "' . Subscriber::STATUS_UNSUBSCRIBED . '" THEN 1 ELSE 0 END)',
|
||||||
|
Subscriber::STATUS_INACTIVE
|
||||||
|
)
|
||||||
->select_expr(
|
->select_expr(
|
||||||
'SUM(CASE WHEN subscribers.status = "' . Subscriber::STATUS_UNCONFIRMED . '"
|
'SUM(CASE WHEN subscribers.status = "' . Subscriber::STATUS_UNCONFIRMED . '"
|
||||||
AND relation.status != "' . Subscriber::STATUS_UNSUBSCRIBED . '" THEN 1 ELSE 0 END)',
|
AND relation.status != "' . Subscriber::STATUS_UNSUBSCRIBED . '" THEN 1 ELSE 0 END)',
|
||||||
|
Reference in New Issue
Block a user