{% extends "base.html" %} {% block title %}{{ title }}{% endblock %} {% block content %}

{{ title }}

{# ── Recurrence detail (phase46) ──────────────────────────────────── Only the block matching the chosen frequency is shown; the server validates the same block and clears the others on save. #}
{% if schedule %} When the next occurrence is due. Leave unchanged and saving will not move it. {% else %} Leave blank to start one full period from now. {% endif %}
Last date this schedule may produce an occurrence. Blank = repeats indefinitely.
Auto drops an in-progress inspection into the inspector's queue on schedule. Plan assigns a due date and reminds them the day before, on the day, and alerts managers once it's overdue.
Copied onto the inspection when it starts.
{% if schedule %}

Current {{ 'due date' if schedule.mode == 'plan' else 'run' }}: {{ schedule.next_run_at.strftime('%Y-%m-%d %H:%M') if schedule.next_run_at else '—' }} {% if schedule.last_completed_at %} · last completed {{ schedule.last_completed_at.strftime('%Y-%m-%d %H:%M') }} {% endif %} {% if schedule.end_date %}· ends {{ schedule.end_date.strftime('%Y-%m-%d') }}{% endif %}
Reminders for this occurrence are only reset if the due date actually moves, so renaming or re-noting a schedule will not re-send them.

{% endif %}
{% endblock %}