remove big_number from _jobs.html

This commit is contained in:
stvnrlly
2023-12-17 15:35:27 -05:00
parent 9ab4a0c457
commit 1b610030fe
2 changed files with 122 additions and 20 deletions

View File

@@ -1,4 +1,3 @@
{% from "components/big-number.html" import big_number %}
{% from "components/pill.html" import pill %}
<div class="ajax-block-container">
@@ -6,11 +5,55 @@
<div class="grid-row ">
{% for label, query_param, url, count in counts %}
{% if query_param == 'pending' %}
<div class="grid-col-3">{{ big_number(count, query_param, smaller=True) }}</div>
<div class="grid-col-3">
{% if link %}
<a class="usa-link display-flex" href="{{ link }}">
{% endif %}
<span class="big-number-smaller">
<span class="big-number-number">
{% if count is number %}
{% if currency %}
{{ "{}{:,.2f}".format(currency, count) }}
{% else %}
{{ "{:,}".format(count) }}
{% endif %}
{% else %}
{{ count }}
{% endif %}
</span>
{% if label %}
<span class="big-number-label">{{ query_param }}</span>
{% endif %}
</span>
{% if link %}
</a>
{% endif %}
</div>
{% else %}
<div class="grid-col-3">{{ big_number(count, label, smaller=True) }}</div>
<div class="grid-col-3">
{% if link %}
<a class="usa-link display-flex" href="{{ link }}">
{% endif %}
<span class="big-number-smaller">
<span class="big-number-number">
{% if count is number %}
{% if currency %}
{{ "{}{:,.2f}".format(currency, count) }}
{% else %}
{{ "{:,}".format(count) }}
{% endif %}
{% else %}
{{ count }}
{% endif %}
</span>
{% if label %}
<span class="big-number-label">{{ label }}</span>
{% endif %}
</span>
{% if link %}
</a>
{% endif %}
{% endif %}
{% endfor %}
</div>
{% else %}

View File

@@ -1,5 +1,4 @@
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
{% from "components/big-number.html" import big_number -%}
<div class='dashboard-table ajax-block-container'>
{% call(item, row_number) list_table(
@@ -36,28 +35,88 @@
{% endcall %}
{% call field() %}
{% if item.scheduled %}
{{ big_number(
item.notification_count,
smallest=True,
label=item.notification_count|message_count_label(
item.template_type,
suffix='waiting to send'
)
) }}
{% if link %}
<a class="usa-link display-flex" href="{{ link }}">
{% endif %}
<span class="big-number-smallest">
<span class="big-number-number">
{% if item.notification_count is number %}
{% if currency %}
{{ "{}{:,.2f}".format(currency, item.notification_count) }}
{% else %}
{{ "{:,}".format(item.notification_count) }}
{% endif %}
{% else %}
{{ item.notification_count }}
{% endif %}
</span>
{% if item.notification_count %}
<span class="big-number-label">{{ item.notification_count|message_count_label(item.template_type,suffix='waiting to send') }}</span>
{% endif %}
</span>
{% if link %}
</a>
{% endif %}
{% else %}
<div class="grid-row">
<div class="grid-col-4">
{{ big_number(
item.notifications_sending,
smallest=True,
label='pending',
) }}
{% if link %}
<a class="usa-link display-flex" href="{{ link }}">
{% endif %}
<span class="big-number-smallest">
<span class="big-number-number">
{% if item.notifications_sending is number %}
{% if currency %}
{{ "{}{:,.2f}".format(currency, item.notifications_sending) }}
{% else %}
{{ "{:,}".format(item.notifications_sending) }}
{% endif %}
{% else %}
{{ item.notifications_sending }}
{% endif %}
</span>
{% if item.notifications_sending %}
<span class="big-number-label">{{ item.notifications_sending }}</span>
{% endif %}
</span>
{% if link %}
</a>
{% endif %}
</div>
<div class="grid-col-4">
{{ big_number(item.notifications_delivered, smallest=True, label='delivered') }}
<span class="big-number-smallest">
<span class="big-number-number">
{% if item.notifications_delivered is number %}
{{ "{:,}".format(item.notifications_delivered) }}
{% else %}
{{ item.notifications_delivered }}
{% endif %}
</span>
<span class="big-number-label">delivered}</span>
</span>
</div>
<div class="grid-col-4">
{{ big_number(item.notifications_failed, smallest=True, label='failed') }}
{% if link %}
<a class="usa-link display-flex" href="{{ link }}">
{% endif %}
<span class="big-number-smallest">
<span class="big-number-number">
{% if item.notifications_failed is number %}
{% if currency %}
{{ "{}{:,.2f}".format(currency, item.notifications_failed) }}
{% else %}
{{ "{:,}".format(item.notifications_failed) }}
{% endif %}
{% else %}
{{ item.notifications_failed }}
{% endif %}
</span>
<span class="big-number-label">failed</span>
</span>
{% if link %}
</a>
{% endif %}
</div></div>
{% endif %}