fix: auto add configured device to basket on step 3 transition
All checks were successful
Staging Build / build (push) Successful in 2m46s

This commit is contained in:
DanielS
2026-07-09 23:43:16 +02:00
parent c3f97f8dca
commit db95e435c2

View File

@@ -501,7 +501,15 @@ export function OrderWizard({
})
}
const nextStep = () => setStep(s => s + 1)
const nextStep = () => {
if (step === 3 && allCategoriesFilled && productValidationErrors.length === 0) {
const hasProduct = Object.values(selections).some(sel => sel.productId || (sel.productIds && sel.productIds.length > 0))
if (hasProduct) {
addToBasket()
}
}
setStep(s => s + 1)
}
const prevStep = () => setStep(s => s - 1)
// Abrechnungsmodell wechseln (und Selektionen der Kategorien anpassen)