From 7d37d4777b9dad80eba770c2210996f7287aecc1 Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Tue, 12 May 2026 11:51:39 +0200 Subject: [PATCH] fix: ensure saved changes persist across app refreshes by updating status logic and merge check Co-Authored-By: claude-flow --- src/components/CosmeticItemsView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/CosmeticItemsView.tsx b/src/components/CosmeticItemsView.tsx index 9148ca4..2cb08fe 100644 --- a/src/components/CosmeticItemsView.tsx +++ b/src/components/CosmeticItemsView.tsx @@ -42,8 +42,9 @@ export function CosmeticItemsView({ data, headers, onSaveRow, onCaptureState, ro data.forEach(row => { const lineVal = String(row[COLUMNS.LINE] ?? '').trim().toUpperCase(); - const isCosmeticLine = COSMETIC_LINES.some(l => lineVal === l); - if (!isCosmeticLine) return; + 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] ?? ''));