diff --git a/app/templates/modern/dashboard.html b/app/templates/modern/dashboard.html index 6b61e96..3458c1d 100644 --- a/app/templates/modern/dashboard.html +++ b/app/templates/modern/dashboard.html @@ -20,6 +20,75 @@
{{ now_display }}
+{# ── Scheduled inspections ────────────────────────────────────────────── #} +{% if current_user.role != 'customer' %} +
+
+
+ Scheduled Inspection In Progress +
+ View all +
+ + {% if sched_overdue_count %} +
+ + {{ sched_overdue_count }} scheduled inspection{{ 's' if sched_overdue_count != 1 }} + {{ 'are' if sched_overdue_count != 1 else 'is' }} overdue. +
+ {% endif %} + + {% if sched_upcoming %} +
+ + + + + + + + + {% for s in sched_upcoming %} + + + + + + + + + {% endfor %} + +
FacilityInspection TemplateInspectorHow OftenNext 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 %} +
+
+ {% else %} +
No inspections due in the next 7 days.
+ {% endif %} +
+{% endif %} + {# ── KPI row ──────────────────────────────────────────────────────────── #}
@@ -150,75 +219,6 @@
-{# ── Scheduled inspections ────────────────────────────────────────────── #} -{% if current_user.role != 'customer' %} -
-
-
- Scheduled Inspection In Progress -
- View all -
- - {% if sched_overdue_count %} -
- - {{ sched_overdue_count }} scheduled inspection{{ 's' if sched_overdue_count != 1 }} - {{ 'are' if sched_overdue_count != 1 else 'is' }} overdue. -
- {% endif %} - - {% if sched_upcoming %} -
- - - - - - - - - {% for s in sched_upcoming %} - - - - - - - - - {% endfor %} - -
FacilityInspection TemplateInspectorHow OftenNext 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 %} -
-
- {% else %} -
No inspections due in the next 7 days.
- {% endif %} -
-{% endif %} - {# ── Recent activity ──────────────────────────────────────────────────── #}