From dfdb5d90247f51a78aaf6f7ba3935385facc5d72 Mon Sep 17 00:00:00 2001 From: DanielS Date: Wed, 22 Jul 2026 17:23:19 +0200 Subject: [PATCH] feat(shop): reset customer on partner change and enforce customer selection --- shop/components/wizard/step-customer.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/shop/components/wizard/step-customer.tsx b/shop/components/wizard/step-customer.tsx index 396dd75..a44efa0 100644 --- a/shop/components/wizard/step-customer.tsx +++ b/shop/components/wizard/step-customer.tsx @@ -202,7 +202,10 @@ export function StepCustomer({
{/* Reserved Fixed Card: Alle Partner */}
setSelectedCompanyId('all')} + onClick={() => { + setSelectedCompanyId('all') + setSelectedEndCustomerId(null) + }} className={`flex items-center justify-between p-3.5 rounded-xl border-2 cursor-pointer transition-all select-none ${ selectedCompanyId === 'all' || !selectedCompanyId ? 'border-primary bg-primary/10 shadow-lg shadow-primary/5' @@ -240,7 +243,10 @@ export function StepCustomer({ return (
setSelectedCompanyId(c.id)} + onClick={() => { + setSelectedCompanyId(c.id) + setSelectedEndCustomerId(null) + }} className={`flex items-center justify-between p-3.5 rounded-xl border-2 cursor-pointer transition-all select-none ${ isSelected ? 'border-primary bg-primary/10 shadow-lg shadow-primary/5' @@ -592,9 +598,7 @@ export function StepCustomer({ onClick={nextStep} disabled={ customerMode === 'create' || - (customerMode === 'select' && - customersByCompany.length > 0 && - !selectedEndCustomerId) + !selectedEndCustomerId } > Weiter zum Abrechnungsmodell