{% extends "layouts/base.html" %} {% load i18n %} {% load static %} {% block title %}Action #{{ action.id|slice:":8" }} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% trans "Back to Actions" %}

{{ action.title }}

{{ action.get_status_display }} {{ action.get_severity_display }} {% if action.escalation_level > 0 %} Level {{ action.escalation_level }} {% endif %}

ID: {{ action.id|slice:":8" }} | {{ action.get_source_type_display }}

Hospital: {{ action.hospital.name_en }} {% if action.department %} | Department: {{ action.department.name_en }} {% endif %}

SLA Progress
{{ sla_progress }}%
Due: {{ action.due_at|date:"M d, Y H:i" }} {% if action.is_overdue %} OVERDUE {% else %} {{ action.due_at|timeuntil }} left {% endif %}
{% trans "Action Details" %}
Category
{{ action.get_category_display }}
Priority
{{ action.get_priority_display }}

Description

{{ action.description|linebreaks }}

{% if action.action_plan %}
Action Plan
{{ action.action_plan|linebreaks }}
{% endif %} {% if action.outcome %}
Outcome
{{ action.outcome|linebreaks }}
{% endif %}
Created
{{ action.created_at|date:"M d, Y H:i" }}
Last Updated
{{ action.updated_at|date:"M d, Y H:i" }}
{% trans "Activity Log" %}
{% if logs %}
{% for log in logs %}
{{ log.get_log_type_display }} {% if log.created_by %} by {{ log.created_by.get_full_name }} {% endif %}
{{ log.created_at|date:"M d, Y H:i" }}

{{ log.message }}

{% if log.old_status and log.new_status %}
{{ log.old_status }} {{ log.new_status }}
{% endif %}
{% endfor %}
{% else %}

No activity log entries yet

{% endif %}
{% trans "Evidence Files" %}
{% if evidence_attachments %}
{% for evidence in evidence_attachments %}
{{ evidence.filename }} Evidence
Uploaded by {{ evidence.uploaded_by.get_full_name }} on {{ evidence.created_at|date:"M d, Y H:i" }} ({{ evidence.file_size|filesizeformat }}) {% if evidence.description %}
{{ evidence.description }} {% endif %}
{% endfor %}
{% else %}

No evidence files uploaded yet

{% if action.requires_approval and action.status != 'closed' %}

Evidence is required before requesting approval

{% endif %}
{% endif %}
{% trans "All Attachments" %}
{% if attachments %}
{% for attachment in attachments %}
{{ attachment.filename }} {% if attachment.is_evidence %} Evidence {% endif %}
Uploaded by {{ attachment.uploaded_by.get_full_name }} on {{ attachment.created_at|date:"M d, Y H:i" }} ({{ attachment.file_size|filesizeformat }}) {% if attachment.description %}
{{ attachment.description }} {% endif %}
{% endfor %}
{% else %}

No attachments

{% endif %}
{% if action.status == 'pending_approval' and can_approve %}
{% trans "Approval Required" %}

This action is awaiting your approval.

{% csrf_token %}
{% endif %} {% if can_edit %}
{% trans "Quick Actions" %}
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% trans "Add Note" %}
{% csrf_token %}
{% trans "Assignment Info" %}
Assigned To
{% if action.assigned_to %} {{ action.assigned_to.get_full_name }}
Assigned {{ action.assigned_at|date:"M d, Y H:i" }} {% else %} Unassigned {% endif %}
{% if action.approved_by %}
Approved By
{{ action.approved_by.get_full_name }}
{{ action.approved_at|date:"M d, Y H:i" }}
{% endif %} {% if action.closed_by %}
Closed By
{{ action.closed_by.get_full_name }}
{{ action.closed_at|date:"M d, Y H:i" }}
{% endif %}
{% trans "SLA Information" %}
Due Date:
{{ action.due_at|date:"M d, Y H:i" }}
{% if action.escalated_at %}
Escalated:
{{ action.escalated_at|date:"M d, Y H:i" }} Level {{ action.escalation_level }}
{% endif %} {% if action.reminder_sent_at %}
Reminder Sent:
{{ action.reminder_sent_at|date:"M d, Y H:i" }}
{% endif %}
{% endblock %}