Jul 9 - Update to allow customer to manage their facilities' QR codes

This commit is contained in:
2026-07-09 09:58:43 -04:00
parent 97a559d5c0
commit b2ac816bc2
6 changed files with 58 additions and 28 deletions
+1 -3
View File
@@ -8,12 +8,10 @@
<h2><i class="bi bi-building"></i> Facilities</h2>
</div>
<div class="col-md-6 text-end">
{% if current_user.role != 'customer' %}
<a href="{{ url_for('facilities.facility_qr_print_all') }}"
class="btn btn-outline-dark" title="Printable sheet of every facility's QR code">
class="btn btn-outline-dark" title="Printable sheet of your facilities' QR codes">
<i class="bi bi-qr-code"></i> Print All QR Codes
</a>
{% endif %}
{% if current_user.role in ['admin', 'director'] %}
<a href="{{ url_for('facilities.create_facility') }}" class="btn btn-primary">
<i class="bi bi-plus-circle"></i> Add Facility
+1 -1
View File
@@ -17,7 +17,7 @@
<i class="bi bi-arrow-left"></i> Back to Facility
</a>
<div class="d-flex gap-2">
{% if current_user.role in ['admin', 'director'] %}
{% if current_user.role in ['admin', 'director', 'customer'] %}
<form method="POST"
action="{{ url_for('facilities.facility_qr_regenerate', facility_id=facility.id) }}"
onsubmit="return confirm('Regenerate this QR code? Any codes already printed and posted for {{ facility.name }} will STOP working and must be reprinted.');">
+1 -1
View File
@@ -17,7 +17,7 @@
<i class="bi bi-graph-up-arrow"></i> Scorecard
</a>
{% endif %}
{% if current_user.role in ['admin', 'director', 'project_manager'] %}
{% if current_user.role in ['admin', 'director', 'project_manager', 'customer'] %}
<a href="{{ url_for('facilities.facility_qr_page', facility_id=facility.id) }}"
class="btn btn-outline-dark" title="Printable QR code for this facility">
<i class="bi bi-qr-code"></i> QR Code