{% extends "base.html" %} {% block title %}Customer Management{% endblock %} {% block content %}

Customer Management

Manage portal access for all customer accounts.

New Customer
{% if customers %}
{% for customer in customers %} {% set assignments = assignment_map[customer.id] %} {% set facility_ids = scope_map[customer.id] %} {% endfor %}
Username Email Status Assigned Projects Accessible Facilities Created
{{ customer.username }} {{ customer.email }} {% if customer.active %} Active {% else %} Disabled {% endif %} {% if assignments %} {% set project_names = assignments | map(attribute='project') | map(attribute='name') | unique | list %} {% for pname in project_names %} {{ pname }} {% endfor %} {% else %} — None — {% endif %} {% if facility_ids %} {{ facility_ids|length }} facilit{{ 'y' if facility_ids|length == 1 else 'ies' }} {% else %} — None — {% endif %} {{ customer.created_at.strftime('%Y-%m-%d') }}
{# ── Summary footer ── #}
{{ customers|length }} customer account{{ 's' if customers|length != 1 else '' }} total · {{ customers|selectattr('active')|list|length }} active
{% else %}

No customer accounts have been created yet.

Create First Customer
{% endif %} {% endblock %}