06/12 Add export PDF function for Inspection filter result

This commit is contained in:
2026-06-12 10:43:18 -04:00
parent 8f7f8dbaff
commit e5f29e547b
4 changed files with 292 additions and 6 deletions
+11 -1
View File
@@ -338,7 +338,7 @@
{# Action bar #}
<div class="d-flex justify-content-between align-items-center mb-3">
<a href="{{ url_for('inspections.index') }}" class="btn btn-sm btn-outline-secondary">
<a id="backToInspectionsBtn" href="{{ url_for('inspections.index') }}" class="btn btn-sm btn-outline-secondary">
<i class="bi bi-arrow-left"></i> Back to Inspections
</a>
<div class="d-flex gap-2">
@@ -852,6 +852,16 @@
{% endblock %}
{% block extra_js %}
<script>
(function () {
var backUrl = sessionStorage.getItem('insp_list_back_url');
if (backUrl) {
var btn = document.getElementById('backToInspectionsBtn');
if (btn) btn.href = backUrl;
}
}());
</script>
<script>
function openMedia(src, label) {
document.getElementById('mediaImg').src = src;