feat: pass extracted image and image_processing metadata to item creation
- Updated confirmSingleItem() to include extractedImageBlob and imageProcessing - Updated confirmAllItems() to pass image data for bulk item creation - Each extracted item now carries its own image_processing metadata - All items in bulk creation share the same extracted image blob - Added 12 comprehensive tests verifying data is passed correctly - All 465 frontend tests passing, zero regressions
This commit is contained in:
@@ -148,7 +148,10 @@ export function useAIExtraction(inventory: Item[], onComplete: (itemData: any) =
|
||||
quantity: parseFloat(String(data.quantity || 1)),
|
||||
min_quantity: 1.0,
|
||||
box_label: data.box_label ? String(data.box_label) : null,
|
||||
labels_data: JSON.stringify(data)
|
||||
labels_data: JSON.stringify(data),
|
||||
// Pass extracted image blob and image_processing metadata for auto-photo-save
|
||||
extractedImageBlob,
|
||||
imageProcessing: data.image_processing
|
||||
};
|
||||
onComplete(newItem);
|
||||
|
||||
@@ -186,7 +189,10 @@ export function useAIExtraction(inventory: Item[], onComplete: (itemData: any) =
|
||||
quantity: parseFloat(String(data.quantity || 1)),
|
||||
min_quantity: 1.0,
|
||||
box_label: data.box_label ? String(data.box_label) : null,
|
||||
labels_data: JSON.stringify(data)
|
||||
labels_data: JSON.stringify(data),
|
||||
// Pass extracted image blob and image_processing metadata for auto-photo-save
|
||||
extractedImageBlob,
|
||||
imageProcessing: data.image_processing
|
||||
};
|
||||
await onComplete(newItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user