{% extends "layouts/base.html" %} {% load i18n %} {% load static %} {% block title %}{% trans "Action" %} #{{ action.id|slice:":8" }} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% trans "Actions" %} {{ action.id|slice:":8" }} {{ action.get_status_display }} {% if action.is_overdue %} {% trans "Overdue" %} {% endif %} {% if action.escalation_level > 0 %} Level {{ action.escalation_level }} {% endif %}

{{ action.title }}

{% if action.department %} {{ action.department.get_localized_name }} {% endif %} {{ action.created_at|date:"d M Y" }} {% trans "Due" %} {{ action.due_at|date:"d M Y, h:i A" }} {% if action.assigned_to %} {{ action.assigned_to.get_full_name }} {% endif %}
{{ sla_progress }}%

{% trans "Category" %}

{{ action.get_category_display }}

{% trans "Priority" %}

{{ action.get_priority_display }}

{% trans "Severity" %}

{{ action.get_severity_display }}

{% trans "Source" %}

{{ action.get_source_type_display }}

{% trans "Created" %}

{{ action.created_at|date:"d M Y, h:i A" }}

{% trans "Requires Approval" %}

{% if action.requires_approval %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}

{% if action.description %}

{% trans "Description" %}

{{ action.description|linebreaksbr }}

{% endif %} {% if action.action_plan %}

{% trans "Action Plan" %}

{{ action.action_plan|linebreaksbr }}

{% endif %} {% if action.outcome %}

{% trans "Outcome" %}

{{ action.outcome|linebreaksbr }}

{% endif %} {% if action.content_type.model == 'complaint' and action.source_object %} {% endif %}
{% if action.status == 'pending_approval' and can_approve %}

{% trans "Approval Required" %}

{% trans "This action is awaiting your approval." %}

{% csrf_token %}
{% endif %} {% if can_edit %}

{% trans "Quick Actions" %}

{% csrf_token %}
{% csrf_token %}
{% endif %}

{% trans "Assignment Info" %}

{% trans "Assigned To" %}

{% if action.assigned_to %}
{{ action.assigned_to.first_name|first }}{{ action.assigned_to.last_name|first }}

{{ action.assigned_to.get_full_name }}

{% trans "Assigned" %} {{ action.assigned_at|date:"M d, Y" }}

{% else %}

{% trans "Unassigned" %}

{% endif %}
{% if action.approved_by %}

{% trans "Approved By" %}

{{ action.approved_by.get_full_name }}

{{ action.approved_at|date:"M d, Y H:i" }}

{% endif %} {% if action.closed_by %}

{% trans "Closed By" %}

{{ action.closed_by.get_full_name }}

{{ action.closed_at|date:"M d, Y H:i" }}

{% endif %}
{% if user.is_px_admin or user.is_hospital_admin or user.is_department_manager %}

{% trans "QI Project" %}

{% if action.qi_projects.exists %} {% else %}

{% trans "Convert this action to a QI project for long-term tracking." %}

{% endif %} {% if action.qi_projects.exists %}{% trans "Already Converted" %}{% else %}{% trans "Convert to Project" %}{% endif %}
{% endif %}

{% trans "Add Note" %}

{% csrf_token %}
{% endblock %}