This commit includes the initial files for the EP inspection tool prototype, including the inspection-app directory with the application code, the prompt.txt file with the inspection prompt, and SHARED_TASK_NOTES.md for documentation. These files establish the foundation for the inspection tool implementation.
99 lines
No EOL
4.6 KiB
HTML
99 lines
No EOL
4.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="max-w-4xl mx-auto bg-white p-6 rounded-lg shadow-md">
|
|
<div class="flex justify-between items-start mb-6">
|
|
<div>
|
|
<h1 class="text-2xl font-bold">Inspection Report</h1>
|
|
<p class="text-gray-600">Reference: {{ inspection.reference_number }} | Version: {{ inspection.version }}</p>
|
|
</div>
|
|
<div class="flex space-x-3">
|
|
<a href="{{ url_for('inspections.edit_inspection', id=inspection.id) }}" class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700">Edit Report</a>
|
|
<a href="{{ url_for('export.export_pdf', id=inspection.id) }}" class="bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700">Export as PDF</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
|
|
<div>
|
|
<h3 class="text-lg font-semibold mb-2">Installation Details</h3>
|
|
<div class="space-y-2">
|
|
<p><span class="font-medium">Installation Name:</span> {{ inspection.installation_name }}</p>
|
|
<p><span class="font-medium">Location:</span> {{ inspection.location }}</p>
|
|
<p><span class="font-medium">Date of Inspection:</span> {{ inspection.inspection_date.strftime('%Y-%m-%d') }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 class="text-lg font-semibold mb-2">Conclusion</h3>
|
|
<div class="space-y-2">
|
|
<p><span class="font-medium">Status:</span>
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
|
|
{% if inspection.conclusion_status == 'ok' %}bg-green-100 text-green-800
|
|
{% elif inspection.conclusion_status == 'minor' %}bg-yellow-100 text-yellow-800
|
|
{% elif inspection.conclusion_status == 'major' %}bg-red-100 text-red-800
|
|
{% else %}bg-gray-100 text-gray-800{% endif %}">
|
|
{{ inspection.conclusion_status|title if inspection.conclusion_status else 'N/A' }}
|
|
</span>
|
|
</p>
|
|
{% if inspection.conclusion_text %}
|
|
<p><span class="font-medium">Comments:</span></p>
|
|
<p class="ml-4">{{ inspection.conclusion_text }}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if inspection.observations %}
|
|
<div class="mb-6">
|
|
<h3 class="text-lg font-semibold mb-2">Observations</h3>
|
|
<div class="bg-gray-50 p-4 rounded-md">
|
|
{{ inspection.observations }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if inspection.inspectors %}
|
|
<div class="mb-6">
|
|
<h3 class="text-lg font-semibold mb-2">Inspectors</h3>
|
|
<div class="flex flex-wrap gap-2">
|
|
{% for inspector in inspection.inspectors %}
|
|
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm">
|
|
{{ inspector.user.full_name if inspector.user else inspector.free_text_name }}
|
|
</span>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if inspection.photos %}
|
|
<div class="mb-6">
|
|
<h3 class="text-lg font-semibold mb-2">Photos</h3>
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
{% for photo in inspection.photos %}
|
|
<div class="border border-gray-200 rounded-md overflow-hidden">
|
|
<img src="/uploads/{{ photo.filename }}" alt="{{ photo.caption }}" class="w-full h-48 object-cover">
|
|
<div class="p-3">
|
|
<p class="font-medium">{{ photo.caption }}</p>
|
|
<p class="text-sm text-gray-600">
|
|
Action required:
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full
|
|
{% if photo.action_required == 'none' %}bg-green-100 text-green-800
|
|
{% elif photo.action_required == 'urgent' %}bg-red-100 text-red-800
|
|
{% elif photo.action_required == 'before_next' %}bg-yellow-100 text-yellow-800
|
|
{% else %}bg-gray-100 text-gray-800{% endif %}">
|
|
{{ photo.action_required|title if photo.action_required else 'N/A' }}
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="text-sm text-gray-500 mt-6">
|
|
<p>Created: {{ inspection.created_at.strftime('%Y-%m-%d %H:%M') }}</p>
|
|
<p>Updated: {{ inspection.updated_at.strftime('%Y-%m-%d %H:%M') }}</p>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |