From 15c7fcc0477fe74e98eeb47e5abf950e0d18fecf Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 8 Aug 2025 12:48:43 -0500 Subject: [PATCH] Fix formatting issue in inventory template. --- inventory/templates/coffee.html | 8 +++++++- inventory/templates/inventory.html | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/inventory/templates/coffee.html b/inventory/templates/coffee.html index f02c178..fc2041a 100644 --- a/inventory/templates/coffee.html +++ b/inventory/templates/coffee.html @@ -7,7 +7,7 @@ {% endblock %} {% block content %} -
+
{% for x in range(level + 3) %}
{% for y in range(level + 3) %} @@ -34,8 +34,10 @@ if(checkbox.checked) { light.classList.add('bg-danger-subtle'); + light.classList.remove('bg-light-subtle'); } else { light.classList.remove('bg-danger-subtle'); + light.classList.add('bg-light-subtle'); } }); } @@ -69,9 +71,13 @@ // Check if all checkboxes are checked const allChecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => cb.checked); + const allUnchecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => !cb.checked); if (allChecked && !window.__alreadyNavigated) { window.__alreadyNavigated = true; location.href = "{{ url_for('main.coffee', level=level + 1) }}"; + } else if (allUnchecked && !window.__alreadyNavigated) { + window.__alreadyNavigated = true; + location.href = "{{ url_for('main.coffee', level=level - 1) }}"; } }); }); diff --git a/inventory/templates/inventory.html b/inventory/templates/inventory.html index 680c9c2..fd32978 100644 --- a/inventory/templates/inventory.html +++ b/inventory/templates/inventory.html @@ -129,7 +129,7 @@
-
+
@@ -228,7 +228,7 @@
{% if item.image or item.condition not in ["Removed", "Disposed"] %} -
+
{{ images.render_image(item.id, item.image, enabled = item.condition not in ["Removed", "Disposed"]) }}
{% endif %}