mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-06 14:11:35 +02:00
Add maintenance documentation links with model-specific wiki URLs (#59)
Features:
- Add wiki_url field to MaintenanceType for custom type documentation links
- Add printer_model to MaintenanceStatus for model-specific URL mapping
- Display external link icon next to maintenance item names
- Map system maintenance types to Bambu Lab wiki pages by printer model:
- Lubricate Linear Rails, Clean Nozzle/Hotend, Check Belt Tension
- Clean Carbon Rods (X1/P1 only), Clean Build Plate, Check PTFE Tube
- HEPA/Carbon Filter, Left Nozzle Rail (H2 series)
- Add Documentation Link input to custom type create/edit forms
Bug fix:
- Fix 500 error when assigning maintenance type to printer (lazy loading)
Database:
- Add migration for wiki_url column on maintenance_types table
This commit is contained in:
@@ -1189,6 +1189,7 @@ export interface MaintenanceType {
|
||||
default_interval_hours: number;
|
||||
interval_type: 'hours' | 'days'; // "hours" = print hours, "days" = calendar days
|
||||
icon: string | null;
|
||||
wiki_url: string | null; // Documentation link
|
||||
is_system: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
@@ -1199,15 +1200,18 @@ export interface MaintenanceTypeCreate {
|
||||
default_interval_hours?: number;
|
||||
interval_type?: 'hours' | 'days';
|
||||
icon?: string | null;
|
||||
wiki_url?: string | null;
|
||||
}
|
||||
|
||||
export interface MaintenanceStatus {
|
||||
id: number;
|
||||
printer_id: number;
|
||||
printer_name: string;
|
||||
printer_model: string | null;
|
||||
maintenance_type_id: number;
|
||||
maintenance_type_name: string;
|
||||
maintenance_type_icon: string | null;
|
||||
maintenance_type_wiki_url: string | null; // Custom wiki URL from type
|
||||
enabled: boolean;
|
||||
interval_hours: number; // For hours type: print hours; for days type: number of days
|
||||
interval_type: 'hours' | 'days';
|
||||
@@ -1224,6 +1228,7 @@ export interface MaintenanceStatus {
|
||||
export interface PrinterMaintenanceOverview {
|
||||
printer_id: number;
|
||||
printer_name: string;
|
||||
printer_model: string | null;
|
||||
total_print_hours: number;
|
||||
maintenance_items: MaintenanceStatus[];
|
||||
due_count: number;
|
||||
|
||||
Reference in New Issue
Block a user