{% load i18n %} {% if workflow_log %}

{% trans "Workflow Timeline" %}

{% for event in workflow_log %} {% if event.type == 'staff_responded' or event.type == 'reply_submitted' or event.type == 'direct_reply' %}
{% if event.type == 'staff_responded' %} {% trans "Investigation Response" %} {% elif event.type == 'reply_submitted' %} {% trans "Department Response" %} {% elif event.type == 'direct_reply' %} {% trans "Department Response" %} {% endif %}
{% if event.timestamp %} {{ event.timestamp|date:"d M, h:i A" }} {% endif %}
{% if event.type == 'staff_responded' %}

{% trans "Investigation by" %} {{ event.investigator|default:"Department Champion" }} {% trans "for" %} {{ event.actor }}

{% trans "Questions & Answers" %}

{% elif event.type == 'reply_submitted' %}

{% trans "Submitted by" %} {{ event.actor }}

{% elif event.type == 'direct_reply' %}

{% trans "Submitted by" %} {{ event.actor }}

{% endif %} {% if event.type == 'staff_responded' and event.qa_pairs %} {% for qa in event.qa_pairs %} {% endfor %}
{% trans "Question" %} {% trans "Answer" %}
{{ forloop.counter }}. {{ qa.question }} {% if qa.question_type == 'yes_no' %} {% if qa.answer == 'yes' %} {% trans "Yes" %} {% elif qa.answer == 'no' %} {% trans "No" %} {% else %} {% endif %} {% else %} {{ qa.answer|truncatewords:25|default:"—" }} {% endif %}
{% endif %} {% if event.type == 'reply_submitted' %} {% if event.final_reply %}

{% trans "Response" %}

{{ event.final_reply|truncatewords:50 }}

{% endif %} {% if event.negligence or event.policy_issue or event.improvement_project %}

{% trans "Assessment" %}

{% trans "Question" %} {% trans "Answer" %}
{% trans "Is there any negligence resulting from carelessness?" %} {% if event.negligence == 'yes' %} {% trans "Yes" %} {% elif event.negligence == 'no' %} {% trans "No" %} {% else %}{% endif %}
{% trans "Is it resulting from policies or regulations?" %} {% if event.policy_issue == 'yes' %} {% trans "Yes" %} {% elif event.policy_issue == 'no' %} {% trans "No" %} {% else %}{% endif %}
{% trans "Does this complaint require an improvement project?" %} {% if event.improvement_project == 'yes' %} {% trans "Yes" %} {% elif event.improvement_project == 'no' %} {% trans "No" %} {% else %}{% endif %}
{% if event.improvement_project == 'yes' and event.improvement_note %}
{% trans "Improvement Project:" %} {{ event.improvement_note }}
{% endif %}
{% endif %} {% endif %} {% if event.type == 'direct_reply' and event.reply %}

{% trans "Response" %}

{{ event.reply|truncatewords:50 }}

{% endif %}
{% endif %} {% endfor %}
{% endif %}