{% extends "base.html" %} {% block title %}Inspection Schedules{% endblock %} {% block content %}
{% if current_user.role == 'inspector' %} Inspections scheduled for you. Auto schedules appear in your Inspections list on their own each period; Plan schedules wait for you to press Start. {% else %} Auto schedules automatically create an in-progress inspection for the assigned inspector each period. Plan schedules assign a due date and let the inspector press Start when they begin — with reminders the day before, on the day, and an alert to managers once overdue. {% endif %}
{% if schedules %}| Name | Template | Facility / Area | Inspector | Frequency | Mode | Next Due | Ends | Last Run | Status | |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ s.name }} {% if s.is_follow_up %} {# phase48 — a schedule planned as the deferred twin of "Re-inspect Now". Starting it produces a linked re-inspection. #} Follow-up #{{ s.parent_inspection_id }} {% endif %} | {{ s.template.name if s.template else '—' }} | {{ s.facility.name if s.facility else '—' }} {% if s.area %}/ {{ s.area.name }}{% endif %} | {{ s.inspector.display_name if s.inspector else '—' }} | {{ s.recurrence_label }} | {% if s.mode == 'plan' %} Plan {% else %} Auto {% endif %} | {{ s.next_run_at.strftime('%Y-%m-%d %H:%M') if s.next_run_at else '—' }} {% if s.is_overdue(today) %} Overdue {% endif %} | {% if s.frequency == 'once' %}— {% elif s.end_date %}{{ s.end_date.strftime('%Y-%m-%d') }} {% else %}No end{% endif %} | {{ s.last_run_at.strftime('%Y-%m-%d %H:%M') if s.last_run_at else 'Never' }} | {# "Ended" separates a schedule that reached its end date from one a manager switched off — both are inactive, for different reasons. #} {% if s.active %}Active {% elif s.is_expired %}Ended {% else %}Paused{% endif %} | {% if s.active and s.mode == 'plan' and (current_user.role != 'inspector' or s.inspector_id == current_user.id) %} Start {% endif %} {% if current_user.role != 'inspector' %} {% endif %} |
No inspection schedules configured yet.
Create First Schedule