{% extends "base.html" %} {% block title %}{{ project.name }}{% endblock %} {% block content %}

{{ project.name }} {% if not project.active %} Inactive {% endif %}

{% if project.description %}

{{ project.description }}

{% endif %}
{% if current_user.role in ['admin', 'supervisor'] %} Edit {% endif %} All Projects
{# ── Project Info ── #}
Project Details
Status
{{ 'Active' if project.active else 'Inactive' }}
Project Manager
{{ project.project_manager.username if project.project_manager else '—' }}
Created
{{ project.created_at.strftime('%Y-%m-%d') }}
Facilities
{{ facilities|length }}
{# ── Facilities ── #}
Facilities
{% if facilities %}
{% for f in facilities %} {% endfor %}
Name Address Status
{{ f.name }} {{ f.address or '—' }} {{ 'Active' if f.active else 'Inactive' }}
{% else %}
No facilities linked to this project yet.
{% endif %}
{# ── Customer Assignments ── #} {% if current_user.role == 'admin' %}
Customer Assignments Add Customer
{% if assignments %}
{% for a in assignments %} {% endfor %}
Customer Username Email Facility Scope Assigned
{{ a.user.username }} {{ a.user.email }} {% if a.facility %} {{ a.facility.name }} {% else %} All facilities {% endif %} {{ a.created_at.strftime('%Y-%m-%d') }}
{% else %}
No customer users assigned yet. Add one now.
{% endif %}
{% endif %}
{% endblock %}