Compare commits
2 Commits
98b1301e96
...
db95e435c2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db95e435c2 | ||
|
|
c3f97f8dca |
@@ -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)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
-- Migration: Add missing type and payment_method columns to orders table
|
||||
-- Purpose: Ensure physical columns type and payment_method exist on public.orders for checkout split support.
|
||||
|
||||
ALTER TABLE public.orders ADD COLUMN IF NOT EXISTS type TEXT NOT NULL DEFAULT 'purchase' CHECK (type IN ('purchase', 'subscription'));
|
||||
ALTER TABLE public.orders ADD COLUMN IF NOT EXISTS payment_method TEXT;
|
||||
|
||||
NOTIFY pgrst, 'reload schema';
|
||||
Reference in New Issue
Block a user