New Component: ItemComparisonModal.tsx - Shows existing vs new item side-by-side - Highlights fields that are different (in yellow) - Options to Update item or Skip (local-only save) - Shows existing item ID and comparison details Backend Changes: - Updated error message to say 'Part Number' not 'barcode' - 409 response includes existing item data for comparison - Clear, user-friendly conflict messaging Frontend Changes: - New state for comparison modal (newItem, existingItem, existingId) - handleOnboardingComplete() shows modal on 409 conflict - handleComparisonUpdate() calls updateItem() API - handleComparisonSkip() saves locally without syncing - Better error handling distinguishes 409 from other failures Workflow: 1. User imports item with Part Number that already exists 2. System shows comparison modal 3. User can: - Update (merges new data into existing) - Skip (saves locally, doesn't sync to cloud)
8.3 KiB
8.3 KiB