Three features: device dropdown filter, charge log history, unassign-all
- Device dropdowns (quick-assign, bulk install, assign page) now only show devices with free slots; full devices are excluded entirely - New ChargeLog model tracks charge dates with optional cycle increment; battery detail page gets a Charge History card with add/delete rows - Device list page gets per-device Unassign All button (with confirmation) via new POST /device/<id>/unassign-all route
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
<select id="bulk-device-select" name="device_id"
|
||||
style="padding:0.25rem 0.5rem;font-size:0.85rem;border:1px solid #cbd5e1;border-radius:4px;">
|
||||
<option value="">— select device —</option>
|
||||
{% for d in devices %}
|
||||
{% for d in devices_with_slots %}
|
||||
<option value="{{ d.id }}">{{ d.name }} ({{ d.installed_count() }}/{{ d.battery_slots }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
@@ -181,11 +181,8 @@
|
||||
<select id="qas-{{ b.id }}"
|
||||
style="padding:0.2rem 0.3rem;font-size:0.8rem;border:1px solid #cbd5e1;border-radius:4px;max-width:110px;vertical-align:middle;">
|
||||
<option value="">— assign —</option>
|
||||
{% for d in devices %}
|
||||
<option value="{{ d.id }}"
|
||||
{% if d.installed_count() >= d.battery_slots %}disabled{% endif %}>
|
||||
{{ d.name }} ({{ d.installed_count() }}/{{ d.battery_slots }})
|
||||
</option>
|
||||
{% for d in devices_with_slots %}
|
||||
<option value="{{ d.id }}">{{ d.name }} ({{ d.installed_count() }}/{{ d.battery_slots }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="button" class="btn btn-sm btn-primary"
|
||||
|
||||
Reference in New Issue
Block a user