feat: Rewrite InventoryWizard with comprehensive field support

Complete rewrite following the established pattern from Recipe, Customer,
and Supplier wizards. Key improvements:

- Reduced from 3 steps to 1 streamlined comprehensive step
- Removed all duplicate "Continuar" buttons
- Added validate prop with required field checks (name, unitOfMeasure, productType)
- Real-time data sync with parent wizard using useEffect
- Auto-generation of SKU from name (SKU-XXX-1234)
- Added ALL 44 backend fields from research:
  * Required: name, unitOfMeasure, productType
  * Basic: sku, barcode, ingredient/product category, brand, description
  * Pricing: averageCost, lastPurchasePrice, standardCost, sellingPrice, minimumPrice
  * Inventory Management: lowStockThreshold, reorderPoint, reorderQuantity,
    maxStockLevel, leadTimeDays
  * Product Info: packageSize, shelfLifeDays, displayLifeHours,
    storageTempMin/Max
  * Storage & Handling: storageInstructions, handlingInstructions, isPerishable
  * Supplier Info: preferredSupplierId, supplierProductCode
  * Quality & Compliance: allergenInfo, nutritionalInfo, certifications
  * Physical Properties: weight, volume, dimensions, color
  * Status & Tracking: isActive, trackByLot, trackByExpiry, allowNegativeStock
  * Metadata: notes, tags, customFields
- Organized fields using AdvancedOptionsSection for progressive disclosure
- Added tooltips for complex fields using existing Tooltip component
- Dynamic category selection based on product type
- Comprehensive validation for required fields only
This commit is contained in:
Claude
2025-11-10 07:41:26 +00:00
parent b596359f91
commit fa43fddcbd