{% extends "layouts/base.html" %} {% load i18n %} {% load static %} {% block title %}{{ observation.tracking_code }} - {% trans "Observation Detail" %} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{{ observation.tracking_code }} {{ observation.get_status_display }} {{ observation.get_severity_display }} {% if observation.is_anonymous %} {% trans "Anonymous" %} {% endif %}

{% if observation.title %} {{ observation.title }} {% else %} {{ observation.description|truncatewords:10 }} {% endif %}

{% if can_convert and not observation.action_id %} {% trans "Convert to Action" %} {% endif %} {% trans "Back to List" %}
{% trans "Description" %}

{{ observation.description }}

{% trans "Details" %}
{% trans "Category" %}
{{ observation.category.name_en|default:"Not specified" }}
{% trans "Location" %}
{{ observation.location_text|default:"Not specified" }}
{% trans "Incident Date/Time" %}
{{ observation.incident_datetime|date:"M d, Y H:i" }}
{% trans "Submitted" %}
{{ observation.created_at|date:"M d, Y H:i" }}
{% trans "Last Updated" %}
{{ observation.updated_at|date:"M d, Y H:i" }}
{% if observation.triaged_at %}
{% trans "Triaged" %}
{{ observation.triaged_at|date:"M d, Y H:i" }} {% if observation.triaged_by %}by {{ observation.triaged_by.get_full_name }}{% endif %}
{% endif %}
{% trans "Reporter Information" %}
{% if observation.is_anonymous %}

{% trans "This observation was submitted anonymously" %}

{% else %}
{% if observation.reporter_staff_id %}
{% trans "Staff ID" %}
{{ observation.reporter_staff_id }}
{% endif %} {% if observation.reporter_name %}
{% trans "Name" %}
{{ observation.reporter_name }}
{% endif %}
{% if observation.reporter_phone %}
{% trans "Phone" %}
{{ observation.reporter_phone }}
{% endif %} {% if observation.reporter_email %}
{% trans "Email" %}
{{ observation.reporter_email }}
{% endif %}
{% endif %}
{% if attachments %}
{% trans "Attachments" %} ({{ attachments.count }})
{% for attachment in attachments %}
{{ attachment.filename }}
{{ attachment.file_type }} - {{ attachment.file_size|filesizeformat }}
{% endfor %}
{% endif %}
{% trans "Timeline" %}
{% if timeline %}
{% for item in timeline %}
{% if item.type == 'status_change' %} {% trans "Status Changed" %} {% if item.item.from_status %} {{ item.item.from_status }} → {% endif %} {{ item.item.to_status }} {% if item.item.changed_by %} by {{ item.item.changed_by.get_full_name }} {% endif %} {% if item.item.comment %}

{{ item.item.comment }}

{% endif %} {% elif item.type == 'note' %} {% trans "Note Added" %} {% if item.item.created_by %} by {{ item.item.created_by.get_full_name }} {% endif %}

{{ item.item.note }}

{% endif %}
{{ item.created_at|date:"M d, H:i" }}
{% endfor %}
{% else %}

{% trans "No timeline entries yet" %}

{% endif %}
{% trans "Assignment" %}
{% trans "Department" %}
{{ observation.assigned_department.name|default:"Not assigned" }}
{% trans "Assigned To" %}
{{ observation.assigned_to.get_full_name|default:"Not assigned" }}
{% if px_action %}
{% trans "Linked PX Action" %}

{{ px_action.title|truncatewords:10 }}

{% trans "View Action" %}
{% endif %} {% if can_triage %}
{% trans "Triage" %}
{% csrf_token %}
{{ triage_form.assigned_department }}
{{ triage_form.assigned_to }}
{{ triage_form.status }}
{{ triage_form.note }}
{% endif %}
{% trans "Add Note" %}
{% csrf_token %}
{{ note_form.note }}
{{ note_form.is_internal }}
{% trans "Quick Status Change" %}
{% csrf_token %}
{{ status_form.status }}
{{ status_form.comment }}
{% endblock %}