mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 11:45:24 +02:00
feat: enable sorting and filtering on CPNP No. column in Cosmetic Items tab
Show all cosmetic products regardless of CPNP status. Column filter on CPNP No. lets user isolate items with empty value. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
co-authored by
claude-flow
parent
7d37d4777b
commit
19b02812bd
@@ -43,8 +43,6 @@ export function CosmeticItemsView({ data, headers, onSaveRow, onCaptureState, ro
|
||||
data.forEach(row => {
|
||||
const lineVal = String(row[COLUMNS.LINE] ?? '').trim().toUpperCase();
|
||||
if (!COSMETIC_LINES.some(l => lineVal === l)) return;
|
||||
const cpnp = row[COLUMNS.CPNP_NO];
|
||||
if (cpnp !== null && cpnp !== undefined && String(cpnp).trim() !== '') return;
|
||||
|
||||
columns.forEach(({ col }) => {
|
||||
result[col].add(String(row[col] ?? ''));
|
||||
@@ -66,12 +64,6 @@ export function CosmeticItemsView({ data, headers, onSaveRow, onCaptureState, ro
|
||||
return COSMETIC_LINES.some(l => lineVal === l);
|
||||
});
|
||||
|
||||
// Filter: CPNP No. is empty
|
||||
result = result.filter(({ row }) => {
|
||||
const cpnp = row[COLUMNS.CPNP_NO];
|
||||
return cpnp === null || cpnp === undefined || String(cpnp).trim() === '';
|
||||
});
|
||||
|
||||
// Global search
|
||||
if (search) {
|
||||
const terms = search.toLowerCase().split(/\s+/).filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user