mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 10:02:17 -05:00
The manufacturer was decided once, in the add-spool modal, and there was no way back: a filament created under the wrong brand — or under none — stayed there, and since the library groups by manufacturer that mis-files every spool of it. The companion to the spool's change-filament (#1010), one level up the chain. Adds a "Change" action to the MANUFACTURER section of the filament inspector, opening a dialog with the three destinations the API allows: one of your manufacturers, a new one named on the spot (as the add-spool form already allows), or none at all. There is no SpoolmanDB side to this one — the external catalog carries filaments and materials, not manufacturers — so the picker fetches the vendor list whole and filters it in the browser. The dialog spells out the one consequence that isn't obvious. A filament with no empty spool weight of its own takes its manufacturer's, and that is the figure `PUT /spool/{id}/measure` subtracts from a reading off the scale, so the note says what it becomes — or that it is about to have none. A filament that has its own keeps it and gets no note: unlike the spool's full weight, that field is editable right there in the panel. Clearing the manufacturer travels as an explicit `vendor_id: null`, which is what the API reads as "no manufacturer"; dropping the key instead would have made that choice a silent no-op.