Jul 30 - Internal handler files
This commit is contained in:
@@ -76,10 +76,11 @@
|
||||
<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' %}
|
||||
{% set _ht = issue.handler_type or 'internal' %}
|
||||
{% if _ht != 'internal' or issue.internal_handler_name or issue.internal_handler_contact %}
|
||||
<dt class="col-sm-3">Handled By</dt>
|
||||
<dd class="col-sm-9">
|
||||
{% if issue.handler_type == 'facility' %}
|
||||
{% if _ht == 'facility' %}
|
||||
<span class="badge bg-secondary">
|
||||
<i class="bi bi-building me-1"></i>Facility Staff
|
||||
</span>
|
||||
@@ -92,8 +93,18 @@
|
||||
{% 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' %}
|
||||
{% elif _ht == 'vendor' %}
|
||||
<span class="badge bg-dark"><i class="bi bi-person-gear me-1"></i>External Vendor</span>
|
||||
{% else %}
|
||||
<span class="badge bg-light text-dark border">
|
||||
<i class="bi bi-people me-1"></i>Janitorial Staff
|
||||
</span>
|
||||
{% if issue.internal_handler_name %}
|
||||
<span class="ms-2 fw-semibold">{{ issue.internal_handler_name }}</span>
|
||||
{% endif %}
|
||||
{% if issue.internal_handler_contact %}
|
||||
<span class="text-muted ms-2">{{ issue.internal_handler_contact }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
@@ -416,13 +427,30 @@
|
||||
placeholder="Notes about what they are handling…") }}
|
||||
</div>
|
||||
</div>
|
||||
<div id="internalHandlerFields"
|
||||
style="{{ '' if (issue.handler_type or 'internal') == 'internal' else 'display:none;' }}">
|
||||
<div class="mb-2">
|
||||
{{ form.internal_handler_name.label(class="form-label small fw-semibold mb-1") }}
|
||||
{{ form.internal_handler_name(class="form-control form-control-sm",
|
||||
placeholder="Crew member handling this",
|
||||
value=issue.internal_handler_name or '') }}
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
{{ form.internal_handler_contact.label(class="form-label small fw-semibold mb-1") }}
|
||||
{{ form.internal_handler_contact(class="form-control form-control-sm",
|
||||
placeholder="Phone or email",
|
||||
value=issue.internal_handler_contact or '') }}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var sel = document.getElementById('handlerTypeSelect');
|
||||
var box = document.getElementById('facilityHandlerFields');
|
||||
if(sel && box){
|
||||
var inv = document.getElementById('internalHandlerFields');
|
||||
if(sel){
|
||||
sel.addEventListener('change', function(){
|
||||
box.style.display = (this.value === 'facility') ? '' : 'none';
|
||||
if(box){ box.style.display = (this.value === 'facility') ? '' : 'none'; }
|
||||
if(inv){ inv.style.display = (this.value === 'internal') ? '' : 'none'; }
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user