Files
notifications-admin/app/templates/views/organizations/organization/index.html
Beverly Nguyen fb528f03a8 Add organization message usage and service counts to dashboard
- Fetch organization message allowance from API endpoint
- Display messages sent, remaining, and total limit on dashboard
- Add service count statistics (total, live, trial, suspended)
- Pass message usage data to template for chart visualization
2025-10-16 14:39:01 -07:00

62 lines
2.4 KiB
HTML

{% from "components/page-header.html" import page_header %}
{% extends "withnav_template.html" %}
{% block org_page_title %}
Organization Dashboard
{% endblock %}
{% block maincolumn_content %}
{{ page_header('Organization Dashboard', size='large') }}
<div id="totalMessageChartContainer" data-messages-sent="{{ messages_sent|default(0) }}" data-messages-remaining="{{ messages_remaining|default(0) }}" data-total-message-limit="{{ total_message_limit|default(0) }}">
<div class="grid-row flex-align-center">
<h2 id="chartTitle" class="margin-right-1 margin-y-0">Overall {{ selected_year }} Total Message Allowance</h2>
<button
type="button"
class="usa-tooltip usa-tooltip__information margin-right-0"
data-position="top"
title="Combined totals across all services in {{ current_org.name }}: pending, failed, or delivered"
>
<span class="usa-sr-only">More information</span>
i
</button>
</div>
<svg id="totalMessageChart"></svg>
<div id="message"></div>
</div>
<div id="totalMessageTable" class="margin-bottom-3"></div>
<div class="grid-row">
<div class="grid-col-12 tablet:grid-col-6">
<div class="usa-card margin-bottom-3">
<div class="usa-card__container">
<div class="usa-card__body padding-2">
<p class="margin-0">
<strong>Services:</strong> {{ total_services }} (Live: {{ live_services }} - Trial: {{ trial_services }} - Suspended: {{ suspended_services }})
</p>
<p class="margin-0">
<strong>Agreement:</strong> Jan 1 - Dec 31
</p>
</div>
</div>
</div>
</div>
</div>
<div class="margin-top-5 margin-bottom-5">
<h2 class="font-heading-lg">What is a service?</h2>
<p class="usa-body">
When you join Notify, you're added to a service. This is your organization's workspace for sending text messages and emails. Within your service, you can:
</p>
<ol class="usa-list">
<li>Create and edit message templates</li>
<li>Send messages to recipients</li>
<li>View message status and history</li>
<li>Manage team members and permissions</li>
<li>Track usage and delivery statistics</li>
<li>If you work for multiple organizations, you may belong to multiple services and can switch between them.</li>
</ol>
</div>
{% endblock %}