📋 {{ report.frequency|title }} Report — {{ report.name }}

{{ start.strftime('%b %d, %Y') }} — {{ end.strftime('%b %d, %Y') }} {% if facility %} · {{ facility.name }}{% endif %}

{# ── Summary / Facility type ── #} {% if report.report_type in ('summary','facility') %} {# KPI row #}
{{ total_inspections }}
Inspections
{{ completed }}
Completed
{{ open_issues }}
Open Issues
{{ '%.1f'|format(avg_score) ~ '%' if avg_score else '—' }}
Avg Score
{% if facility_scores %}

Facility Scores

{% for row in facility_scores %} {% endfor %}
Facility Inspections Avg Score
{{ row.name }} {{ row.count }} {{ '%.1f'|format(row.avg) }}%
{% endif %} {% if critical_issues %}

⚠ Open Critical / High Issues

{% for i in critical_issues %} {% endfor %}
Issue Severity Facility / Area Reported
#{{ i.id }} — {{ i.description[:60] }}{% if i.description|length > 60 %}…{% endif %} {{ i.severity|title }} {% set rf = i.resolved_facility %} {{ rf.name if rf else '—' }} / {{ i.area.name if i.area else '—' }} {{ i.reported_at.strftime('%b %d') }}
{% endif %} {% elif report.report_type == 'issues' %} {# SLA summary bar #} {% if issues %}
{{ sla_breached }}
SLA Breached
{{ sla_at_risk }}
At Risk
{{ issues|length }}
Total Open
{# Per-facility sections #} {% for facility_name, fac_issues in issues_by_facility %}

🏢 {{ facility_name }} ({{ fac_issues|length }} issue{{ 's' if fac_issues|length != 1 else '' }})

{% for i, sla in fac_issues %} {% set row_bg = '#fef2f2' if sla == 'breached' else '#fefce8' if sla == 'at_risk' else '#fff' %} {% endfor %}
# Severity Area Description Status SLA Reported
#{{ i.id }} {{ i.severity|title }} {{ i.area.name if i.area else '—' }} {{ i.description[:70] }}{% if i.description|length > 70 %}…{% endif %} {{ i.status|replace('_',' ')|title }} {{ 'Breached' if sla == 'breached' else 'At Risk' if sla == 'at_risk' else 'OK' }} {{ i.reported_at.strftime('%b %d') }}
{% endfor %} {% else %}

No open issues at this time.

{% endif %} {% endif %}

Janitorial QC System — scheduled report. Do not reply to this email.
View full reports dashboard