2016-09-09 15:41:32 +01:00
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, notification_status_field %}
2016-09-01 15:40:49 +01:00
{% from "components/page-footer.html" import page_footer %}
2018-09-19 12:39:36 +01:00
{% from "components/form.html" import form_wrapper %}
2016-03-02 17:36:20 +00:00
2024-11-05 14:35:22 -08:00
< div class = "ajax-block-container" role = "region" >
2020-01-08 12:23:09 +00:00
{% if job.scheduled %}
2016-06-28 09:21:46 +01:00
2023-08-25 11:49:13 -04:00
< p class = "usa-body" >
2017-06-24 17:12:45 +01:00
Sending
2023-08-08 16:19:17 -04:00
< a class = "usa-link" href = "{{ url_for('.view_template_version', service_id=current_service.id, template_id=job.template.id, version=job.template_version) }}" > {{ job.template.name }}< / a >
2017-06-24 17:12:45 +01:00
{{ job.scheduled_for|format_datetime_relative }}
2016-09-01 11:06:52 +01:00
< / p >
2016-09-01 15:40:49 +01:00
< div class = "page-footer" >
2018-09-19 12:39:36 +01:00
{% call form_wrapper() %}
2016-09-01 15:40:49 +01:00
{{ page_footer(
button_text="Cancel sending",
destructive=True
) }}
2018-09-19 12:39:36 +01:00
{% endcall %}
2016-09-01 15:40:49 +01:00
< / div >
2016-08-25 16:49:31 +01:00
2016-09-01 11:06:52 +01:00
{% else %}
2016-08-25 16:49:31 +01:00
2016-09-01 11:06:52 +01:00
{% if notifications %}
2024-07-29 15:55:59 -04:00
< div class = "dashboard-table job-status-table table-overflow-x-auto" >
2016-09-01 11:06:52 +01:00
{% endif %}
2022-12-05 15:33:44 -05:00
{% if job.still_processing %}
< p class = "bottom-gutter hint" >
Report is {{ "{:.0f}%".format(job.percentage_complete * 0.99) }} complete…
< / p >
2024-03-14 08:57:58 -07:00
{% elif notifications and time_left != "Data no longer available" %}
2022-12-05 15:33:44 -05:00
< p class = "bottom-gutter" >
2023-08-08 16:19:17 -04:00
< a href = "{{ download_link }}" download class = "usa-link heading-small" > Download this report (< abbr title = "Comma separated values" > CSV< / abbr > )< / a >
2022-12-05 15:33:44 -05:00
 
< span id = "time-left" > {{ time_left }}< / span >
< / p >
2016-07-11 13:53:55 +01:00
{% endif %}
2024-03-14 08:57:58 -07:00
2016-09-01 11:06:52 +01:00
{% call(item, row_number) list_table(
notifications,
caption=uploaded_file_name,
caption_visible=False,
2024-07-29 15:32:53 -04:00
border_visible=True,
2020-01-21 14:07:23 +00:00
empty_message='No messages to show yet…' if job.awaiting_processing_or_recently_processed else 'These messages have been deleted because they were sent more than {} days ago'.format(service_data_retention_days),
2016-09-01 11:06:52 +01:00
field_headings=[
'Recipient',
2024-07-29 15:32:53 -04:00
'Message status'
2016-09-01 11:06:52 +01:00
],
field_headings_visible=False
2016-08-25 16:49:31 +01:00
) %}
2016-09-01 11:06:52 +01:00
{% call row_heading() %}
2024-07-29 15:32:53 -04:00
< a class = "usa-link file-list-filename" href = "{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id, from_job=job.id) }}" > {{ item.to | format_phone_number_human_readable }}< / a >
2017-06-24 17:12:45 +01:00
< p class = "file-list-hint" >
{{ item.preview_of_content }}
< / p >
2016-09-01 11:06:52 +01:00
{% endcall %}
2017-10-02 12:34:10 +01:00
{{ notification_status_field(item) }}
2016-08-25 16:49:31 +01:00
{% endcall %}
2016-06-28 09:21:46 +01:00
2016-09-01 11:06:52 +01:00
{% if more_than_one_page %}
< p class = "table-show-more-link" >
Only showing the first 50 rows
< / p >
{% endif %}
{% if notifications %}
< / div >
2016-08-25 16:49:31 +01:00
{% endif %}
2016-08-02 10:34:27 +01:00
{% endif %}
2020-09-10 17:34:05 +01:00
< / div >