Updated functionalities
This commit is contained in:
@@ -209,7 +209,7 @@
|
||||
<div class="sub">
|
||||
{{ inspection.facility.name }}
|
||||
{% if inspection.area %} · {{ inspection.area.name }}{% endif %}
|
||||
· Inspector: <strong style="color:#e2e8f0;">{{ inspection.inspector.username }}</strong>
|
||||
· Inspector: <strong style="color:#e2e8f0;">{{ inspection.inspector.display_name }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2 align-items-center">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<select name="status" class="form-select form-select-sm">
|
||||
<option value="">All Statuses</option>
|
||||
{% for s in ['in_progress','completed','flagged'] %}
|
||||
<option value="{{ s }}" {% if status_filter == s %}selected{% endif %}>{{ s|replace('_',' ')|title }}</option>
|
||||
<option value="{{ s }}" {% if status_filter == s %}selected{% endif %}>{{ 'Submitted' if s == 'completed' else s|replace('_',' ')|title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
@@ -59,7 +59,7 @@
|
||||
<td>{{ ins.facility.name }}</td>
|
||||
<td>{% if ins.area %}{{ ins.area.name }}{% else %}<span class="text-muted">—</span>{% endif %}</td>
|
||||
<td>{{ ins.template.name }}</td>
|
||||
<td>{{ ins.inspector.username }}</td>
|
||||
<td>{{ ins.inspector.display_name }}</td>
|
||||
<td>
|
||||
{% if ins.overall_score %}
|
||||
<span class="badge bg-{{ 'success' if ins.overall_score >= 90 else 'warning' if ins.overall_score >= 70 else 'danger' }}">
|
||||
@@ -71,6 +71,14 @@
|
||||
<span class="badge bg-{{ 'success' if ins.status == 'completed' else 'danger' if ins.status == 'flagged' else 'secondary' }}">
|
||||
{{ 'Submitted' if ins.status == 'completed' else ins.status|replace('_',' ')|title }}
|
||||
</span>
|
||||
{% if ins.status == 'in_progress' %}
|
||||
{% set hours_open = ((now - ins.inspection_date).total_seconds() / 3600) %}
|
||||
{% if hours_open > 24 %}
|
||||
<span class="badge bg-warning text-dark ms-1" title="In progress for over 24 hours — may be stale">
|
||||
<i class="bi bi-clock-history"></i> Stale
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if ins.follow_up_required and not ins.follow_ups.count() %}
|
||||
<span class="badge bg-danger ms-1" title="Follow-up re-inspection required">
|
||||
<i class="bi bi-arrow-repeat"></i> Follow-up
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Start Inspection{% endblock %}
|
||||
{% block title %}New Inspection{% endblock %}
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h5 class="mb-0"><i class="bi bi-play-circle"></i> Start New Inspection</h5>
|
||||
<h5 class="mb-0"><i class="bi bi-play-circle"></i> New Inspection</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
|
||||
@@ -471,7 +471,7 @@
|
||||
<h4><i class="bi bi-clipboard-check"></i> {{ inspection.template.name }}</h4>
|
||||
<div class="sub">
|
||||
{{ inspection.facility.name }}{% if inspection.area %} · {{ inspection.area.name }}{% endif %}
|
||||
· Inspector: <strong style="color:#e2e8f0;">{{ inspection.inspector.username }}</strong>
|
||||
· Inspector: <strong style="color:#e2e8f0;">{{ inspection.inspector.display_name }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user