feat(spools): delete spool from list + bulk registration (v1.37.0)#57
Merged
Conversation
- "Delete" button (permanent, admin-only) on each row of the spool list: removes the spool + its weight-reading history + queue entry, with a confirmation. Distinct from "Finish" (soft, active=0), which is now also available on the list for users with write access. - "Quantity" field (1-50) on the New Spool form: creates N identical spools with distinct IDs. A single spool keeps the old flow (detail + queue prompt); N spools return to the list and offer to enqueue all N (label_queue_add_all). - i18n (EN/ES), tests (cascade, admin-only RBAC, bulk, UI rendering). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
404d7e2 to
5a93736
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Two improvements to the spool list/registration, requested by the user.
1. Delete spool from the list (permanent, admin-only)
POST /spools/<id>/deletewith@admin_required; the button only renders for admins.db.delete_spool()removes the spool and its weight-reading history and its queue entry, in a single transaction (the FKs have noON DELETE CASCADE). Confirmation viadata-sc-confirm.active=0, keeps history), which used to live only on the edit screen and now also appears on the list for users with write access.2. Register multiple identical spools at once
label_queue_add_all— "the same selected number".Verification
run-tests.ps1: 158 → 168 tests, all green (10 new: cascade, admin-only RBAC, 404, bulk+clamp, and UI rendering for admin/viewer).Deploy
MINOR (1.36.2 → 1.37.0). After merge: create release
v1.37.0and update via/admin/update.🤖 Generated with Claude Code