Commit Graph

2 Commits

Author SHA1 Message Date
hsiegeln
c6a549699a feat(shopping): consolidate() fuer g/kg + ml/l Summierung
Implementiert consolidate() in unit-consolidation.ts: summiert Mengen
innerhalb einer Unit-Family (Gewicht g/kg, Volumen ml/l) mit automatischer
Promotion ab Schwellwert; nicht-family-units werden direkt summiert.
quantity=null wird als 0 behandelt; alle-null ergibt null-Ergebnis.
9 neue Tests, alle 14 Tests gruen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 16:50:24 +02:00
hsiegeln
29f0245ce0 feat(shopping): unitFamily-Utility fuer Konsolidierung
Neue Hilfsfunktion `unitFamily` normalisiert Einheiten auf eine
Familien-Kennung ('weight', 'volume' oder lowercase-trim). Wird
in nachfolgenden Konsolidierungs-Schritten der Einkaufsliste
verwendet. Abgedeckt durch 5 Vitest-Unit-Tests (TDD).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 16:46:43 +02:00