Fix formatting issue in inventory template.

This commit is contained in:
Yaro Kasear 2025-08-08 12:48:43 -05:00
parent b396f63342
commit 15c7fcc047
2 changed files with 9 additions and 3 deletions

View file

@ -7,7 +7,7 @@
{% endblock %}
{% block content %}
<div class="container">
<div class="container border border-black rounded bg-success-subtle">
{% for x in range(level + 3) %}
<div class="row" style="min-height: {{ 80 / (level + 3) }}vh;">
{% 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) }}";
}
});
});

View file

@ -129,7 +129,7 @@
<input type="hidden" id="inventoryId" value="{{ item.id }}">
<div class="container">
<div class="row">
<div class="col-8">
<div class="col">
<div class="row align-items-center">
<div class="col">
<label for="timestamp" class="form-label">Date Entered</label>
@ -228,7 +228,7 @@
</div>
</div>
{% if item.image or item.condition not in ["Removed", "Disposed"] %}
<div class="col">
<div class="col-4">
{{ images.render_image(item.id, item.image, enabled = item.condition not in ["Removed", "Disposed"]) }}
</div>
{% endif %}