refactor(shopping): listShoppingList - Pipe-safe name/family lookup
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 2m14s
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 2m14s
Liest nameKey und familyKey direkt von members[0] statt den Composite-Key am Pipe-Zeichen zu splitten. Verhindert falsche Dekodierung bei Zutaten wie "Fleisch- | Wurstwaren". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -128,8 +128,9 @@ export function listShoppingList(
|
||||
}
|
||||
|
||||
const rows: ShoppingListRow[] = [];
|
||||
for (const [key, members] of grouped) {
|
||||
const [nameKey, familyKey] = key.split('|');
|
||||
for (const members of grouped.values()) {
|
||||
const nameKey = members[0].name_key;
|
||||
const familyKey = unitFamily(members[0].unit_key);
|
||||
const consolidated = consolidate(
|
||||
members.map((m) => ({ quantity: m.total_quantity, unit: m.display_unit }))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user