{% extends "base.html" %} {% block title %}Dashboard{% endblock %} {# MODERN dashboard (design A/B test — slide 1 of JQC_design). Uses exactly the same context variables as templates/dashboard.html — the dashboard.index route is untouched. Every tile links to the same filtered list view the classic dashboard links to, so no navigation path is lost. #} {% block content %} {# ── Header ───────────────────────────────────────────────────────────── #}
| Facility | Inspection Template | Inspector | How Often | Next Due Date | |
|---|---|---|---|---|---|
| {{ s.facility.name if s.facility else '—' }} | {{ s.template.name if s.template else '—' }} | {{ s.inspector.display_name if s.inspector else '—' }} | {{ s.recurrence_label }} | {{ s.next_due_date.strftime('%b %d, %Y') }} | {% if s.inspector_id and s.inspector_id == current_user.id %} {% if s.is_acknowledged %} Confirmed {% else %} {% endif %} {% set open_id = sched_open_inspections.get(s.id) %} {% if open_id %} Continue {% else %} Start {% endif %} {% endif %} |
| Date | Facility Name | Area | {% if not current_user.is_inspector %}Inspector | {% endif %}Score | Status |
|---|---|---|---|---|---|
| {{ insp.inspection_date.strftime('%b %d, %Y') }} | {{ insp.facility.name }} | {{ insp.area.name if insp.area else '—' }} | {% if not current_user.is_inspector %}{{ insp.inspector.display_name }} | {% endif %}{% if insp.overall_score %} {{ insp.overall_score }}% {% else %} — {% endif %} | {{ 'Submitted' if insp.status == 'completed' else insp.status|title }} |
| ID | Severity | Facility / Description | Status | SLA |
|---|---|---|---|---|
| #{{ issue.id }} | {{ issue.severity|title }} |
{{ issue.resolved_facility.name if issue.resolved_facility else '—' }}
{{ issue.description[:60] }}{% if issue.description|length > 60 %}…{% endif %}
|
{{ issue.status|replace('_',' ')|title }} | {% if sla == 'breached' %} Breached {% elif sla == 'at_risk' %} {{ sla_hours_remaining(issue)|abs|round(1) }}h left {% else %} OK {% endif %} |