mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-21 17:42:16 -05:00
Closes #991. Both inspectors get a Delete button backed by a new ConfirmDialog that states the consequence instead of asking a bare "are you sure?". A filament that still has spools cannot be deleted (the spool FK is not nullable), so the dialog says how many hold it down rather than letting the click come back as a generic error toast. The count comes from the server with allow_archived=true: the panel hides archived spools, but the foreign key does not care. A manufacturer with filaments can be deleted, and silently orphans them. The dialog says so before the fact, and the cache clears the vendor off those filaments to match what the server did. Pending inline edits are dropped before the delete, so the unmount flush does not PATCH a row on its way out. Adds integration tests for both API behaviours, which were untested.