fix(wizard): clear basket items and configuration states after order completion
This commit is contained in:
@@ -796,6 +796,14 @@ export function OrderWizard({
|
|||||||
const result = await res.json()
|
const result = await res.json()
|
||||||
if (result.error) throw new Error(result.error)
|
if (result.error) throw new Error(result.error)
|
||||||
|
|
||||||
|
// Warenkorb & Konfigurations-State vollständig leeren
|
||||||
|
setBasketItems([])
|
||||||
|
setEditingIdx(null)
|
||||||
|
setDeviceName('')
|
||||||
|
setLicenseNumber('')
|
||||||
|
setOrderNotes('')
|
||||||
|
setModuleQuantities({})
|
||||||
|
|
||||||
const firstOrderId = result.orders?.[0]?.id
|
const firstOrderId = result.orders?.[0]?.id
|
||||||
if (firstOrderId) {
|
if (firstOrderId) {
|
||||||
router.push(`/order/success?id=${firstOrderId}`)
|
router.push(`/order/success?id=${firstOrderId}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user