Build [v1.5.0] - Box Management & Label Printing
This commit is contained in:
@@ -19,6 +19,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
|
||||
// Extract unique item types for suggestions
|
||||
const existingTypes = Array.from(new Set(inventory.map(i => i.type).filter(Boolean))).sort() as string[];
|
||||
const existingBoxes = Array.from(new Set(inventory.map(i => i.box_label).filter(Boolean))).sort() as string[];
|
||||
|
||||
const cameraInputRef = useRef<HTMLInputElement>(null);
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
@@ -71,6 +72,7 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
barcode: String(extractedData.barcode || extractedData.part_number || extractedData.serial_number || `AI-${Date.now()}`),
|
||||
quantity: parseFloat(String(extractedData.quantity || 1)),
|
||||
min_quantity: 1.0,
|
||||
box_label: extractedData.box_label ? String(extractedData.box_label) : null,
|
||||
labels_data: JSON.stringify(extractedData)
|
||||
};
|
||||
onComplete(newItem);
|
||||
@@ -229,6 +231,19 @@ export default function AIOnboarding({ onCancel, onComplete, categories, invento
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-slate-900/80 p-5 rounded-[1.5rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
<label className="text-xs text-slate-500 font-bold mb-1 block group-focus-within:text-primary transition-colors">Box / Container Label</label>
|
||||
<input
|
||||
value={extractedData.box_label || ''}
|
||||
list="onboarding-boxes"
|
||||
onChange={(e) => setExtractedData({...extractedData, box_label: e.target.value})}
|
||||
className="bg-transparent w-full font-bold outline-none text-slate-200"
|
||||
placeholder="e.g. Box 1"
|
||||
/>
|
||||
<datalist id="onboarding-boxes">
|
||||
{existingBoxes.map(b => <option key={b} value={b} />)}
|
||||
</datalist>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-slate-900/80 p-5 rounded-[1.5rem] border border-slate-800 focus-within:border-primary/50 transition-colors group">
|
||||
|
||||
Reference in New Issue
Block a user