From 1478c61ea80b1d429eee5c11b77c98ba77f21c71 Mon Sep 17 00:00:00 2001 From: DanielS Date: Tue, 11 Aug 2026 17:26:49 +0200 Subject: [PATCH] feat(wizard): move progress stepper to left sidebar --- shop/components/order-wizard.tsx | 215 +++++++++----------- shop/components/wizard/progress-stepper.tsx | 60 +++++- shop/components/wizard/step-summary.tsx | 35 +--- shop/components/wizard/summary-sidebar.tsx | 23 +-- 4 files changed, 164 insertions(+), 169 deletions(-) diff --git a/shop/components/order-wizard.tsx b/shop/components/order-wizard.tsx index 3d2104c..3510362 100644 --- a/shop/components/order-wizard.tsx +++ b/shop/components/order-wizard.tsx @@ -844,138 +844,110 @@ export function OrderWizard({ } return ( -
- {/* Dynamic Header */} - {step !== 3 && ( -
-

- Konfigurieren Sie Ihre Lösung -

-

- Wählen Sie das passende Paket und die benötigten Module für Ihr Business. -

+
+
+ {/* Left Side Status Stepper for ALL steps */} +
+
+

+ Fortschritt +

+

+ Bestell-Wizard +

+
+
- )} - {/* Global Stepper for Steps 1, 2, 4 */} - {step !== 3 && ( -
- -
- )} + {/* Right Main Content Column */} +
+ {/* Dynamic Header */} + {step !== 3 && ( +
+

+ Konfigurieren Sie Ihre Lösung +

+

+ Wählen Sie das passende Paket und die benötigten Module für Ihr Business. +

+
+ )} - - {/* Step 1: Customer */} - {step === 1 && ( - - - - )} + + {/* Step 1: Customer */} + {step === 1 && ( + + + + )} - {/* Step 2: Billing Model */} - {step === 2 && ( - - - - )} - {/* Step 3: Software Selector */} + {/* Step 2: Billing Model */} + {step === 2 && ( + + + + )} {step === 3 && (
- {/* LEFT: Categories Sidebar Menu */} -
-
-

- Konfigurieren Sie Ihre Lösung -

-

- Wählen Sie das passende Paket und die benötigten Module für Ihr Business. -

-
+ {/* LEFT inside step 3: Categories Sidebar Menu */} +
+
+

+ Kategorien & Optionen +

+

+ Wählen Sie das passende Paket und die benötigten Module für Ihr Business. +

+
- {/* Left Sidebar Status Stepper (matching ProgressStepper sky-blue design) */} -
-

- Status -

-
-
-
- -
- Kunde -
-
-
-
- -
- Modell -
-
-
-
- 3 -
- Software -
-
-
-
- 4 -
- Abschluss -
-
-
- -
+
{visibleCategories.map((cat) => { const sel = selections[cat.id] const hasSelection = (sel?.productIds && sel.productIds.length > 0) || !!sel?.productId @@ -1059,9 +1031,8 @@ export function OrderWizard({
- {/* RIGHT: Stepper Header + Summary sidebar */} -
- + {/* RIGHT: Summary sidebar */} +
setToast(null)} /> +
+
) } diff --git a/shop/components/wizard/progress-stepper.tsx b/shop/components/wizard/progress-stepper.tsx index f571f6c..30b44c6 100644 --- a/shop/components/wizard/progress-stepper.tsx +++ b/shop/components/wizard/progress-stepper.tsx @@ -7,14 +7,70 @@ import { Check } from 'lucide-react' interface ProgressStepperProps { step: number basketItemsCount: number + orientation?: 'horizontal' | 'vertical' } const STEP_LABELS = ['Kunde', 'Modell', 'Software', 'Abschluss'] -export function ProgressStepper({ step, basketItemsCount }: ProgressStepperProps) { - // Calculate progress percentage for active line (Step 1: 0%, Step 2: 33.3%, Step 3: 66.6%, Step 4: 100%) +export function ProgressStepper({ step, basketItemsCount, orientation = 'horizontal' }: ProgressStepperProps) { const progressPercent = ((step - 1) / 3) * 100 + if (orientation === 'vertical') { + return ( +
+ {/* Background Line */} +
+ + {/* Animated Active Line */} + + + {[1, 2, 3, 4].map(s => { + const isDone = step > s + const isActive = step === s + + return ( +
+ + {isDone ? : s} + + + + {STEP_LABELS[s - 1]} + {s === 3 && basketItemsCount > 0 && ( + + {basketItemsCount} + + )} + +
+ ) + })} +
+ ) + } + return (
diff --git a/shop/components/wizard/step-summary.tsx b/shop/components/wizard/step-summary.tsx index d8669cd..bc605db 100644 --- a/shop/components/wizard/step-summary.tsx +++ b/shop/components/wizard/step-summary.tsx @@ -70,7 +70,7 @@ export function StepSummary({
- {/* Header & Status Stepper */} + {/* Header */}
@@ -85,39 +85,6 @@ export function StepSummary({

- - {/* Vertikaler Status-Stepper */} -
-

- Schritt 4 von 4 — Zusammenfassung & Abschluss -

-
-
-
- -
- Kunde -
-
-
- -
- Modell -
-
-
- -
- Software -
-
-
- 4 -
- Abschluss -
-
-
{/* Kunden-Info Card */} diff --git a/shop/components/wizard/summary-sidebar.tsx b/shop/components/wizard/summary-sidebar.tsx index 1fd62c3..464c01c 100644 --- a/shop/components/wizard/summary-sidebar.tsx +++ b/shop/components/wizard/summary-sidebar.tsx @@ -253,14 +253,14 @@ export function SummarySidebar({ {/* Kassen-Liste unten (selectable) */} {basketItems.length > 0 && ( -
+

Kassen ({basketItems.length}):

-
+
{basketItems.map((item, idx) => ( - -