mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Replace message count macros with formatters
We prefer formatters now. Removing uses of the aliasing macro lets remove it entirely.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{% from "components/big-number.html" import big_number_with_status %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
|
||||
<div class="govuk-grid-row bottom-gutter">
|
||||
<div class="govuk-grid-column-one-third">
|
||||
{{ big_number_with_status(
|
||||
global_stats.email.delivered + global_stats.email.failed,
|
||||
message_count_label(global_stats.email.delivered, 'email'),
|
||||
global_stats.email.delivered|message_count_label('email'),
|
||||
global_stats.email.failed,
|
||||
global_stats.email.failure_rate,
|
||||
global_stats.email.failure_rate|float > 3,
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="govuk-grid-column-one-third">
|
||||
{{ big_number_with_status(
|
||||
global_stats.sms.delivered + global_stats.sms.failed,
|
||||
message_count_label(global_stats.sms.delivered, 'sms'),
|
||||
global_stats.sms.delivered|message_count_label('sms'),
|
||||
global_stats.sms.failed,
|
||||
global_stats.sms.failure_rate,
|
||||
global_stats.sms.failure_rate|float > 3,
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="govuk-grid-column-one-third">
|
||||
{{ big_number_with_status(
|
||||
global_stats.letter.requested,
|
||||
message_count_label(global_stats.letter.requested, 'letter'),
|
||||
global_stats.letter.requested|message_count_label('letter'),
|
||||
global_stats.letter.failed,
|
||||
global_stats.letter.failure_rate,
|
||||
global_stats.letter.failure_rate|float > 3,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{% extends "views/platform-admin/_base_template.html" %}
|
||||
{% from "components/big-number.html" import big_number_simple %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
{% from "components/status-box.html" import status_box %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/details/macro.njk" import govukDetails %}
|
||||
@@ -36,7 +35,7 @@
|
||||
<div class="govuk-grid-column-one-third">
|
||||
{{ big_number_simple(
|
||||
noti_type.black_box.number,
|
||||
message_count_label(noti_type.black_box.number, noti_type.black_box.notification_type)
|
||||
noti_type.black_box.number|message_count_label(noti_type.black_box.notification_type)
|
||||
) }}
|
||||
|
||||
{% for item in noti_type.other_data %}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{% extends "views/platform-admin/_base_template.html" %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/big-number.html" import big_number, big_number_with_status %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
{% from "components/table.html" import mapping_table, field, stats_fields, row_group, row, right_aligned_field_heading, hidden_field_heading, text_field %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/button/macro.njk" import govukButton %}
|
||||
@@ -39,7 +38,7 @@
|
||||
{{ big_number(
|
||||
service['stats'][channel]['requested'],
|
||||
smallest=True,
|
||||
label=message_count_label(service['stats'][channel]['requested'], channel)
|
||||
label=service['stats'][channel]['requested']|message_count_label(channel)
|
||||
) }}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user