Merged dashboard.html

This commit is contained in:
Jonathan Bobel
2024-07-17 12:18:05 -04:00
parent b718fbf791
commit 4113a2819d
2 changed files with 29 additions and 11 deletions

View File

@@ -9,7 +9,7 @@
{% block maincolumn_content %}
<div class="dashboard margin-bottom-8">
<div class="dashboard margin-bottom-2">
<h1 class="usa-sr-only">Dashboard</h1>
{% if current_user.has_permissions('manage_templates') and not current_service.all_templates %}
@@ -18,22 +18,27 @@
{{ ajax_block(partials, updates_url, 'upcoming') }}
<!-- <canvas id="myChart" data-service-id="{{ service_id }}"></canvas> -->
<h2 class="font-body-2xl margin-top-0">{{ current_service.name }} Dashboard</h2>
<h2 class="line-height-sans-2 margin-bottom-0 margin-top-4">
Messages sent
</h2>
{{ ajax_block(partials, updates_url, 'inbox') }}
{{ ajax_block(partials, updates_url, 'totals') }}
<!-- {{ ajax_block(partials, updates_url, 'totals') }} -->
<div id="totalMessageChartContainer" data-sms-sent="{{ sms_sent }}" data-sms-allowance-remaining="{{ sms_allowance_remaining }}">
<h2 id="chartTitle">Total Messages</h2>
<svg id="totalMessageChart"></svg>
<div id="message"></div>
</div>
<div id="totalMessageTable" class="margin-0"></div>
<p class="align-with-heading-copy margin-bottom-4">
What counts as 1 text message part?<br />
See <a class="usa-link" href="{{ url_for('.pricing') }}">Tracking usage</a>.
</p>
<h2 class="line-height-sans-2 margin-bottom-0 margin-top-4">
Activity snapshot
</h2>
<div id="chartsArea">
<div id="activityChartContainer">
<form class="usa-form">
<label class="usa-label" for="options">Account</label>
<select class="usa-select margin-bottom-2" name="options" id="options">
@@ -42,7 +47,7 @@
<option value="individual">{{ current_user.name }}</option>
</select>
</form>
<div id="Weekly">
<div id="activityChart">
<div class="chart-header">
<div class="chart-subtitle">{{ current_service.name }} - Last 7 Days</div>
<div class="chart-legend" aria-label="Legend"></div>
@@ -54,6 +59,8 @@
<div id="message"></div>
<div id="aria-live-account" class="usa-sr-only" aria-live="polite"></div>
{% if current_user.has_permissions('manage_service') %}{% endif %}
<h2 class="margin-top-4">Recent Batches</h2>
<div class="table-wrapper">
<table class="usa-table job-table margin-top-0">
@@ -124,5 +131,17 @@
<h2>Recent templates</h2>
{{ ajax_block(partials, updates_url, 'template-statistics') }}
{# <h2 class="margin-top-4 margin-bottom-1">Message count</h2>
{% if current_user.has_permissions('manage_service') %}
<h3 class='margin-bottom-0' id="current-year"></h3>
{{ ajax_block(partials, updates_url, 'usage') }}
<p class="margin-top-0">During the pilot period, each service has an allowance of 250,000 message parts. Once this allowance is met, the
application will stop delivering messages. There's no monthly charge, no setup fee, and no procurement cost.</p>
<p class="align-with-heading-copy">
What counts as 1 text message part?<br />
See <a class="usa-link" href="{{ url_for('.pricing') }}">pricing</a>.
</p>
{% endif %} #}
</div>
{% endblock %}