Fas 3 steg 3b: minimala efterfrågor + hushållsantagandeprofiler per ingrediens

This commit is contained in:
Sven (AAMOS AI)
2026-08-07 03:56:41 +07:00
parent 44f6385dce
commit e46281b9b5
24 changed files with 10130 additions and 5 deletions
+14 -1
View File
@@ -26,6 +26,7 @@ export interface CompleteCookingResult {
mealIds: string[];
mealBoxId: string | null;
inventoryDeductions: Array<{ itemId: string; quantity: number; unit: string; name: string }>;
recipeIngredients: Array<{ canonicalIngredientId: string; displayName: string; quantity: number; unit: string; optional: boolean }>;
}
/**
@@ -251,5 +252,17 @@ export async function completeCookingSessionCore(
await markMilestone(app.db, householdId, "inventoryUpdatedAfterCookingAt");
}
return { ok: true, mealIds, mealBoxId, inventoryDeductions: deductions };
return {
ok: true,
mealIds,
mealBoxId,
inventoryDeductions: deductions,
recipeIngredients: recipe.ingredients.map((ing) => ({
canonicalIngredientId: ing.canonicalIngredientId,
displayName: ing.displayNameSv,
quantity: ing.quantity,
unit: ing.unit,
optional: ing.optional,
})),
};
}