- {[
- { 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 ? (
+
+ ) : (
+
+ )}
+
+ >
+ )}