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:
@@ -57,6 +57,12 @@
|
||||
</td>
|
||||
<td data-label="Actions" style="white-space:nowrap;">
|
||||
<a class="btn btn-sm btn-secondary" href="{{ url_for('device_detail', device_id=d.id) }}">View</a>
|
||||
{% if d.installed_count() > 0 %}
|
||||
<form class="inline" method="post" action="{{ url_for('device_unassign_all', device_id=d.id) }}"
|
||||
onsubmit="return confirm('Unassign all batteries from {{ d.name }}?')">
|
||||
<button class="btn btn-sm btn-warning" type="submit">Unassign All</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form class="inline" method="post" action="{{ url_for('device_delete', device_id=d.id) }}"
|
||||
onsubmit="return confirm('Delete {{ d.name }}? All installed batteries will be unassigned.');">
|
||||
<button class="btn btn-sm btn-danger" type="submit">Delete</button>
|
||||
|
||||
Reference in New Issue
Block a user