Files
bakery-ia/frontend/src/components/domain/recipes/RecipeWizard/index.ts

7 lines
364 B
TypeScript
Raw Normal View History

Implement Phase 2: Recipe & Supplier wizard modals (JTBD-driven UX) Following Jobs-To-Be-Done analysis, break down complex forms into multi-step wizards to reduce cognitive load for non-technical bakery owners. **Core Infrastructure:** - Add reusable WizardModal component with progress tracking, validation, and navigation - Multi-step progress bar with clickable previous steps - Per-step validation with clear error messaging - Back/Next/Complete navigation with loading states - Optional step skipping support - Responsive modal design (sm/md/lg/xl/2xl sizes) **Recipe Wizard (4 steps):** - Step 1 (Product): Name, category, finished product, cuisine type, difficulty, description - Step 2 (Ingredients): Dynamic ingredient list with add/remove, quantities, units, optional flags - Step 3 (Production): Times (prep/cook/rest), yield, batch sizes, temperature, humidity, special flags - Step 4 (Review): Instructions, storage, nutritional info, allergens, final summary **Supplier Wizard (3 steps):** - Step 1 (Basic): Name, type, status, contact person, email, phone, tax ID, registration - Step 2 (Delivery): Payment terms, lead time, minimum order, delivery schedule, address - Step 3 (Review): Certifications, sustainability practices, notes, summary **Benefits:** - Reduces form overwhelm from 8 sections to 4 sequential steps (recipes) and 3 steps (suppliers) - Clear progress indication and next actions - Validation feedback per step instead of at end - Summary review before final submission - Matches mental model of "configure then review" workflow Files: - WizardModal: Reusable wizard infrastructure - RecipeWizard: 4-step recipe creation (Product → Ingredients → Production → Review) - SupplierWizard: 3-step supplier creation (Basic → Delivery → Review) Related to Phase 1 (ConfigurationProgressWidget) for post-onboarding guidance.
2025-11-06 18:01:11 +00:00
export { RecipeWizardModal } from './RecipeWizardModal';
export { RecipeProductStep } from './RecipeProductStep';
export { RecipeIngredientsStep } from './RecipeIngredientsStep';
export { RecipeProductionStep } from './RecipeProductionStep';
export { RecipeReviewStep } from './RecipeReviewStep';
Implement Phase 3: Advanced post-onboarding features (JTBD-driven UX) Complete JTBD implementation with 4 advanced features to reduce friction and accelerate configuration for non-technical bakery owners. **1. Recipe Templates Library:** - Add RecipeTemplateSelector modal with searchable template gallery - Pre-built templates: Baguette, Pan de Molde, Medialunas, Facturas, Bizcochuelo, Galletas - Smart ingredient matching between templates and user's inventory - Category filtering (Panes, Facturas, Tortas, Galletitas) - One-click template loading with pre-filled wizard data - "Create from scratch" option for custom recipes - Integrated as pre-wizard step in RecipeWizardModal **2. Bulk Supplier CSV Import:** - Add BulkSupplierImportModal with CSV upload & parsing - Downloadable CSV template with examples - Live validation with error detection - Preview table showing valid/invalid rows - Multi-column support (15+ fields: name, type, email, phone, payment terms, address, etc.) - Batch import with progress tracking - Success/error notifications **3. Configuration Recovery (Auto-save):** - Add useWizardDraft hook with localStorage persistence - Auto-save wizard progress every 30 seconds - 7-day draft expiration (configurable TTL) - DraftRecoveryPrompt component for restore/discard choice - Shows "saved X time ago" with human-friendly formatting - Prevents data loss from accidental browser closes **4. Milestone Notifications (Feature Unlocks):** - Add Toast notification system (ToastNotification, ToastContainer, useToast hook) - Support for success, error, info, and milestone toast types - Animated slide-in/slide-out transitions - Auto-dismiss with configurable duration - useFeatureUnlocks hook to track when features are unlocked - Visual feedback for configuration milestones **Benefits:** - Templates: Reduce recipe creation time from 10+ min to <2 min - Bulk Import: Add 50+ suppliers in seconds vs hours - Auto-save: Zero data loss from accidental exits - Notifications: Clear feedback on progress and unlocked capabilities Files: - RecipeTemplateSelector: Template library UI - BulkSupplierImportModal: CSV import system - useWizardDraft + DraftRecoveryPrompt: Auto-save infrastructure - Toast system + useToast + useFeatureUnlocks: Notification framework Part of 3-phase JTBD implementation (Phase 1: Progress Widget, Phase 2: Wizards, Phase 3: Advanced Features).
2025-11-06 18:07:54 +00:00
export { RecipeTemplateSelector } from './RecipeTemplateSelector';