Start integrating the onboarding flow with backend 11
This commit is contained in:
@@ -36,7 +36,7 @@ const convertProductsToInventory = (approvedProducts: any[]): InventoryItem[] =>
|
||||
current_stock: 0, // To be configured by user
|
||||
min_stock: 1, // Default minimum
|
||||
max_stock: 100, // Default maximum
|
||||
unit: product.unit_of_measure || 'unidad',
|
||||
unit: product.unit_of_measure || 'units',
|
||||
requires_refrigeration: product.requires_refrigeration || false,
|
||||
// Store API data
|
||||
suggestion_id: product.suggestion_id,
|
||||
|
||||
@@ -100,7 +100,7 @@ export const ReviewStep: React.FC<OnboardingStepProps> = ({
|
||||
confidence: 50,
|
||||
status: 'pending' as const,
|
||||
product_type: 'finished_product' as const,
|
||||
unit_of_measure: 'unidad',
|
||||
unit_of_measure: 'units',
|
||||
estimated_shelf_life_days: 7,
|
||||
requires_refrigeration: false,
|
||||
requires_freezing: false,
|
||||
|
||||
@@ -108,10 +108,10 @@ export const useInventorySetup = () => {
|
||||
name: suggestion.suggested_name || suggestion.original_name,
|
||||
category: suggestion.category || 'Sin categoría',
|
||||
description: suggestion.notes || '',
|
||||
unit_of_measure: suggestion.unit_of_measure || 'unidad',
|
||||
minimum_stock_level: 1, // Default minimum stock
|
||||
maximum_stock_level: 100, // Default maximum stock
|
||||
reorder_point: 5, // Default reorder point
|
||||
unit_of_measure: suggestion.unit_of_measure || 'units',
|
||||
low_stock_threshold: 10, // Default low stock threshold
|
||||
reorder_point: 15, // Default reorder point (must be > low_stock_threshold)
|
||||
reorder_quantity: 50, // Default reorder quantity
|
||||
shelf_life_days: suggestion.estimated_shelf_life_days || 30,
|
||||
requires_refrigeration: suggestion.requires_refrigeration || false,
|
||||
requires_freezing: suggestion.requires_freezing || false,
|
||||
|
||||
Reference in New Issue
Block a user