96 lines
4.3 KiB
HTML
96 lines
4.3 KiB
HTML
{% extends "layouts/base.html" %}
|
|
|
|
{% block title %}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>Steps 3-5 — Comment Action Plans</h2>
|
|
<p class="text-muted">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> 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">Status</label>
|
|
<select name="status" class="form-select">
|
|
<option value="">All</option>
|
|
<option value="completed" {% if selected_status == 'completed' %}selected{% endif %}>Completed</option>
|
|
<option value="on_process" {% if selected_status == 'on_process' %}selected{% endif %}>On Process</option>
|
|
<option value="pending" {% if selected_status == 'pending' %}selected{% endif %}>Pending</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<label class="form-label">Year</label>
|
|
<select name="year" class="form-select">
|
|
<option value="">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> 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">
|
|
<strong>{{ dept }}</strong>
|
|
<span class="badge bg-secondary ms-2">{{ plans|length }} plans</span>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<table class="table table-hover table-striped mb-0">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Comment</th>
|
|
<th>Freq</th>
|
|
<th>Recommendation</th>
|
|
<th>Responsible Dept</th>
|
|
<th>Timeframe</th>
|
|
<th>Status</th>
|
|
<th>Evidences</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for plan in plans %}
|
|
<tr>
|
|
<td>{{ plan.problem_number }}</td>
|
|
<td class="text-truncate" style="max-width:200px" title="{{ plan.comment_text }}">{{ plan.comment_text }}</td>
|
|
<td>{{ plan.frequency }}</td>
|
|
<td class="text-truncate" style="max-width:250px" title="{{ plan.recommendation }}">{{ plan.recommendation }}</td>
|
|
<td>{{ plan.responsible_department }}</td>
|
|
<td>{{ plan.timeframe }}</td>
|
|
<td>
|
|
{% if plan.status == 'completed' %}<span class="badge bg-success">Completed</span>
|
|
{% elif plan.status == 'on_process' %}<span class="badge bg-warning text-dark">On Process</span>
|
|
{% else %}<span class="badge bg-secondary">Pending</span>{% endif %}
|
|
</td>
|
|
<td class="text-truncate" style="max-width:150px">{{ plan.evidences }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% empty %}
|
|
<div class="card">
|
|
<div class="card-body text-center text-muted py-4">No action plans found.</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|