diff --git a/inventory/templates/coffee.html b/inventory/templates/coffee.html index fc2041a..079ce5a 100644 --- a/inventory/templates/coffee.html +++ b/inventory/templates/coffee.html @@ -72,10 +72,10 @@ // 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) { + if (allChecked && !window.__alreadyNavigated && {{ level }} < 28) { window.__alreadyNavigated = true; location.href = "{{ url_for('main.coffee', level=level + 1) }}"; - } else if (allUnchecked && !window.__alreadyNavigated) { + } else if (allUnchecked && !window.__alreadyNavigated && {{ level }} > -2) { window.__alreadyNavigated = true; location.href = "{{ url_for('main.coffee', level=level - 1) }}"; }