{% extends "base.html" %} {% block title %}Inspection #{{ inspection.id }}{% endblock %} {% block content %}

Inspection Report

{{ inspection.template.name }} · {{ inspection.inspection_date.strftime('%B %d, %Y %H:%M') }}

{% if current_user.role in ['admin','supervisor'] %}
{% endif %} Back
{# Summary cards #}

Overall Score

{% if inspection.overall_score %}

{{ inspection.overall_score }}%

{% else %}

{% endif %}

Status

{{ inspection.status|replace('_',' ')|title }}

Facility / Area

{{ inspection.facility.name }}

{{ inspection.area.name if inspection.area else '—' }}

Inspector

{{ inspection.inspector.username }}

{% if inspection.completed_at %} Completed {{ inspection.completed_at.strftime('%Y-%m-%d %H:%M') }} {% endif %}
{% if inspection.notes %}
Notes: {{ inspection.notes }}
{% endif %} {# Checklist results by category #} {% for category, results in categories.items() %}
{{ category }}
{% for r in results %} {% endfor %}
ItemTypeResultCommentsPhoto
{{ r.checklist_item.item_description }} {{ r.checklist_item.scoring_type|replace('_',' ') }} {% if r.checklist_item.scoring_type == 'pass_fail' %} {% if r.passed is none %} {% elif r.passed %}Pass {% else %}Fail{% endif %} {% else %} {% if r.score is not none %}{{ r.score }} {% else %}{% endif %} {% endif %} {{ r.comments or '—' }} {% if r.photo_path %} {% else %}—{% endif %}
{% endfor %} {# Issues #} {% if issues %}
Issues Logged ({{ issues|length }})
{% for issue in issues %} {% endfor %}
SeverityAreaDescriptionStatus
{{ issue.severity|title }} {{ issue.area.name }} {{ issue.description[:80] }}{% if issue.description|length > 80 %}…{% endif %} {{ issue.status|replace('_',' ')|title }} View
{% endif %} {% endblock %}