Aug 7 - Update issue page filter bar
This commit is contained in:
@@ -32,9 +32,18 @@
|
||||
</div>
|
||||
|
||||
{# ── Filters ──────────────────────────────────────────────────────────── #}
|
||||
{# Same layout as the modern inspections list: fields fill two rows on the left,
|
||||
actions in a block on the right spanning both — Filter full-height, Clear
|
||||
above Export PDF. Contract and Facility stay adjacent because they cascade
|
||||
(rule 61). Below md the action block wraps underneath, full width. #}
|
||||
<div class="jqc-filter-bar">
|
||||
<form method="get" class="row g-2 align-items-end">
|
||||
<div class="col-6 col-md-1">
|
||||
<form method="get">
|
||||
<div class="d-flex flex-wrap gap-3 align-items-stretch">
|
||||
|
||||
{# ── Fields ──────────────────────────────────────────────────────── #}
|
||||
<div class="flex-grow-1" style="min-width:min(100%, 620px);">
|
||||
<div class="row g-2 align-items-end">
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label small mb-1">Issue #</label>
|
||||
<input type="number" name="issue_id" class="form-control form-control-sm"
|
||||
min="1" placeholder="ID" value="{{ issue_id_filter }}">
|
||||
@@ -57,6 +66,27 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-3">
|
||||
<label class="form-label small mb-1">Contract</label>
|
||||
<select name="contract_id" id="filter_contract_id" class="form-select form-select-sm">
|
||||
<option value="">All Contracts</option>
|
||||
{% for p in projects %}
|
||||
<option value="{{ p.id }}" {{ 'selected' if contract_filter == p.id|string }}>{{ p.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-3">
|
||||
<label class="form-label small mb-1">Facility</label>
|
||||
<select name="facility_id" id="filter_facility_id" class="form-select form-select-sm">
|
||||
<option value="">All Facilities</option>
|
||||
{% for f in facilities %}
|
||||
<option value="{{ f.id }}" {{ 'selected' if facility_filter == f.id|string }}>{{ f.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-2 align-items-end mt-2">
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label small mb-1">SLA</label>
|
||||
<select name="sla" class="form-select form-select-sm">
|
||||
@@ -66,35 +96,17 @@
|
||||
<option value="ok" {{ 'selected' if sla_filter == 'ok' }}>OK</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-2">
|
||||
<label class="form-label small mb-1">Contract</label>
|
||||
<select name="contract_id" id="filter_contract_id" class="form-select form-select-sm">
|
||||
<option value="">All Contracts</option>
|
||||
{% for p in projects %}
|
||||
<option value="{{ p.id }}" {{ 'selected' if contract_filter == p.id|string }}>{{ p.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-2">
|
||||
<label class="form-label small mb-1">Facility</label>
|
||||
<select name="facility_id" id="filter_facility_id" class="form-select form-select-sm">
|
||||
<option value="">All Facilities</option>
|
||||
{% for f in facilities %}
|
||||
<option value="{{ f.id }}" {{ 'selected' if facility_filter == f.id|string }}>{{ f.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<div class="col-6 col-md-3">
|
||||
<label class="form-label small mb-1">Reported From</label>
|
||||
<input type="date" name="date_from" class="form-control form-control-sm"
|
||||
value="{{ date_from_filter }}">
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
<div class="col-6 col-md-3">
|
||||
<label class="form-label small mb-1">Reported To</label>
|
||||
<input type="date" name="date_to" class="form-control form-control-sm"
|
||||
value="{{ date_to_filter }}">
|
||||
</div>
|
||||
<div class="col-12 col-md-2">
|
||||
<div class="col-6 col-md-2">
|
||||
<label class="form-label small mb-1">Reporter</label>
|
||||
<select name="reporter_id" class="form-select form-select-sm">
|
||||
<option value="">All Reporters</option>
|
||||
@@ -112,16 +124,29 @@
|
||||
<option value="vendor" {{ 'selected' if handler_filter == 'vendor' }}>External Vendor</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto d-flex align-items-end gap-2 flex-wrap">
|
||||
<button type="submit" class="btn btn-sm btn-primary px-3">
|
||||
<i class="bi bi-funnel"></i> Filter
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ── Actions — spans both field rows ─────────────────────────────── #}
|
||||
<div class="d-flex gap-2 align-items-stretch flex-grow-1 flex-md-grow-0">
|
||||
<button type="submit"
|
||||
class="btn btn-primary d-flex align-items-center justify-content-center flex-grow-1 flex-md-grow-0"
|
||||
style="min-width:112px;">
|
||||
<span><i class="bi bi-funnel"></i> Filter</span>
|
||||
</button>
|
||||
<a href="{{ url_for('issues.index') }}" class="btn btn-sm btn-outline-secondary">Clear</a>
|
||||
<div class="d-flex flex-column gap-2 flex-grow-1 flex-md-grow-0">
|
||||
<a href="{{ url_for('issues.index') }}"
|
||||
class="btn btn-sm btn-outline-secondary d-flex align-items-center justify-content-center flex-grow-1"
|
||||
style="min-width:124px;">Clear</a>
|
||||
<a href="{{ url_for('issues.export_list_pdf', **request.args) }}"
|
||||
class="btn btn-sm btn-outline-danger">
|
||||
<i class="bi bi-file-earmark-pdf"></i> Export PDF
|
||||
class="btn btn-sm btn-outline-danger d-flex align-items-center justify-content-center flex-grow-1 text-nowrap"
|
||||
style="min-width:124px;">
|
||||
<span><i class="bi bi-file-earmark-pdf"></i> Export PDF</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user