A class list written outside the quotes left the badge colour as a bare attribute, so the status rendered white-on-white. Also repair a stray quote on the CoA release message, where class=text-muted mb-0 left the class unapplied.
58 lines
2.7 KiB
HTML
58 lines
2.7 KiB
HTML
{% extends 'ops/base_ops.html' %}
|
|
{% block title %}CAPA Records - IXG Operations{% endblock %}
|
|
{% block content %}
|
|
|
|
<div class="page-header d-flex justify-content-between align-items-center">
|
|
<h2>CAPA Records</h2>
|
|
<span class="text-secondary">{{ page_obj.paginator.count }} total</span>
|
|
</div>
|
|
|
|
<div class="filter-bar">
|
|
<form method="get" class="row g-2 align-items-end">
|
|
<div class="col-auto">
|
|
<select name="status" class="form-select form-select-sm">
|
|
<option value="">All Statuses</option>
|
|
{% for val, label in status_choices %}
|
|
<option value="{{ val }}" {% if current_status == val %}selected{% endif %}>{{ label }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="col-auto">
|
|
<button type="submit" class="btn btn-sm btn-primary">Filter</button>
|
|
<a href="{% url 'ops:capa_list' %}" class="btn btn-sm btn-outline-secondary">Clear</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="stat-card p-0">
|
|
<table class="table table-hover mb-0">
|
|
<thead>
|
|
<tr><th>Batch</th><th>Issue</th><th>Status</th><th>Assigned To</th><th>Due Date</th><th>Created</th><th></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for r in records %}
|
|
<tr>
|
|
<td><strong>{{ r.batch.batch_reference }}</strong></td>
|
|
<td>{{ r.issue_description|truncatewords:15 }}</td>
|
|
<td><span class="badge {% if r.status == open %}bg-danger{% elif r.status == in_progress %}bg-warning text-dark{% else %}bg-success{% endif %} badge-status">{{ r.get_status_display }}</span></td>
|
|
<td>{{ r.assigned_to|default:'-' }}</td>
|
|
<td>{{ r.due_date|date:'d/m/Y'|default:'-' }}</td>
|
|
<td>{{ r.created_at|date:'d/m/Y' }}</td>
|
|
<td><a href="{% url 'ops:capa_detail' r.pk %}" class="btn btn-sm btn-outline-primary">View</a></td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr><td colspan="7" class="text-muted text-center py-3">No CAPA records</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% if page_obj.paginator.num_pages > 1 %}
|
|
<nav class="mt-3"><ul class="pagination pagination-sm justify-content-center">
|
|
{% if page_obj.has_previous %}<li class="page-item"><a class="page-link" href="?page=1">«</a></li><li class="page-item"><a class="page-link" href="?page="{{ page_obj.previous_page_number }}>{{ page_obj.previous_page_number }}</a></li>{% endif %}
|
|
<li class="page-item active"><span class="page-link">{{ page_obj.number }}</span></li>
|
|
{% if page_obj.has_next %}<li class="page-item"><a class="page-link" href="?page="{{ page_obj.next_page_number }}>{{ page_obj.next_page_number }}</a></li><li class="page-item"><a class="page-link" href="?page="{{ page_obj.paginator.num_pages }}>»</a></li>{% endif %}
|
|
</ul></nav>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|