From 9f3acd06315cb4dc777e62fc23c98eb42ac06d44 Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Tue, 12 May 2026 12:22:14 +0200 Subject: [PATCH] fix: restore CPNP No. as Excel-resolved column, not virtual CPNP_NO re-added to COLUMN_PATTERNS so resolveColumnIndices maps it to the real Excel column index. Removed it from VIRTUAL_COLS and editableColumns in App.tsx since data comes from the spreadsheet, not Supabase-only storage. Co-Authored-By: claude-flow --- src/App.tsx | 2 -- src/types.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index fe6a3fe..348338d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -180,7 +180,6 @@ export default function App() { [COLUMNS.ITEM_TO_LOGISTIC]: 'Item to Logistic', [COLUMNS.ANNA_CHECK]: 'Anna Check', [COLUMNS.ANNA_NOTE]: 'Anna Note', - [COLUMNS.CPNP_NO]: 'CPNP No.', }; Object.entries(VIRTUAL_COLS).forEach(([idxStr, name]) => { const idx = Number(idxStr); @@ -207,7 +206,6 @@ export default function App() { resolvedCols.VALIDATED_NOTE, resolvedCols.PRODUCT_TYPE, resolvedCols.ITEM_TO_LOGISTIC, - resolvedCols.CPNP_NO ]); headers.forEach((h: any, i: number) => { diff --git a/src/types.ts b/src/types.ts index 909570c..dc9b399 100644 --- a/src/types.ts +++ b/src/types.ts @@ -82,7 +82,7 @@ export const COLUMN_PATTERNS: Record = { ITEM_TO_LOGISTIC: ['item', 'logistic'], ANNA_CHECK: ['anna', 'check'], ANNA_NOTE: ['anna', 'note'], - CPNP_NO: [], + CPNP_NO: ['cpnp'], // 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. };