fix: auto add configured device to basket on step 3 transition
All checks were successful
Staging Build / build (push) Successful in 2m46s
All checks were successful
Staging Build / build (push) Successful in 2m46s
This commit is contained in:
@@ -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)
|
const prevStep = () => setStep(s => s - 1)
|
||||||
|
|
||||||
// Abrechnungsmodell wechseln (und Selektionen der Kategorien anpassen)
|
// Abrechnungsmodell wechseln (und Selektionen der Kategorien anpassen)
|
||||||
|
|||||||
Reference in New Issue
Block a user