Skip to content

Commit

Permalink
Apply number formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Mar 10, 2024
1 parent 6db2acf commit 2fe0224
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/elements/SendoutElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,9 @@ protected function tableAttributeHtml(string $attribute): string

case 'mailingListIds':
return (string)$this->getMailingListCount();

case 'recipients':
return number_format($this->recipients);
}

return parent::tableAttributeHtml($attribute);
Expand Down
6 changes: 3 additions & 3 deletions src/templates/sendouts/_preview.twig
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,17 @@
<div class="value">
{% if sendout.campaign %}
<a href="{{ sendout.campaign.getReportUrl('recipients', { sendout: sendout.id }) }}">
{{ sendout.recipients }}
{{ sendout.recipients|number_format }}
</a>
{% else %}
{{ sendout.recipients }}
{{ sendout.recipients|number_format }}
{% endif %}
</div>
</div>
<div class="data">
<h5 class="heading">{{ "Failures"|t('campaign') }}</h5>
<div class="value">
{{ sendout.failures }}
{{ sendout.failures|number_format }}
{% if sendout.failedContacts %}
<span class="info">
{% for contact in sendout.failedContacts %}
Expand Down

0 comments on commit 2fe0224

Please sign in to comment.