diff --git a/frontend/src/components/domain/setup-wizard/data/ingredientTemplates.ts b/frontend/src/components/domain/setup-wizard/data/ingredientTemplates.ts index 0d0e209c..40a4d910 100644 --- a/frontend/src/components/domain/setup-wizard/data/ingredientTemplates.ts +++ b/frontend/src/components/domain/setup-wizard/data/ingredientTemplates.ts @@ -295,15 +295,22 @@ export const templateToIngredientCreate = ( template: IngredientTemplate, customName?: string ): Omit => { + // Calculate realistic stock levels based on unit type + const lowStock = 10; + const reorderPoint = 20; + const reorderQty = 50; + const maxStock = reorderQty * 2; // 100 - always > 0 + return { name: customName || template.name, category: template.category, unit_of_measure: template.unit_of_measure, description: template.description, standard_cost: template.estimatedCost, - low_stock_threshold: 10, - reorder_point: 20, - reorder_quantity: 50, + low_stock_threshold: lowStock, + max_stock_level: maxStock, // Added: prevents validation error + reorder_point: reorderPoint, + reorder_quantity: reorderQty, is_perishable: [IngredientCategory.DAIRY, IngredientCategory.EGGS].includes(template.category), }; };