{% load i18n %}

{% trans "Involved Departments" %}

{% if can_manage_actions and complaint.is_active_status %} {% endif %}
{% if can_manage_actions and complaint.is_active_status and ai_department_suggested %}
{{ complaint.department.name }} {% trans "AI" %}
{% csrf_token %}
{% endif %} {% if complaint.involved_departments.exists %}
{% if can_manage_actions and complaint.is_active_status %} {% endif %} {% for dept in complaint.involved_departments.all %} {% if can_manage_actions and complaint.is_active_status %} {% endif %} {% endfor %}
{% trans "Department" %} {% trans "Role" %} {% trans "Status" %}
{% if dept.is_primary %} {% endif %} {{ dept.department.name }}
{% if dept.assigned_to %}

{{ dept.assigned_to.get_full_name }}

{% endif %} {% if dept.response_notes %}

{{ dept.response_notes|truncatechars:60 }}

{% endif %}
{{ dept.get_role_display }} {% if not dept.response_submitted %} {% trans "No response" %} {% elif dept.manager_review_status == 'rejected' %} {% trans "Rejected" %} {% elif dept.manager_review_status == 'pending' %} {% trans "Pending Review" %} {% elif dept.acceptance_status == 'acceptable' %} {% trans "Accepted" %} {% elif dept.acceptance_status == 'not_acceptable' %} {% trans "Rejected" %} {% elif dept.acceptance_status == 'pending' and dept.manager_review_status == 'approved' %} {% trans "Approved" %} {% else %} {% trans "Pending" %} {% endif %}
{% if not dept.response_submitted %} {% endif %}
{% csrf_token %}
{% else %}

{% trans "No departments involved yet" %}

{% if can_manage_actions and complaint.is_active_status %} {% endif %}
{% endif %}