Commit Graph

1 Commits

Author SHA1 Message Date
Claude
3a1a19d836 Complete AI inventory step redesign & add recipes next button
 RECIPES STEP FIX:
- Add onComplete prop handling to RecipesSetupStep.tsx
- Add "Next" button when recipes.length >= 1
- Show success message with recipe count
- Button hidden when in adding mode

🎯 AI INVENTORY STEP - COMPLETE REDESIGN:
Following suppliers/recipes pattern with list-based management and deferred creation.

**NEW DATA MODEL**:
- InventoryItemForm interface with isSuggested tracking
- Items stored in list (NOT created in database yet)
- Support both AI suggestions and manual entries

**NEW UI PATTERN**:
- List view with expandable cards showing AI confidence badges
- Edit/Delete buttons per item (like suppliers)
- "Add Ingredient Manually" button with full form
- Next button creates ALL items at once (deferred creation)

**KEY CHANGES**:
1. Items added to list first (not created immediately)
2. Can edit/delete both AI and manual items before creation
3. Manual ingredient addition form with full validation
4. All items created when clicking "Next" button
5. Progress indicator during creation
6. Sales data import happens after inventory creation

**UI IMPROVEMENTS**:
- "Why This Matters" info box explaining workflow
- Ingredient cards show: name, category, stock, cost, shelf life, sales data
- AI confidence badges (e.g., "IA 95%")
- Visual success indicator when minimum met
- Gradient form section matching recipe template pattern

**FILES**:
- UploadSalesDataStep.tsx: Completely rewritten (963 lines)
- RecipesSetupStep.tsx: Added Next button (2 lines)
- REDESIGN_SUMMARY.md: Complete documentation of changes

Build:  Success (21.46s)
Pattern: Now matches suppliers/recipes workflow exactly
Creation: Deferred until "Next" click (user can review/edit first)
2025-11-06 15:09:23 +00:00