{% extends "layouts/base.html" %} {% load i18n static %} {% block title %}{% trans "Appreciation Detail" %} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% trans "Appreciations" %} {% trans "Detail" %} {{ appreciation.get_status_display }}

{% trans "Appreciation Detail" %}

{{ appreciation.created_at|date:"Y-m-d H:i" }} — {{ appreciation.hospital.get_localized_name }} {% comment %} {% if appreciation.activated_at %} {% trans "Letter" %} {% trans "Certificate" %} {% endif %} {% endcomment %}
{% include "core/workflow_stepper.html" %} {% if can_activate %}

{% trans "Activate this appreciation" %}

{% trans "Activate to start the workflow and trigger AI analysis." %}

{% csrf_token %}
{% elif can_send %}

{% trans "Ready to send" %}

{{ appreciation.department.get_localized_name }}{% if has_recipient %} — {{ appreciation.get_recipient_name }}{% else %} — {% trans "No staff selected" %}{% endif %}

{% if has_recipient %} {% else %} {% endif %}
{% comment %} {% elif appreciation.sent_at and not appreciation.acknowledged_at %}

{% trans "Awaiting acknowledgment" %}

{% trans "Sent on" %} {{ appreciation.sent_at|date:"M d, H:i" }}

{% if appreciation.dept_response_reminder_sent_at %} {% trans "1st:" %} {{ appreciation.dept_response_reminder_sent_at|date:"M d, H:i" }} {% endif %} {% if appreciation.dept_response_second_reminder_sent_at %} {% trans "2nd:" %} {{ appreciation.dept_response_second_reminder_sent_at|date:"M d, H:i" }} {% endif %} {% if not appreciation.dept_response_reminder_sent_at %} {% trans "No reminders sent yet" %} {% endif %}
{% if not appreciation.dept_response_reminder_sent_at %}
{% csrf_token %}
{% elif not appreciation.dept_response_second_reminder_sent_at %}
{% csrf_token %}
{% endif %}
{% endcomment %} {% elif appreciation.sent_at %}

{% trans "Appreciation sent" %}

{% trans "Sent on" %} {{ appreciation.sent_at|date:"Y-m-d H:i" }}

{% endif %}

{% trans "Appreciation Message" %}

{{ appreciation.message_en|linebreaks }}

{% if appreciation.message_ar %}

{% trans "Arabic" %}

{{ appreciation.message_ar|linebreaks }}

{% endif %}
{% if metadata %}

{% trans "Submitted By" %}

{% if metadata.submitted_by_name %}

{% trans "Name" %}

{{ metadata.submitted_by_name }}

{% endif %} {% if metadata.submitted_by_phone %}

{% trans "Phone" %}

{{ metadata.submitted_by_phone }}

{% endif %} {% if metadata.submitted_by_email %}

{% trans "Email" %}

{{ metadata.submitted_by_email }}

{% endif %} {% if metadata.staff_name_mentioned %}

{% trans "Staff Mentioned" %}

{{ metadata.staff_name_mentioned }}

{% endif %}
{% endif %} {% if appreciation.recipient %}

{% trans "Appreciation For" %}

{{ appreciation.get_recipient_name }}

{% if appreciation.department %}

{{ appreciation.department.get_localized_name }}

{% endif %}
{% endif %} {% if appreciation.status == 'sent' or appreciation.status == 'acknowledged' %}

{% trans "Sent" %}

{% trans "Sent At" %}

{{ appreciation.sent_at|date:"Y-m-d H:i" }}

{% if appreciation.custom_message %}

{% trans "Custom Message" %}

{{ appreciation.custom_message }}

{% endif %} {% if appreciation.acknowledged_at %}

{% trans "Acknowledged on" %} {{ appreciation.acknowledged_at|date:"Y-m-d H:i" }}

{% endif %}
{% endif %}

{% trans "Appreciation Letter" %}

{% trans "Generate a formal letter of appreciation as a PDF." %}

{% trans "Download Letter" %}
{% if appreciation.ai_analysis %} {% endif %}

{% trans "Details" %}

{% trans "Status" %}

{{ appreciation.get_status_display }}

{% if appreciation.category %}

{% trans "Category" %}

{{ appreciation.category.get_localized_name }}

{% endif %} {% if appreciation.activated_at %}

{% trans "Activated" %}

{{ appreciation.activated_at|date:"Y-m-d H:i" }}

{% endif %} {% if appreciation.department %}

{% trans "Department" %}

{{ appreciation.department.get_localized_name }}

{% endif %} {% if appreciation.recipient %}

{% trans "Recipient" %}

{{ appreciation.get_recipient_name }}

{% endif %} {% if appreciation.sent_at %}

{% trans "Sent At" %}

{{ appreciation.sent_at|date:"Y-m-d H:i" }}

{% endif %} {% if appreciation.acknowledged_at %}

{% trans "Acknowledged" %} {{ appreciation.acknowledged_at|date:"Y-m-d H:i" }}

{% endif %}
{% endblock %}