From b13a447c642c61ce63565a6dc368cd4405c58f4b Mon Sep 17 00:00:00 2001 From: Jandl-hostacny Date: Wed, 21 Oct 2026 13:02:31 +0200 Subject: [PATCH] feat: menitelny pocet produktov vo vernostnych zlavach Tlacidlo Pridat produkt (novy produkt sa hned otvori) a mazanie produktu; karty sa radia po 2 na riadok. Co-Authored-By: Claude Opus 5.5 --- src/components/editor/ConfigPanel.tsx | 39 ++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/src/components/editor/ConfigPanel.tsx b/src/components/editor/ConfigPanel.tsx index 3e669c8..6562367 100644 --- a/src/components/editor/ConfigPanel.tsx +++ b/src/components/editor/ConfigPanel.tsx @@ -870,11 +870,41 @@ export const ConfigPanel: React.FC = ({ - {/* Vernostné produkty */} + {/* Vernostné produkty (ľubovoľný počet, 2 na riadok) */}
- - Vernostné produkty ({module.data.products?.length || 0}) - +
+ + Vernostné produkty ({module.data.products?.length || 0}) + + +
{(module.data.products || []).map((p: CardProduct, pIdx: number) => ( = ({ onToggle={() => onSelectProduct?.(selectedProductId === p.id ? null : p.id)} availableBadges={availableBadges || []} onChange={(patch) => updateProduct(pIdx, patch)} + onDelete={() => updateData({ products: (module.data.products || []).filter((_: CardProduct, i: number) => i !== pIdx) })} onOpenBadgeEditor={onOpenBadgeManager ? () => onOpenBadgeManager(p.id) : undefined} onApplyBadgeToSection={() => applyBadgeToSection(p)} onApplyBadgeToAll={onApplyBadgeToAll ? () => applyBadgeToAll(p, 'loyalty') : undefined}