Display when subscriber was created in listings

[MAILPOET-6042]
This commit is contained in:
Pavel Dohnal
2024-04-30 12:24:30 +02:00
committed by Aschepikov
parent f9d5d50b66
commit 1bcccd9390
2 changed files with 19 additions and 1 deletions

View File

@@ -82,6 +82,11 @@ const columns = [
},
{
name: 'last_subscribed_at',
label: MailPoet.I18n.t('confirmedOn'),
sortable: true,
},
{
name: 'created_at',
label: MailPoet.I18n.t('subscribedOn'),
sortable: true,
},
@@ -566,7 +571,7 @@ function SubscriberList({ match }) {
) : null}
<td
className="column-date mailpoet-hide-on-mobile"
data-colname={MailPoet.I18n.t('subscribedOn')}
data-colname={MailPoet.I18n.t('confirmedOn')}
>
{subscriber.last_subscribed_at ? (
<>
@@ -576,6 +581,18 @@ function SubscriberList({ match }) {
</>
) : null}
</td>
<td
className="column-date mailpoet-hide-on-mobile"
data-colname={MailPoet.I18n.t('subscribedOn')}
>
{subscriber.created_at ? (
<>
{MailPoet.Date.short(subscriber.created_at)}
<br />
{MailPoet.Date.time(subscriber.created_at)}
</>
) : null}
</td>
</div>
);
};

View File

@@ -74,6 +74,7 @@
'lists': __('Lists'),
'statisticsColumn': __('Score'),
'subscribedOn': __('Subscribed on'),
'confirmedOn': __('Confirmed on'),
'lastModifiedOn': __('Last modified on'),
'oneSubscriberTrashed': __('1 subscriber was moved to the trash.'),
'multipleSubscribersTrashed': __('%1$d subscribers were moved to the trash.'),