Jul 10 - Update codes to catch up with the single tenant project

This commit is contained in:
2026-07-10 12:29:44 -04:00
parent faab9fd008
commit e41998b561
12 changed files with 375 additions and 13 deletions
+18
View File
@@ -82,6 +82,24 @@
{% endfor %}
</select>
</div>
{% if current_user.role not in ['customer'] %}
<div class="col-md-2">
<label class="form-label small mb-1">Handled By</label>
<select name="handler_type" class="form-select form-select-sm">
<option value="">All</option>
<option value="internal" {{ 'selected' if handler_type_filter == 'internal' }}>Janitorial Staff</option>
<option value="facility" {{ 'selected' if handler_type_filter == 'facility' }}>Facility Staff</option>
<option value="vendor" {{ 'selected' if handler_type_filter == 'vendor' }}>External Vendor</option>
</select>
</div>
<div class="col-md-2 d-flex align-items-end">
<div class="form-check form-switch mb-0">
<input class="form-check-input" type="checkbox" name="unassigned" value="1" id="unassignedCheck"
{{ 'checked' if unassigned_filter }}>
<label class="form-check-label small" for="unassignedCheck">Unassigned only</label>
</div>
</div>
{% endif %}
<div class="col-auto d-flex align-items-end gap-2 flex-wrap">
<button type="submit" class="btn btn-sm btn-outline-primary">Filter</button>
<a href="{{ url_for('issues.index') }}" class="btn btn-sm btn-outline-secondary">Clear</a>
+62
View File
@@ -76,6 +76,28 @@
<dt class="col-sm-3">Assigned To</dt>
<dd class="col-sm-9">{{ issue.assigned_user.display_name if issue.assigned_user else '— Unassigned —' }}</dd>
{% if issue.handler_type and issue.handler_type != 'internal' %}
<dt class="col-sm-3">Handled By</dt>
<dd class="col-sm-9">
{% if issue.handler_type == 'facility' %}
<span class="badge bg-secondary">
<i class="bi bi-building me-1"></i>Facility Staff
</span>
{% if issue.facility_handler_name %}
<span class="ms-2 fw-semibold">{{ issue.facility_handler_name }}</span>
{% if issue.facility_handler_contact %}
<span class="text-muted ms-2">{{ issue.facility_handler_contact }}</span>
{% endif %}
{% endif %}
{% if issue.facility_handler_notes %}
<div class="text-muted small mt-1" style="white-space:pre-wrap;">{{ issue.facility_handler_notes }}</div>
{% endif %}
{% elif issue.handler_type == 'vendor' %}
<span class="badge bg-dark"><i class="bi bi-person-gear me-1"></i>External Vendor</span>
{% endif %}
</dd>
{% endif %}
{% if issue.vendor_name %}
<dt class="col-sm-3">Contractor</dt>
<dd class="col-sm-9">
@@ -366,6 +388,46 @@
</div>
{% if current_user.role in ['admin','director','project_manager'] %}
<hr class="my-3">
<p class="fw-semibold small mb-2">
<i class="bi bi-person-check me-1 text-secondary"></i>Handler / Ownership
</p>
<div class="mb-3">
{{ form.handler_type.label(class="form-label small fw-semibold mb-1") }}
{{ form.handler_type(class="form-select form-select-sm",
id="handlerTypeSelect") }}
</div>
<div id="facilityHandlerFields"
style="{{ '' if issue.handler_type == 'facility' else 'display:none;' }}">
<div class="mb-2">
{{ form.facility_handler_name.label(class="form-label small fw-semibold mb-1") }}
{{ form.facility_handler_name(class="form-control form-control-sm",
placeholder="Contact name at the facility",
value=issue.facility_handler_name or '') }}
</div>
<div class="mb-2">
{{ form.facility_handler_contact.label(class="form-label small fw-semibold mb-1") }}
{{ form.facility_handler_contact(class="form-control form-control-sm",
placeholder="Phone or email",
value=issue.facility_handler_contact or '') }}
</div>
<div class="mb-3">
{{ form.facility_handler_notes.label(class="form-label small fw-semibold mb-1") }}
{{ form.facility_handler_notes(class="form-control form-control-sm", rows=2,
placeholder="Notes about what they are handling…") }}
</div>
</div>
<script>
(function(){
var sel = document.getElementById('handlerTypeSelect');
var box = document.getElementById('facilityHandlerFields');
if(sel && box){
sel.addEventListener('change', function(){
box.style.display = (this.value === 'facility') ? '' : 'none';
});
}
})();
</script>
<hr class="my-3">
<p class="fw-semibold small mb-2">
<i class="bi bi-person-gear me-1 text-secondary"></i>External Contractor
</p>