Add printer types with bed volume + add-printer UI

- PrinterType model: name, bed_x_mm/y/z, linked to Printer via type_id
- Migration 0002: creates printer_types, adds type_id to printers, drops model
- /printer-types page: table + Add Type modal form
- /printers page: Add Printer modal with type dropdown (disabled if no types)
- API: GET/POST/DELETE /api/printer-types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Hohenberg
2026-06-18 21:46:26 +02:00
parent 5fb15b36bf
commit 750edbbcec
9 changed files with 309 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from app.db import check_db, run_migrations
from app.routers import filaments, pricing, print_jobs, printers, todos
from app.routers import filaments, pricing, print_jobs, printer_types, printers, todos
from app.routers import ui
logging.basicConfig(
@@ -39,6 +39,7 @@ async def unhandled_exception(request: Request, exc: Exception):
# JSON API
app.include_router(printer_types.router, prefix="/api")
app.include_router(printers.router, prefix="/api")
app.include_router(filaments.router, prefix="/api")
app.include_router(print_jobs.router, prefix="/api")