HH/templates/feedback/action_plan_list.html
2026-04-08 17:13:35 +03:00

96 lines
4.3 KiB
HTML

{% extends "layouts/base.html" %}
{% load i18n %}
{% block title %}{% trans "Comment Action Plans" %} - PX360{% endblock %}
{% block content %}
<div class="container-fluid py-4">
<div class="d-flex justify-content-between align-items-center mb-4">
<div>
<h2>{% trans "Steps 3-5 — Comment Action Plans" %}</h2>
<p class="text-muted">{% trans "Track action plans derived from patient comments" %}</p>
</div>
<a href="{% url 'feedback:export_action_plans' %}" class="btn btn-primary">
<i class="bi bi-download me-1"></i> {% trans "Export Action Plans" %}
</a>
</div>
<div class="card mb-4">
<div class="card-body">
<form method="get" class="row g-3 align-items-end">
<div class="col-md-3">
<label class="form-label">{% trans "Status" %}</label>
<select name="status" class="form-select">
<option value="">{% trans "All" %}</option>
<option value="completed" {% if selected_status == 'completed' %}selected{% endif %}>{% trans "Completed" %}</option>
<option value="on_process" {% if selected_status == 'on_process' %}selected{% endif %}>{% trans "On Process" %}</option>
<option value="pending" {% if selected_status == 'pending' %}selected{% endif %}>{% trans "Pending" %}</option>
</select>
</div>
<div class="col-md-2">
<label class="form-label">{% trans "Year" %}</label>
<select name="year" class="form-select">
<option value="">{% trans "All" %}</option>
{% for y in years_range %}
<option value="{{ y }}" {% if selected_year == y %}selected{% endif %}>{{ y }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-outline-primary w-100">
<i class="bi bi-funnel me-1"></i> {% trans "Filter" %}
</button>
</div>
</form>
</div>
</div>
{% regroup action_plans by department_label as dept_groups %}
{% for dept, plans in dept_groups %}
<div class="card mb-3">
<div class="card-header bg-light">
<h5 class="mb-0">{{ dept|default:_("Unassigned") }}</h5>
</div>
<div class="card-body p-0">
<table class="table table-hover mb-0">
<thead>
<tr>
<th>{% trans "#" %}</th>
<th>{% trans "Recommendation" %}</th>
<th>{% trans "Frequency" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Timeframe" %}</th>
<th>{% trans "Evidence" %}</th>
</tr>
</thead>
<tbody>
{% for plan in plans %}
<tr>
<td>{{ plan.problem_number|default:"—" }}</td>
<td>{{ plan.recommendation|truncatewords:20 }}</td>
<td><span class="badge bg-info">{{ plan.frequency }}</span></td>
<td>
{% if plan.status == 'completed' %}
<span class="badge bg-success">{% trans "Completed" %}</span>
{% elif plan.status == 'on_process' %}
<span class="badge bg-warning">{% trans "On Process" %}</span>
{% else %}
<span class="badge bg-secondary">{% trans "Pending" %}</span>
{% endif %}
</td>
<td>{{ plan.timeframe|default:"—" }}</td>
<td>{{ plan.evidences|truncatewords:10|default:"—" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% empty %}
<div class="text-center text-muted py-5">
<p>{% trans "No action plans found." %}</p>
</div>
{% endfor %}
</div>
{% endblock %}