Merge branch 'main' into 2966-create-organization-dashboard-pageroutetemplate-page

This commit is contained in:
Beverly Nguyen
2025-10-14 12:33:46 -07:00
101 changed files with 1939 additions and 6429 deletions

View File

@@ -10,9 +10,6 @@
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('dashboard') }}" href="{{ url_for('.service_dashboard', service_id=current_service.id) }}">Dashboard</a></li>
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('activity') }}" href="{{ url_for('.all_jobs_activity', service_id=current_service.id) }}">Activity</a></li>
{% endif %}
{% if not current_user.has_permissions(ServicePermission.VIEW_ACTIVITY) %}
<li class="usa-sidenav__item"><a class="{{ casework_navigation.is_selected('sent-messages') }}" href="{{ url_for('.view_notifications', service_id=current_service.id, status='sending,delivered,failed') }}">Sent messages</a></li>
{% endif %}
{% elif current_user.has_permissions(allow_org_user=True) %}
<li class="usa-sidenav__item"><a class="usa-link{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
<li class="usa-sidenav__item"><a class="usa-link{{ main_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_users', service_id=current_service.id) }}">Team members</a></li>

View File

@@ -1,5 +1,5 @@
{% macro mapping_table(caption='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False) -%}
<table class="usa-table{{' usa-table--borderless' if not border_visible}} width-full">
{% macro mapping_table(caption='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False, striped=False) -%}
<table class="usa-table{{' usa-table--borderless' if not border_visible}}{{' usa-table--striped' if striped}} width-full">
<caption class="font-body-lg table-heading{{ ' usa-sr-only' if not caption_visible}}">
{{ caption }}
</caption>
@@ -22,10 +22,10 @@
</table>
{%- endmacro %}
{% macro list_table(items, caption='', empty_message='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False) -%}
{% macro list_table(items, caption='', empty_message='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False, striped=False) -%}
{% set parent_caller = caller %}
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible, equal_length, border_visible) %}
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible, equal_length, border_visible, striped) %}
{% for item in items %}
{% call row(item.id) %}
{{ parent_caller(item, loop.index + 1) }}

View File

@@ -30,9 +30,8 @@
</p>
{% elif notifications and time_left != "Data no longer available" %}
<p class="margin-bottom-3">
<a href="{{ download_link }}" download class="usa-link font-heading-md">Download this report (<abbr title="Comma separated values">CSV</abbr>)</a>
&emsp;
<span id="time-left">{{ time_left }}</span>
<a href="{{ download_link }}" download class="usa-link">Download this report (<abbr title="Comma separated values">CSV</abbr>)</a>
<span id="time-left" class="margin-left-2">{{ time_left }}</span>
</p>
{% endif %}

View File

@@ -165,7 +165,7 @@ recipients.column_headers %}
<h2 class="font-body-lg" id="file-preview">{{ original_file_name }}</h2>
<div class="fullscreen-content" data-module="fullscreen-table">
<div class="spreadsheet usa-table-container--scrollable" tabindex="0">
{% call(item, row_number) list_table(
recipients.displayed_rows,
caption=original_file_name,

View File

@@ -57,7 +57,7 @@
</div>
</div>
<div class="fullscreen-content" data-module="fullscreen-table">
<div class="spreadsheet usa-table-container--scrollable" tabindex="0">
{% call(item, row_number) mapping_table(
caption="Errors in " + original_file_name,
caption_visible=False,

View File

@@ -15,7 +15,7 @@
{% if not job.finished_processing %}
<p class="max-width-full">Status updates automatically while processing. Refresh the page if needed.</p>
{% endif %}
<div data-job-id="{{ job.id }}" data-job-finished="{{ 'true' if job.finished_processing else 'false' }}" data-host="{{ api_public_url }}">
<div data-job-id="{{ job.id }}" data-job-finished="{{ 'true' if job.finished_processing else 'false'}}">
<div class='tabs ajax-block-container' data-key="counts">
{{ pill(counts, status, {'smaller': True}) }}
</div>

View File

@@ -1,92 +0,0 @@
{% extends "withnav_template.html" %}
{% from "components/ajax-block.html" import ajax_block %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
{% from "components/components/button/macro.njk" import usaButton %}
{% set page_title = (
(99|message_count_label(message_type, suffix='')) | capitalize
if current_user.has_permissions(ServicePermission.VIEW_ACTIVITY)
else 'Sent messages'
) %}
{% block service_page_title %}
{{ page_title }}
{% endblock %}
{% block maincolumn_content %}
{{ page_header(page_title) }}
{{ ajax_block(
partials,
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status),
'counts'
) }}
<p class="notification-status {{ field_status }}">
Messages will remain in pending state until carrier status is received, typically 5 minutes.
</p>
{% call form_wrapper(
action=url_for('.view_notifications', service_id=current_service.id, message_type=message_type),
class="usa-search margin-bottom-2"
) %}
<div class="grid-col-4 {% if message_type == 'sms' %}extra-tracking{% endif %}">
{{ search_form.to(param_extensions={
"label": {
"text": things_you_can_search_by|formatted_list(
conjunction='or',
before_each='',
after_each='',
prefix='Search by',
prefix_plural='Search by'
)
}
}) }}
</div>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button class="usa-button" type="submit">
<span class="usa-search__submit-text">Search </span><img src="/assets/img/usa-icons-bg/search--white.svg"
class="usa-search__submit-icon" alt="Search" />
</button>
{% endcall %}
{% call form_wrapper(id="search-form") %}
<input type="hidden" name="to" {% if search_form.to.data %}value="{{ search_form.to.data }}{% endif %}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{% endcall %}
{% if current_user.has_permissions(ServicePermission.VIEW_ACTIVITY) %}
<p class="font-body-sm">
<a href="{{ download_link_seven_day }}" download="download" class="usa-button usa-button--outline">Download all data last 7 days (<abbr title="Comma separated values">CSV</abbr>)</a>
&emsp;
Data available for {{ partials.service_data_retention_days }} days
</p>
<p class="font-body-sm">
<a href="{{ download_link_five_day }}" download="download" class="usa-button usa-button--outline">Download all data last 5 days (<abbr title="Comma separated values">CSV</abbr>)</a>
&emsp;
</p>
<p class="font-body-sm">
<a href="{{ download_link_three_day }}" download="download" class="usa-button usa-button--outline">Download all data last 3 days (<abbr title="Comma separated values">CSV</abbr>)</a>
&emsp;
</p>
<p class="font-body-sm">
<a href="{{ download_link_today }}" download="download" class="usa-button usa-button--outline">Download all data today (<abbr title="Comma separated values">CSV</abbr>)</a>
&emsp;
</p>
{% endif %}
{{ ajax_block(
partials,
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status, page=page),
'notifications',
form='search-form'
) }}
{% endblock %}

View File

@@ -1,64 +0,0 @@
{% extends "base.html" %}
{% from "components/page-header.html" import page_header %}
{% block per_page_title %}
How to pay
{% endblock %}
{% block content_column_content %}
{{ page_header('How to pay') }}
<!-- <p>
If you use Notify.gov to send text messages, you may need to send us a <a class="usa-link" href="#purchase-orders">purchase order</a>.
</p>
<h2 class="font-body-lg" id="invoices">
Invoices
</h2>
<p>
Notify is run by the Government Digital Service (GDS), part of the Cabinet Office.
</p>
<p>
The Cabinet Office will send your organization an invoice each quarter if you:
</p>
<ul class="list list-bullet">
<li>exceed the <a class="usa-link" href="{{ url_for('.pricing') }}">free text message allowance</a></li>
</ul>
<p>
If your organization has more than one Notify service, youll see a breakdown of each service on your invoice.
</p>
<p>
If the value of an invoice is less than £250 (before <abbr title="Value Added Tax">VAT</abbr>), it will be added to the total for the next quarter to save time and effort.
</p>
<p>
You can pay by BACS, debit card, or credit card.
</p>
<p>
Please start your payment reference with the invoice number.
</p>
<h2 class="font-body-lg" id="purchase-orders">
Purchase orders
</h2>
<p>
If your organizations total estimated spend is more than £500 per quarter (before <abbr title="Value Added Tax">VAT</abbr>), you need to raise a purchase order (PO).
</p>
<p>
Your organization should raise a single <abbr title="purchase order">PO</abbr> for the estimated cost of all its services. You can update the <abbr title="purchase order">PO</abbr> any time if your usage increases.
</p>
<p>
Your organization may need to <a class="usa-link" href="#">add the Cabinet Office as a supplier</a> before you can raise a <abbr title="purchase order">PO</abbr>.
</p> -->
{% endblock %}

View File

@@ -75,7 +75,7 @@
<h2 class="font-body-lg">A spreadsheet is available to use</h2>
<div class="spreadsheet" data-module="fullscreen-table">
<div class="spreadsheet usa-table-container--scrollable" tabindex="0">
{% call(item, row_number) list_table(
example,
caption="Example spreadsheet",

View File

@@ -39,16 +39,9 @@
{% call row() %}
{{ text_field('Send text messages') }}
{{ boolean_field('sms' in current_service.permissions) }}
{# {{ edit_field(
'Change',
url_for(
'.service_set_channel',
service_id=current_service.id,
channel='sms'
),
permissions=[ServicePermission.MANAGE_SERVICE],
suffix='your settings for sending text messages',
)}} #}
{% call field(align='right') %}
<span class="table-field-status-default">Set automatically</span>
{% endcall %}
{% endcall %}
{% if current_user.platform_admin %}
@@ -218,6 +211,9 @@
{{ text_field('Live')}}
{% if current_service.trial_mode and not current_service.organization_id %}
{{ text_field('No (organization must be set first)') }}
{% call field(align='right') %}
<span class="table-field-status-default">Set automatically</span>
{% endcall %}
{% else %}
{{ boolean_field(not current_service.trial_mode) }}
{{ edit_field('Change', url_for('.service_switch_live', service_id=current_service.id), suffix='service status') }}