mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
Two bugs surfaced by @flom89 in the same thread: (1) The Write-Tag page hardcoded api.getSpools and friends regardless of inventory backend. Users in Spoolman mode saw internal spools they never created and a successful tag write would have bound the NFC tag to the wrong backend (the backend write-tag route is mode-aware; the frontend was driving it with the wrong IDs). Fix follows the InventoryPageRouter pattern: detect spoolmanMode from getSpoolmanSettings, gate the spool fetch on spoolmanModeReady to avoid the initial wrong-backend request, and branch all 6 API call sites (list, autocomplete, untag, K-profile save, single create, bulk create — the bulk variant returns a different envelope shape so the duck-typed check from SpoolFormModal is mirrored). (2) The spool ID was missing from three more SpoolBuddy components beyond the first round of #1439 work — SpoolInfoCard (the dashboard's right-side found-tag panel — the "main screen" view the reporter named), InventorySpoolInfoCard, and SpoolBuddyAmsPage's assigned-spool block. Same #1385 pattern (#<id> in muted small monospace with shrink-0).