From 3d89b2538a1fd0901dd02896912ba98c9d6a1e35 Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Tue, 28 Apr 2026 09:22:03 +0200 Subject: [PATCH] fix: add missing column patterns to types --- src/components/PricingView.tsx | 12 +++++++----- src/types.ts | 7 +++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/PricingView.tsx b/src/components/PricingView.tsx index 2bcc1df..0a57b75 100644 --- a/src/components/PricingView.tsx +++ b/src/components/PricingView.tsx @@ -195,12 +195,12 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit, }).slice(0, 50); }, [data, search, selectedSearchItems, COLUMNS]); - const handleSearchItemClick = (index: number) => { + const handleSearchItemClick = (sku: string) => { const newSelected = new Set(selectedSearchItems); - if (newSelected.has(index)) { - newSelected.delete(index); + if (newSelected.has(sku)) { + newSelected.delete(sku); } else { - newSelected.add(index); + newSelected.add(sku); } setSelectedSearchItems(newSelected); }; @@ -1041,6 +1041,7 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit, {openFilter === 'global' && (
setOpenFilter(null)} @@ -2286,11 +2287,12 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit, } // ── Text filter popover ─────────────────────────────────────────────────────── -function TextFilterPopover({ value, onChange, onClose, triggerId }: { +function TextFilterPopover({ value, onChange, onClose, triggerId, zIndex = 9999 }: { value: { terms: string[]; op: 'and' | 'or' }; onChange: (v: { terms: string[]; op: 'and' | 'or' }) => void; onClose: () => void; triggerId: string; + zIndex?: number; }) { const [position, setPosition] = useState({ top: 0, left: 0 }); diff --git a/src/types.ts b/src/types.ts index 2feebc2..92ea359 100644 --- a/src/types.ts +++ b/src/types.ts @@ -74,6 +74,13 @@ export const COLUMN_PATTERNS: Record = { OUTER_W: ['outer', 'w'], OUTER_L: ['outer', 'l'], OUTER_H: ['outer', 'h'], + VERIFIED_DIMS: ['verified', 'dims'], + VALIDATED_CHECK: ['validated', 'check'], + VALIDATED_NOTE: ['validated', 'note'], + PRODUCT_TYPE: ['product', 'type'], + ITEM_TO_LOGISTIC: ['item', 'logistic'], + ANNA_CHECK: ['anna', 'check'], + ANNA_NOTE: ['anna', 'note'], // Virtual/Extra columns stay hardcoded and are NOT auto-detected from headers // to prevent internal data from being shifted or overwritten by Excel column shifts. };