feat(filament): add spool count and total remaining weight columns

Adds computed spool statistics to filament list:
- spool_count: Number of non-archived spools of this filament
- total_remaining_weight: Sum of remaining weight across all spools

Backend changes:
- Modified database/filament.py find() to compute stats via subquery
- Added fields to Filament pydantic model in api/v1/models.py
- Updated filament API endpoint to include stats in response

Frontend changes:
- Added fields to IFilament interface
- Added columns to filament list table
- Added translation keys

Closes #15

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-15 23:31:47 -06:00
parent 0a741c9712
commit 48bd516c0f
6 changed files with 75 additions and 7 deletions

View File

@@ -260,7 +260,9 @@
"longitudinal": "Longitudinal",
"external_id": "External ID",
"spools": "Show Spools",
"not_set": "Not Set"
"not_set": "Not Set",
"spool_count": "Spools",
"total_remaining_weight": "Total Remaining"
},
"fields_help": {
"name": "Filament name, to distinguish this filament type among others from the same manufacturer. Should contain the color for example.",