mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 13:35:25 +02:00
feat: include empty classification in missing data view and improve pricing view column detection
This commit is contained in:
@@ -167,7 +167,7 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit,
|
||||
}, [resizingColumn, resizeStartX, resizeStartWidth]);
|
||||
|
||||
// ── Dynamic column detection ──────────────────────────────────────────────
|
||||
const { uvpIdx, srpCols, containerCols } = useMemo(() => {
|
||||
const { uvpIdx, srpCols, containerCols, nwIdx, gwIdx } = useMemo(() => {
|
||||
const uvpIdx = findCol(headers, 'uvp');
|
||||
|
||||
// All SRP columns, sorted: INT first, UK second, then alphabetically
|
||||
@@ -188,7 +188,11 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit,
|
||||
.map((h, i) => ({ index: i, name: h || '' }))
|
||||
.filter(({ name }) => /40/i.test(name) && /h[cq]/i.test(name));
|
||||
|
||||
return { uvpIdx, srpCols: srp, containerCols: container };
|
||||
// Net weight / Gross weight columns
|
||||
const nwIdx = findCol(headers, 'nw');
|
||||
const gwIdx = findCol(headers, 'gw');
|
||||
|
||||
return { uvpIdx, srpCols: srp, containerCols: container, nwIdx, gwIdx };
|
||||
}, [headers]);
|
||||
|
||||
// ── Error analysis per row ────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user