diff --git a/app/templates/dashboard.html b/app/templates/dashboard.html index 27b4e65..0d0c436 100644 --- a/app/templates/dashboard.html +++ b/app/templates/dashboard.html @@ -126,6 +126,58 @@ {% endif %} +{# ── Recent activity ─────────────────────────────────────────────────────── #} +
+
+ Recent Activity +
+
+ {% if recent_inspections %} +
+ + + + + + + {% if current_user.role != 'inspector' %}{% endif %} + + + + + + {% for insp in recent_inspections %} + + + + + {% if current_user.role != 'inspector' %}{% endif %} + + + + {% endfor %} + +
DateFacilityAreaInspectorScoreStatus
{{ insp.inspection_date.strftime('%Y-%m-%d %H:%M') }}{{ insp.facility.name }}{{ insp.area.name if insp.area else '—' }}{{ insp.inspector.display_name }} + {% if insp.overall_score %} + + {{ insp.overall_score }}% + + {% else %} + + {% endif %} + + + {{ 'Submitted' if insp.status == 'completed' else insp.status|title }} + +
+
+ {% else %} +
+ No recent inspections. +
+ {% endif %} +
+
{# ── System quick stats (admin/director) ─────────────────────────────────── #} {% if current_user.role in ['admin', 'director'] %} @@ -314,59 +366,6 @@ {% endif %} -{# ── Recent activity ─────────────────────────────────────────────────────── #} -
-
- Recent Activity -
-
- {% if recent_inspections %} -
- - - - - - - {% if current_user.role != 'inspector' %}{% endif %} - - - - - - {% for insp in recent_inspections %} - - - - - {% if current_user.role != 'inspector' %}{% endif %} - - - - {% endfor %} - -
DateFacilityAreaInspectorScoreStatus
{{ insp.inspection_date.strftime('%Y-%m-%d %H:%M') }}{{ insp.facility.name }}{{ insp.area.name if insp.area else '—' }}{{ insp.inspector.display_name }} - {% if insp.overall_score %} - - {{ insp.overall_score }}% - - {% else %} - - {% endif %} - - - {{ 'Submitted' if insp.status == 'completed' else insp.status|title }} - -
-
- {% else %} -
- No recent inspections. -
- {% endif %} -
-
- {# ── Customer portal: scoped facilities panel ───────────────────────────── #} {% if current_user.role == 'customer' %}