{% extends 'layouts/base.html' %} {% load static %} {% load i18n %} {% block title %}{% trans "Complaint SLA Management" %} | {{ hospital.name }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{% trans "Complaint SLA Management" %}

{% trans "Configure Service Level Agreements for complaint resolution" %}

{% trans "Add SLA Configuration" %}

{% trans "Current Hospital" %}

{{ hospital.name }}

{% trans "Total Configurations" %}

{{ total_configs }}

{% trans "Source-Based SLAs" %}

{{ source_based_configs.count }}

{% trans "Severity-Based SLAs" %}

{{ severity_based_configs.count }}

{% trans "SLA Configuration Priority" %}

  1. {% trans "Source-based configs" %} ({% trans "MOH, CCHI, Patient, etc." %}) {% trans "take precedence" %}
  2. {% trans "Severity/Priority-based configs" %} {% trans "apply when no source-based config exists" %}
  3. {% trans "System defaults" %} {% trans "are used as fallback" %}

{% trans "Source-Based SLA Configurations" %}

{% trans "SLAs based on complaint source (MOH, CCHI, Patient, etc.)" %}

{% if source_based_configs %}
{% for config in source_based_configs %} {% endfor %}
{% trans "Source" %} {% trans "SLA (Hours)" %} {% trans "1st Reminder" %} {% trans "2nd Reminder" %} {% trans "Escalation" %} {% trans "Actions" %}
{{ config.source.name_en }}
{{ config.source.name_ar }}
{{ config.sla_hours }}h {% if config.first_reminder_hours_after > 0 %} +{{ config.first_reminder_hours_after }}h {% else %} -{{ config.reminder_hours_before }}h {% endif %} {% if config.second_reminder_hours_after > 0 %} +{{ config.second_reminder_hours_after }}h {% elif config.second_reminder_enabled %} -{{ config.second_reminder_hours_before }}h {% else %} {% endif %} {% if config.escalation_hours_after > 0 %} +{{ config.escalation_hours_after }}h {% else %} {% trans "On overdue" %} {% endif %}
{% csrf_token %}
{% else %}

{% trans "No source-based configurations" %}

{% trans "Get started by creating a new SLA configuration." %}

{% trans "Add Source-Based SLA" %}
{% endif %}

{% trans "Severity/Priority-Based SLA Configurations" %}

{% trans "SLAs based on complaint severity and priority levels" %}

{% if severity_based_configs %}
{% for config in severity_based_configs %} {% endfor %}
{% trans "Severity" %} {% trans "Priority" %} {% trans "SLA (Hours)" %} {% trans "1st Reminder" %} {% trans "2nd Reminder" %} {% trans "Actions" %}
{% include 'complaints/partials/severity_badge.html' with severity=config.severity %} {% include 'complaints/partials/priority_badge.html' with priority=config.priority %} {{ config.sla_hours }}h {% if config.first_reminder_hours_after > 0 %} +{{ config.first_reminder_hours_after }}h {% else %} -{{ config.reminder_hours_before }}h {% endif %} {% if config.second_reminder_hours_after > 0 %} +{{ config.second_reminder_hours_after }}h {% elif config.second_reminder_enabled %} -{{ config.second_reminder_hours_before }}h {% else %} {% endif %}
{% csrf_token %}
{% else %}

{% trans "No severity-based configurations" %}

{% trans "Get started by creating a new SLA configuration." %}

{% trans "Add Severity-Based SLA" %}
{% endif %}
{% endblock %}