Skip to content

feat(spools): delete spool from list + bulk registration (v1.37.0)#57

Merged
iscarelli merged 1 commit into
mainfrom
feat/spool-delete-bulk-add
Jul 10, 2026
Merged

feat(spools): delete spool from list + bulk registration (v1.37.0)#57
iscarelli merged 1 commit into
mainfrom
feat/spool-delete-bulk-add

Conversation

@iscarelli

@iscarelli iscarelli commented Jul 10, 2026

Copy link
Copy Markdown
Owner

What changes

Two improvements to the spool list/registration, requested by the user.

1. Delete spool from the list (permanent, admin-only)

  • New trash button (red) on each row → POST /spools/<id>/delete with @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 no ON DELETE CASCADE). Confirmation via data-sc-confirm.
  • Distinct from Finish (soft, 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

  • Quantity field (1-50) on the New Spool form → creates N identical spools with distinct IDs.
  • 1 spool: same flow as before (goes to detail, offers the queue).
  • N spools: returns to the list and offers to enqueue all N at once (one label/QR per spool), reusing 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).
  • i18n EN/ES key parity: OK. New strings resolve in PT/EN/ES.

Deploy

MINOR (1.36.2 → 1.37.0). After merge: create release v1.37.0 and update via /admin/update.

🤖 Generated with Claude Code

- "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>
@iscarelli iscarelli force-pushed the feat/spool-delete-bulk-add branch from 404d7e2 to 5a93736 Compare July 10, 2026 17:22
@iscarelli iscarelli changed the title feat(spools): excluir rolo na lista + cadastro em lote (v1.37.0) feat(spools): delete spool from list + bulk registration (v1.37.0) Jul 10, 2026
@iscarelli iscarelli merged commit f169c8e into main Jul 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant