fix: persist CPNP No. across refreshes by saving as 'edited' and restoring in merge

- saveRowToSupabase now accepts optional status param (default 'pending')
- CosmeticItemsView saves CPNP with status 'edited' so resetAllPendingRows
  does not affect it and it survives the startup merge
- Re-added CPNP_NO to editableColumns so the merge restores it from Supabase

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
Christian Vidal Wolf
2026-05-12 16:03:12 +02:00
co-authored by claude-flow
parent a0b793b797
commit 2961d3f86a
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ export function CosmeticItemsView({ data, headers, onSaveRow, onCaptureState, ro
setEditingCpnp(null);
onCaptureState(`Updated CPNP No. for ${articleNo}`);
onSaveRow(rowIndex, newRow);
const result = await saveRowToSupabase(articleNo, newRow);
const result = await saveRowToSupabase(articleNo, newRow, 'edited');
setSavingCpnp(null);
if (!result.success) {
alert(`Error saving CPNP No. for ${articleNo}: ${result.error}`);