{% extends "layouts/public_base.html" %} {% load i18n static %} {% block title %}{% trans "Track Your Complaint" %}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% get_available_languages as LANGUAGES %} {% get_current_language as LANGUAGE_CODE %} {% for lang_code, lang_name in LANGUAGES %} {% if lang_code == 'en' %}πŸ‡¬πŸ‡§{% elif lang_code == 'ar' %}πŸ‡ΈπŸ‡¦{% endif %} {{ lang_name }} {% endfor %}
Al Hammadi Hospital

{% trans "Track Your Complaint" %}

{% trans "Enter your reference number below to see real-time updates on your request." %}

{% csrf_token %}

{% trans "Found in your confirmation email" %}

{% if error_message %}

{% trans "Reference Not Found" %}

{{ error_message }}

{% endif %} {% if complaint %}
{% trans "Case Reference" %}

{{ complaint.reference_number }}

{{ public_status.label }}
{% if complaint.escalated_at %}
{% trans "Escalated" %}
{% endif %}
{{ complaint.created_at|date:"M d, Y" }} {{ complaint.department.name|default:"General" }} {% if complaint.due_at %} {% if complaint.is_overdue %}{% trans "Overdue" %}{% else %}{{ complaint.due_at|date:"M d, H:i" }}{% endif %} {% endif %}

{% trans "Resolution Journey" %}

{% if public_updates %}
{% for update in public_updates %}

{% if update.update_type == 'resolution' %}{% trans "Final Resolution" %} {% else %}{% trans "Department Response" %}{% endif %}

{% if update.department_name %}

{{ update.department_name }}

{% endif %} {% if update.message %}
{{ update.message|linebreaks }}
{% endif %}
{% endfor %}
{% else %}

{% trans "Your complaint is being reviewed. Updates will appear here." %}

{% endif %}
{% if complaint.status == 'resolved' or complaint.status == 'closed' %} {% if complaint.satisfaction_locked_by_patient or not tracking_expired %}

{% trans "How satisfied are you?" %}

{% trans "Your feedback helps us improve. Once submitted, your answer becomes final." %}

{% if satisfaction_just_submitted or info_message %}

{% trans "Thank you for your feedback!" %}

{% if complaint.satisfaction_set_at %}

{% trans "Submitted on" %} {{ complaint.satisfaction_set_at|date:"Y-m-d H:i" }}

{% endif %}
{% endif %} {% if complaint.satisfaction_locked_by_patient %}
{% if complaint.satisfaction == 'satisfied' %}😊 {% elif complaint.satisfaction == 'neutral' %}😐 {% elif complaint.satisfaction == 'dissatisfied' %}😞 {% else %}β€”{% endif %}

{% trans "Your response" %}

{{ complaint.get_satisfaction_display }}

{% trans "Locked" %}
{% else %}
{% csrf_token %}

{% trans "Select your satisfaction level" %}

{% endif %}
{% endif %} {% endif %}
{% endif %}
{% endblock %}