Fas 3 steg 3b: minimala efterfrågor + hushållsantagandeprofiler per ingrediens
This commit is contained in:
@@ -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,
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user