Add per-printer AMS mapping for multi-printer selection

- New useMultiPrinterFilamentMapping hook for parallel printer status fetching
- Per-printer custom slot configuration with "Custom mapping" checkbox
- Auto-configure using RFID data to match filaments by type/color
- Match status indicator (exact/partial/missing) under each printer
- Re-read button to refresh loaded filaments
- New setting: "Expand custom mapping by default" in Settings → Filament
- FilamentMapping component now accepts defaultExpanded prop

Frontend:
- PrinterSelector: Inline mapping editor for each selected printer
- PrintModal: Fetches settings, auto-expands mapping when setting enabled
- SettingsPage: Toggle for per_printer_mapping_expanded

Backend:
- Added per_printer_mapping_expanded to AppSettings schema
- Added boolean parsing in settings routes
- Added integration tests for new setting

Closes #104
This commit is contained in:
maziggy
2026-01-20 16:59:18 +01:00
parent 90249d2367
commit e1224316a7
14 changed files with 9558 additions and 8751 deletions
+2
View File
@@ -558,6 +558,8 @@ export interface AppSettings {
ams_temp_good: number; // <= this is green/blue
ams_temp_fair: number; // <= this is orange, > is red
ams_history_retention_days: number; // days to keep AMS sensor history
// Print modal settings
per_printer_mapping_expanded: boolean; // Whether custom mapping is expanded by default in print modal
// Date/time format settings
date_format: 'system' | 'us' | 'eu' | 'iso';
time_format: 'system' | '12h' | '24h';