{% extends 'layouts/base.html' %} {% load i18n hospital_filters %} {% block title %}{% trans "QI Projects" %} - PX360{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{% trans "Quality Improvement Projects" %}

{% trans "Track and manage quality improvement initiatives" %}

{% if user.is_px_admin or user.is_hospital_admin or user.is_department_manager %} {% trans "Templates" %} {% trans "Create Project" %} {% endif %}

{% trans "Total Projects" %}

{{ stats.total }}

{% trans "Active" %}

{{ stats.active }}

{% trans "Completed" %}

{{ stats.completed }}

{% trans "Pending" %}

{{ stats.pending }}

{% trans "Filters" %}

{% trans "All Projects" %} {% trans "Active" %} {% trans "Pending" %} {% trans "Completed" %} {% if user.is_px_admin %}
{% endif %}

{% trans "Showing:" %} {{ page_obj.start_index|default:0 }}-{{ page_obj.end_index|default:0 }} {% trans "of" %} {{ page_obj.paginator.count|default:0 }}

{% trans "Projects" %}

{% for project in projects %} {% empty %} {% endfor %}
{% trans "Project" %} {% trans "Hospital" %} {% trans "Project Lead" %} {% trans "Status" %} {% trans "Tasks" %} {% trans "Timeline" %} {% trans "Actions" %}
{{ project.name }} {% if project.description %}

{{ project.description|truncatechars:60 }}

{% endif %}
{{ project.hospital.name }} {% if project.project_lead %} {{ project.project_lead.get_full_name }} {% else %} - {% endif %} {% if project.status == 'active' %} {{ project.get_status_display }} {% elif project.status == 'pending' %} {{ project.get_status_display }} {% elif project.status == 'completed' %} {{ project.get_status_display }} {% elif project.status == 'cancelled' %} {{ project.get_status_display }} {% else %} {{ project.get_status_display }} {% endif %} {% with total=project.tasks.count completed=project.tasks.completed.count %}
{% if total > 0 %}
{% endif %}
{{ completed }}/{{ total }} {% if total > 0 %} ({{ completed|div:total|mul:100|floatformat:0 }}%) {% endif %}
{% endwith %}
{% if project.start_date or project.target_completion_date %} {% if project.start_date %}{{ project.start_date|date:"M d" }}{% else %}-{% endif %} → {% if project.target_completion_date %}{{ project.target_completion_date|date:"M d, Y" }}{% else %}-{% endif %} {% else %} - {% endif %}
{% if user.is_px_admin or user.is_hospital_admin or user.is_department_manager %} {% endif %}

{% trans "No projects found" %}

{% if user.is_px_admin or user.is_hospital_admin or user.is_department_manager %} {% trans "Create First Project" %} {% endif %}
{% if page_obj.has_other_pages %}
{% trans "Showing" %} {{ page_obj.start_index }}-{{ page_obj.end_index }} {% trans "of" %} {{ page_obj.paginator.count }} {% trans "entries" %}
{% if page_obj.has_previous %} {% else %} {% endif %} {% for num in page_obj.paginator.page_range %} {% if page_obj.number == num %} {{ num }} {% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %} {{ num }} {% elif num == 1 or num == page_obj.paginator.num_pages %} {{ num }} {% elif num == page_obj.number|add:'-3' or num == page_obj.number|add:'3' %} ... {% endif %} {% endfor %} {% if page_obj.has_next %} {% else %} {% endif %}
{% endif %}
{% endblock %}