From 0ecb16daff67f3bde9c5d97f106c3074ebd66dd6 Mon Sep 17 00:00:00 2001 From: DanielS Date: Fri, 10 Jul 2026 09:36:30 +0200 Subject: [PATCH] feat(admin): support full view in product edit and wizard steps in product create --- .../admin/create-product-dialog.tsx | 108 +++++++++++------- 1 file changed, 65 insertions(+), 43 deletions(-) diff --git a/shop/components/admin/create-product-dialog.tsx b/shop/components/admin/create-product-dialog.tsx index f17b845..e9f8265 100644 --- a/shop/components/admin/create-product-dialog.tsx +++ b/shop/components/admin/create-product-dialog.tsx @@ -182,29 +182,31 @@ export function CreateProductDialog({
{/* Step Indicator */} -
- {[ - { nr: 1, label: 'Allgemein' }, - { nr: 2, label: 'Abrechnung' }, - { nr: 3, label: 'Sichtbarkeit' }, - { nr: 4, label: 'Abhängigkeiten' }, - { nr: 5, label: 'Module' } - ].map(s => ( -
-
s.nr - ? 'bg-green-500 text-white' - : 'bg-slate-200 dark:bg-slate-800 text-slate-500' - }`}> - {s.nr} + {!product && ( +
+ {[ + { nr: 1, label: 'Allgemein' }, + { nr: 2, label: 'Abrechnung' }, + { nr: 3, label: 'Sichtbarkeit' }, + { nr: 4, label: 'Abhängigkeiten' }, + { nr: 5, label: 'Module' } + ].map(s => ( +
+
s.nr + ? 'bg-green-500 text-white' + : 'bg-slate-200 dark:bg-slate-800 text-slate-500' + }`}> + {s.nr} +
+ {s.label}
- {s.label} -
- ))} -
- {step === 1 && ( + ))} +
+ )} + {(product || step === 1) && (
)} - {step === 2 && ( + {product && } + + {(product || step === 2) && (
)} - {step === 3 && ( + {product && } + + {(product || step === 3) && (
)} - {step === 4 && ( + {product && } + + {(product || step === 4) && (
{/* Product Requirements */} )} - {step === 5 && ( + {product && } + + {(product || step === 5) && (

@@ -695,29 +705,41 @@ export function CreateProductDialog({

-
- {step > 1 ? ( - - ) : ( + {product ? ( + <> - )} -
-
- {step < 5 ? ( - - ) : ( - )} -
-
+ + ) : ( + <> +
+ {step > 1 ? ( + + ) : ( + + )} +
+
+ {step < 5 ? ( + + ) : ( + + )} +
+ + )}