2025-11-10 12:12:50 +00:00
|
|
|
import React, { useState } from 'react';
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
import { useTranslation } from 'react-i18next';
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
import { WizardStep, WizardStepProps } from '../../../ui/WizardModal/WizardModal';
|
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
2025-11-10 07:41:26 +00:00
|
|
|
import { AdvancedOptionsSection } from '../../../ui/AdvancedOptionsSection';
|
|
|
|
|
import Tooltip from '../../../ui/Tooltip/Tooltip';
|
|
|
|
|
import { Info } from 'lucide-react';
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
|
|
|
|
interface WizardDataProps extends WizardStepProps {
|
|
|
|
|
data: Record<string, any>;
|
|
|
|
|
onDataChange: (data: Record<string, any>) => void;
|
|
|
|
|
}
|
|
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
// Single comprehensive step with all fields
|
|
|
|
|
const InventoryDetailsStep: React.FC<WizardDataProps> = ({ data, onDataChange }) => {
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
const { t } = useTranslation('wizards');
|
|
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
const [inventoryData, setInventoryData] = useState({
|
|
|
|
|
// Required fields
|
|
|
|
|
name: data.name || '',
|
|
|
|
|
unitOfMeasure: data.unitOfMeasure || '',
|
|
|
|
|
productType: data.productType || 'ingredient',
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
// Basic fields
|
|
|
|
|
sku: data.sku || '',
|
|
|
|
|
barcode: data.barcode || '',
|
|
|
|
|
ingredientCategory: data.ingredientCategory || '',
|
|
|
|
|
productCategory: data.productCategory || '',
|
|
|
|
|
description: data.description || '',
|
|
|
|
|
brand: data.brand || '',
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
// Pricing fields
|
|
|
|
|
averageCost: data.averageCost || '',
|
|
|
|
|
lastPurchasePrice: data.lastPurchasePrice || '',
|
|
|
|
|
standardCost: data.standardCost || '',
|
|
|
|
|
sellingPrice: data.sellingPrice || '',
|
|
|
|
|
minimumPrice: data.minimumPrice || '',
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
// Inventory management
|
|
|
|
|
lowStockThreshold: data.lowStockThreshold || '',
|
|
|
|
|
reorderPoint: data.reorderPoint || '',
|
|
|
|
|
reorderQuantity: data.reorderQuantity || '',
|
|
|
|
|
maxStockLevel: data.maxStockLevel || '',
|
|
|
|
|
leadTimeDays: data.leadTimeDays || '',
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
// Product information
|
|
|
|
|
packageSize: data.packageSize || '',
|
|
|
|
|
shelfLifeDays: data.shelfLifeDays || '',
|
|
|
|
|
displayLifeHours: data.displayLifeHours || '',
|
|
|
|
|
storageTempMin: data.storageTempMin || '',
|
|
|
|
|
storageTempMax: data.storageTempMax || '',
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
// Storage and handling
|
|
|
|
|
storageInstructions: data.storageInstructions || '',
|
|
|
|
|
isPerishable: data.isPerishable ?? true,
|
|
|
|
|
handlingInstructions: data.handlingInstructions || '',
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
// Supplier information
|
|
|
|
|
preferredSupplierId: data.preferredSupplierId || '',
|
|
|
|
|
supplierProductCode: data.supplierProductCode || '',
|
|
|
|
|
|
|
|
|
|
// Quality and compliance
|
|
|
|
|
allergenInfo: data.allergenInfo || '',
|
|
|
|
|
nutritionalInfo: data.nutritionalInfo || '',
|
|
|
|
|
certifications: data.certifications || '',
|
|
|
|
|
|
|
|
|
|
// Physical properties
|
|
|
|
|
weight: data.weight || '',
|
|
|
|
|
volume: data.volume || '',
|
|
|
|
|
dimensions: data.dimensions || '',
|
|
|
|
|
color: data.color || '',
|
|
|
|
|
|
|
|
|
|
// Status and tracking
|
|
|
|
|
isActive: data.isActive ?? true,
|
|
|
|
|
trackByLot: data.trackByLot ?? false,
|
|
|
|
|
trackByExpiry: data.trackByExpiry ?? true,
|
|
|
|
|
allowNegativeStock: data.allowNegativeStock ?? false,
|
|
|
|
|
|
|
|
|
|
// Metadata
|
|
|
|
|
notes: data.notes || '',
|
|
|
|
|
tags: data.tags || '',
|
|
|
|
|
customFields: data.customFields || '',
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
});
|
|
|
|
|
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
// Update parent whenever local state changes
|
|
|
|
|
const handleDataChange = (newInventoryData: any) => {
|
|
|
|
|
setInventoryData(newInventoryData);
|
|
|
|
|
onDataChange({ ...data, ...newInventoryData });
|
|
|
|
|
};
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-6">
|
|
|
|
|
<div className="text-center pb-4 border-b border-[var(--border-primary)]">
|
|
|
|
|
<h3 className="text-lg font-semibold text-[var(--text-primary)] mb-2">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
{t('inventory.inventoryDetails')}
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</h3>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<p className="text-sm text-[var(--text-secondary)]">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
{t('inventory.fillRequiredInfo')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</p>
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</div>
|
|
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
{/* Required Fields */}
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
<div className="md:col-span-2">
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
{t('inventory.fields.name')} *
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
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
2025-11-10 07:41:26 +00:00
|
|
|
value={inventoryData.name}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, name: e.target.value })}
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
placeholder={t('inventory.fields.namePlaceholder')}
|
2025-11-09 21:25:36 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
{t('inventory.fields.productType')} *
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</label>
|
|
|
|
|
<select
|
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
2025-11-10 07:41:26 +00:00
|
|
|
value={inventoryData.productType}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, productType: e.target.value })}
|
2025-11-09 21:25:36 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
>
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
<option value="ingredient">{t('inventory.productTypes.ingredient')}</option>
|
|
|
|
|
<option value="finished_product">{t('inventory.productTypes.finished_product')}</option>
|
|
|
|
|
<option value="packaging">{t('inventory.productTypes.packaging')}</option>
|
|
|
|
|
<option value="consumable">{t('inventory.productTypes.consumable')}</option>
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
{t('inventory.fields.unitOfMeasure')} *
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</label>
|
|
|
|
|
<select
|
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
2025-11-10 07:41:26 +00:00
|
|
|
value={inventoryData.unitOfMeasure}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, unitOfMeasure: e.target.value })}
|
2025-11-09 21:25:36 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
>
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
<option value="">{t('inventory.units.select')}</option>
|
|
|
|
|
<option value="kg">{t('inventory.units.kg')}</option>
|
|
|
|
|
<option value="g">{t('inventory.units.g')}</option>
|
|
|
|
|
<option value="l">{t('inventory.units.l')}</option>
|
|
|
|
|
<option value="ml">{t('inventory.units.ml')}</option>
|
|
|
|
|
<option value="units">{t('inventory.units.units')}</option>
|
|
|
|
|
<option value="dozen">{t('inventory.units.dozen')}</option>
|
|
|
|
|
<option value="lb">{t('inventory.units.lb')}</option>
|
|
|
|
|
<option value="oz">{t('inventory.units.oz')}</option>
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
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
2025-11-10 07:41:26 +00:00
|
|
|
{/* Basic Information */}
|
|
|
|
|
<div className="border-t border-[var(--border-primary)] pt-4">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
<h4 className="text-sm font-semibold text-[var(--text-primary)] mb-3">{t('inventory.sections.basicInformation')}</h4>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
{t('inventory.fields.sku')} ({t('common.optional')})
|
|
|
|
|
<Tooltip content={t('inventory.fields.skuTooltip')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
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
2025-11-10 07:41:26 +00:00
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.sku}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, sku: e.target.value })}
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
placeholder={t('inventory.fields.skuPlaceholder')}
|
2025-11-09 21:25:36 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Implement i18n in InventoryWizard component (partial)
IMPLEMENTATION: Added react-i18next translations to InventoryWizard
following the pattern from ItemTypeSelector
CHANGES IMPLEMENTED:
- Added useTranslation('wizards') hook
- Translated header section (title + description)
- Translated required fields:
* Name field with placeholder
* Product Type dropdown (all 4 options)
* Unit of Measure dropdown (all 8 units)
- Translated Basic Information section:
* SKU field with tooltip
* Barcode field
- Used common translations (optional, etc.)
TRANSLATIONS USED:
- inventory.inventoryDetails → "Inventory Item Details"
- inventory.fillRequiredInfo → Localized descriptions
- inventory.fields.name → "Name"
- inventory.fields.namePlaceholder → "E.g., All-Purpose Flour..."
- inventory.productTypes.* → All product types
- inventory.units.* → All units (kg, g, l, ml, units, dozen, lb, oz)
- inventory.fields.sku → "SKU"
- inventory.fields.skuTooltip → Full tooltip text
- common.optional → "Optional"
BENEFITS:
✅ Core inventory fields now multilingual
✅ Works in EN/ES/EU languages
✅ Auto-updates when language changes
✅ User-facing strings now translatable
TESTING:
1. Open Add Inventory wizard
2. Switch language (EN → ES → EU)
3. See header, labels, placeholders, and dropdowns translate
4. Examples:
- EN: "Name", "Product Type", "Unit of Measure"
- ES: "Nombre", "Tipo de Producto", "Unidad de Medida"
- EU: "Izena", "Produktu Mota", "Neurri Unitatea"
This demonstrates i18n working in the actual wizard forms!
Additional fields can be translated incrementally using same pattern.
2025-11-10 12:56:19 +00:00
|
|
|
{t('inventory.fields.barcode')}
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
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
2025-11-10 07:41:26 +00:00
|
|
|
value={inventoryData.barcode}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, barcode: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.barcodePlaceholder')}
|
2025-11-09 21:25:36 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{inventoryData.productType === 'ingredient' ? t('inventory.fields.ingredientCategory') : t('inventory.fields.productCategory')}
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</label>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<select
|
|
|
|
|
value={inventoryData.productType === 'ingredient' ? inventoryData.ingredientCategory : inventoryData.productCategory}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({
|
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
2025-11-10 07:41:26 +00:00
|
|
|
...inventoryData,
|
|
|
|
|
[inventoryData.productType === 'ingredient' ? 'ingredientCategory' : 'productCategory']: e.target.value
|
|
|
|
|
})}
|
2025-11-09 21:25:36 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
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
2025-11-10 07:41:26 +00:00
|
|
|
>
|
|
|
|
|
{inventoryData.productType === 'ingredient' ? (
|
|
|
|
|
<>
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
<option value="">{t('inventory.ingredientCategories.select')}</option>
|
|
|
|
|
<option value="flour">{t('inventory.ingredientCategories.flour')}</option>
|
|
|
|
|
<option value="dairy">{t('inventory.ingredientCategories.dairy')}</option>
|
|
|
|
|
<option value="eggs">{t('inventory.ingredientCategories.eggs')}</option>
|
|
|
|
|
<option value="fats">{t('inventory.ingredientCategories.fats')}</option>
|
|
|
|
|
<option value="sweeteners">{t('inventory.ingredientCategories.sweeteners')}</option>
|
|
|
|
|
<option value="additives">{t('inventory.ingredientCategories.additives')}</option>
|
|
|
|
|
<option value="fruits">{t('inventory.ingredientCategories.fruits')}</option>
|
|
|
|
|
<option value="nuts">{t('inventory.ingredientCategories.nuts')}</option>
|
|
|
|
|
<option value="spices">{t('inventory.ingredientCategories.spices')}</option>
|
|
|
|
|
<option value="leavening">{t('inventory.ingredientCategories.leavening')}</option>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
<option value="">{t('inventory.productCategories.select')}</option>
|
|
|
|
|
<option value="bread">{t('inventory.productCategories.bread')}</option>
|
|
|
|
|
<option value="pastry">{t('inventory.productCategories.pastry')}</option>
|
|
|
|
|
<option value="cake">{t('inventory.productCategories.cake')}</option>
|
|
|
|
|
<option value="cookies">{t('inventory.productCategories.cookies')}</option>
|
|
|
|
|
<option value="specialty">{t('inventory.productCategories.specialty')}</option>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</select>
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.brand')}
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
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
2025-11-10 07:41:26 +00:00
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.brand}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, brand: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.brandPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="md:col-span-2">
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.description')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<textarea
|
|
|
|
|
value={inventoryData.description}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, description: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.descriptionPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
rows={2}
|
2025-11-09 21:25:36 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
|
|
|
|
|
{/* Advanced Options */}
|
|
|
|
|
<AdvancedOptionsSection
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
title={t('inventory.sections.advancedOptions')}
|
|
|
|
|
description={t('inventory.sections.advancedOptionsDescription')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
>
|
|
|
|
|
{/* Pricing Information */}
|
|
|
|
|
<div className="space-y-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.pricingInformation')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.averageCost')}
|
|
|
|
|
<Tooltip content={t('tooltips.averageCost')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.averageCost}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, averageCost: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="0.00"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.lastPurchasePrice')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.lastPurchasePrice}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, lastPurchasePrice: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="0.00"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.standardCost')}
|
|
|
|
|
<Tooltip content={t('tooltips.standardCost')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.standardCost}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, standardCost: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="0.00"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.sellingPrice')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.sellingPrice}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, sellingPrice: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="0.00"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.minimumPrice')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.minimumPrice}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, minimumPrice: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="0.00"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Inventory Management */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.inventoryManagement')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.lowStockThreshold')}
|
|
|
|
|
<Tooltip content={t('tooltips.lowStockThreshold')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.lowStockThreshold}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, lowStockThreshold: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="10"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.reorderPoint')}
|
|
|
|
|
<Tooltip content={t('tooltips.reorderPoint')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.reorderPoint}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, reorderPoint: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="20"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.reorderQuantity')}
|
|
|
|
|
<Tooltip content={t('tooltips.reorderQuantity')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.reorderQuantity}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, reorderQuantity: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="100"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.maxStockLevel')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.maxStockLevel}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, maxStockLevel: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="500"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.leadTimeDays')}
|
|
|
|
|
<Tooltip content={t('tooltips.leadTime')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.leadTimeDays}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, leadTimeDays: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="7"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Product Information */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.productInformation')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.packageSize')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.packageSize}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, packageSize: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.packageSizePlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.shelfLifeDays')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.shelfLifeDays}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, shelfLifeDays: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="365"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.displayLifeHours')}
|
|
|
|
|
<Tooltip content={t('tooltips.displayLife')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.displayLifeHours}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, displayLifeHours: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="24"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.storageTempRange')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<div className="flex gap-2">
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.storageTempMin}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, storageTempMin: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.storageTempMin')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
step="0.1"
|
|
|
|
|
className="w-1/2 px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.storageTempMax}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, storageTempMax: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.storageTempMax')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
step="0.1"
|
|
|
|
|
className="w-1/2 px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Storage & Handling */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.storageAndHandling')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.storageInstructions')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<textarea
|
|
|
|
|
value={inventoryData.storageInstructions}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, storageInstructions: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.storageInstructionsPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
rows={2}
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.handlingInstructions')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<textarea
|
|
|
|
|
value={inventoryData.handlingInstructions}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, handlingInstructions: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.handlingInstructionsPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
rows={2}
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
checked={inventoryData.isPerishable}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, isPerishable: e.target.checked })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="rounded border-[var(--border-secondary)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
<label className="text-sm text-[var(--text-secondary)]">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.isPerishable')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Supplier Information */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.supplierInformation')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.preferredSupplierId')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.preferredSupplierId}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, preferredSupplierId: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.preferredSupplierIdPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.supplierProductCode')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.supplierProductCode}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, supplierProductCode: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.supplierProductCodePlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Quality & Compliance */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.qualityAndCompliance')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.allergenInfo')}
|
|
|
|
|
<Tooltip content={t('tooltips.allergenInfo')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.allergenInfo}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, allergenInfo: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.allergenInfoPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.nutritionalInfo')}
|
|
|
|
|
<Tooltip content={t('tooltips.nutritionalInfo')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.nutritionalInfo}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, nutritionalInfo: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.nutritionalInfoPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.certifications')}
|
|
|
|
|
<Tooltip content={t('tooltips.certifications')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.certifications}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, certifications: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.certificationsPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Physical Properties */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.physicalProperties')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.weight')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.weight}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, weight: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="0.00"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.volume')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
value={inventoryData.volume}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, volume: e.target.value })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
placeholder="0.00"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.dimensions')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.dimensions}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, dimensions: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.dimensionsPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.color')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.color}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, color: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.colorPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Status & Tracking */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.statusAndTracking')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
checked={inventoryData.isActive}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, isActive: e.target.checked })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="rounded border-[var(--border-secondary)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
<label className="text-sm text-[var(--text-secondary)]">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.isActive')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
checked={inventoryData.trackByLot}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, trackByLot: e.target.checked })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="rounded border-[var(--border-secondary)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
<label className="text-sm text-[var(--text-secondary)]">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.trackByLot')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
checked={inventoryData.trackByExpiry}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, trackByExpiry: e.target.checked })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="rounded border-[var(--border-secondary)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
<label className="text-sm text-[var(--text-secondary)]">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.trackByExpiry')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<input
|
|
|
|
|
type="checkbox"
|
|
|
|
|
checked={inventoryData.allowNegativeStock}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, allowNegativeStock: e.target.checked })}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="rounded border-[var(--border-secondary)] text-[var(--color-primary)] focus:ring-[var(--color-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
<label className="text-sm text-[var(--text-secondary)]">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.allowNegativeStock')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Additional Information */}
|
|
|
|
|
<div className="space-y-4 border-t border-[var(--border-primary)] pt-4">
|
|
|
|
|
<h5 className="text-xs font-semibold text-[var(--text-secondary)] uppercase tracking-wider">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.sections.additionalInformation')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</h5>
|
|
|
|
|
<div className="grid grid-cols-1 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.notes')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
</label>
|
|
|
|
|
<textarea
|
|
|
|
|
value={inventoryData.notes}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, notes: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.notesPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
rows={3}
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.tags')}
|
|
|
|
|
<Tooltip content={t('tooltips.tags')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
value={inventoryData.tags}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, tags: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.tagsPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label className="block text-sm font-medium text-[var(--text-secondary)] mb-2">
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
{t('inventory.fields.customFields')}
|
|
|
|
|
<Tooltip content={t('tooltips.customFields')}>
|
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
2025-11-10 07:41:26 +00:00
|
|
|
<Info className="inline w-4 h-4 ml-1 text-[var(--text-tertiary)]" />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</label>
|
|
|
|
|
<textarea
|
|
|
|
|
value={inventoryData.customFields}
|
fix: Critical - Remove infinite re-render loops from all wizards
CRITICAL BUG FIX: The useEffect hooks syncing wizard state with parent were
causing infinite re-render loops, completely blocking all UI interactions
(text inputs, clicks, selections, etc.).
Root cause: useEffect(() => onDataChange({...data, ...localState}), [localState])
creates infinite loop because localState is recreated on every render, triggering
the effect again, which updates parent, which re-renders component, repeat forever.
Solution: Remove problematic useEffect sync hooks and instead:
1. Create handler functions that update both local state AND parent state together
2. Call these handlers directly in onChange events (not in useEffect)
3. Only sync auto-generated fields (SKU, order number) in useEffect with proper deps
Files fixed:
- InventoryWizard.tsx: Added handleDataChange() function, updated all onChange
- QualityTemplateWizard.tsx: Added handleDataChange() function, updated all onChange
- CustomerOrderWizard.tsx: Fixed all 3 steps:
* Step 1: handleCustomerChange(), handleNewCustomerChange()
* Step 2: updateOrderItems()
* Step 3: handleOrderDataChange()
Testing: All text inputs, select dropdowns, checkboxes, and buttons now work correctly.
UI is responsive and performant without infinite re-rendering.
This was blocking all user interactions - highest priority fix.
2025-11-10 09:50:33 +00:00
|
|
|
onChange={(e) => handleDataChange({ ...inventoryData, customFields: e.target.value })}
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
placeholder={t('inventory.fields.customFieldsPlaceholder')}
|
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
2025-11-10 07:41:26 +00:00
|
|
|
rows={2}
|
|
|
|
|
className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] bg-[var(--bg-primary)] text-[var(--text-primary)] font-mono text-xs"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</AdvancedOptionsSection>
|
feat: Add JTBD-driven Unified Add Wizard system
Implemented a comprehensive unified wizard system to consolidate all "add new content"
actions into a single, intuitive, step-by-step guided experience based on Jobs To Be Done
(JTBD) methodology.
## What's New
### Core Components
- **UnifiedAddWizard**: Main orchestrator component that routes to specific wizards
- **ItemTypeSelector**: Beautiful visual card-based selection for 9 content types
- **9 Individual Wizards**: Step-by-step flows for each content type
### Priority Implementations (P0)
1. **SalesEntryWizard** ⭐ (MOST CRITICAL)
- Manual entry with dynamic product lists and auto-calculated totals
- File upload placeholder for CSV/Excel bulk import
- Critical for small bakeries without POS systems
2. **InventoryWizard**
- Type selection (ingredient vs finished product)
- Context-aware forms based on inventory type
- Optional initial lot entry
### Placeholder Wizards (P1/P2)
- Customer Order, Supplier, Recipe, Customer, Quality Template, Equipment, Team Member
- Proper structure in place for incremental enhancement
### Dashboard Integration
- Added prominent "Agregar" button in dashboard header
- Opens wizard modal with visual type selection
- Auto-refreshes dashboard after wizard completion
### Design Highlights
- Mobile-first responsive design (full-screen on mobile, modal on desktop)
- Touch-friendly with 44px+ touch targets
- Follows existing color system and design tokens
- Progressive disclosure to reduce cognitive load
- Accessibility-compliant (WCAG AA)
## Documentation
Created comprehensive documentation:
- `JTBD_UNIFIED_ADD_WIZARD.md` - Full JTBD analysis and research
- `WIZARD_ARCHITECTURE_DESIGN.md` - Technical design and specifications
- `UNIFIED_WIZARD_IMPLEMENTATION_SUMMARY.md` - Implementation guide
## Files Changed
- New: `frontend/src/components/domain/unified-wizard/` (15 new files)
- Modified: `frontend/src/pages/app/DashboardPage.tsx` (added wizard integration)
## Next Steps
- [ ] Connect wizards to real API endpoints (currently mock/placeholder)
- [ ] Implement full CSV upload for sales entry
- [ ] Add comprehensive form validation
- [ ] Enhance P1 priority wizards based on user feedback
## JTBD Alignment
Main Job: "When I need to expand or update my bakery operations, I want to quickly add
new resources to my management system, so I can keep my business running smoothly."
Key insights applied:
- Prioritized sales entry (most bakeries lack POS)
- Mobile-first (bakery owners are on their feet)
- Progressive disclosure (reduce overwhelm)
- Forgiving interactions (can go back, save drafts)
2025-11-09 08:40:01 +00:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const InventoryWizardSteps = (
|
|
|
|
|
data: Record<string, any>,
|
|
|
|
|
setData: (data: Record<string, any>) => void
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
): WizardStep[] => {
|
|
|
|
|
// Import translation function for step title
|
|
|
|
|
// Note: The title will be displayed dynamically based on user's language preference
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
id: 'inventory-details',
|
|
|
|
|
title: 'inventory.inventoryDetails',
|
|
|
|
|
component: (props) => <InventoryDetailsStep {...props} data={data} onDataChange={setData} />,
|
|
|
|
|
validate: () => {
|
|
|
|
|
return !!(data.name && data.unitOfMeasure && data.productType);
|
|
|
|
|
},
|
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
2025-11-10 07:41:26 +00:00
|
|
|
},
|
feat: Complete InventoryWizard i18n translation with extended field support
Add comprehensive translation keys for all inventory wizard fields and complete
the InventoryWizard component translation from English/Spanish/Basque.
Translation additions (en/es/eu):
- Extended inventory.fields with 48 new field labels and placeholders:
* Pricing fields (averageCost, standardCost, sellingPrice, minimumPrice)
* Inventory management fields (lowStockThreshold, reorderPoint, etc.)
* Product info fields (packageSize, shelfLifeDays, displayLifeHours, etc.)
* Storage fields (storageInstructions, handlingInstructions, isPerishable)
* Supplier fields (preferredSupplierId, supplierProductCode)
* Quality fields (allergenInfo, nutritionalInfo, certifications)
* Physical properties (weight, volume, dimensions, color)
* Status tracking (isActive, trackByLot, trackByExpiry, allowNegativeStock)
* Additional fields (notes, tags, customFields)
- Added ingredientCategories with 10 options (flour, dairy, eggs, fats, etc.)
- Added productCategories with 5 options (bread, pastry, cake, cookies, specialty)
InventoryWizard implementation:
- Translated all section headers (11 sections)
- Translated all field labels (58 fields)
- Translated all placeholder texts (35 placeholders)
- Translated all tooltips using tooltips namespace (11 tooltips)
- Translated ingredient and product category options (15 total)
- Translated wizard step title
Result: Fully internationalized InventoryWizard with complete en/es/eu support
covering all required fields, advanced options, and dynamic category selection.
2025-11-10 13:06:04 +00:00
|
|
|
];
|
|
|
|
|
};
|