Compare commits
2 Commits
c8183abff7
...
0679fdfdd7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0679fdfdd7 | ||
|
|
0ecb16daff |
@@ -182,6 +182,7 @@ export function CreateProductDialog({
|
|||||||
<form onSubmit={form.handleSubmit(onSubmit)} className="flex flex-col gap-4 overflow-hidden flex-1 min-h-0">
|
<form onSubmit={form.handleSubmit(onSubmit)} className="flex flex-col gap-4 overflow-hidden flex-1 min-h-0">
|
||||||
<div className="flex-1 overflow-y-auto pr-4 space-y-6 py-4 min-h-0">
|
<div className="flex-1 overflow-y-auto pr-4 space-y-6 py-4 min-h-0">
|
||||||
{/* Step Indicator */}
|
{/* Step Indicator */}
|
||||||
|
{!product && (
|
||||||
<div className="flex justify-between items-center mb-6 border-b border-slate-100 dark:border-white/5 pb-4">
|
<div className="flex justify-between items-center mb-6 border-b border-slate-100 dark:border-white/5 pb-4">
|
||||||
{[
|
{[
|
||||||
{ nr: 1, label: 'Allgemein' },
|
{ nr: 1, label: 'Allgemein' },
|
||||||
@@ -204,7 +205,8 @@ export function CreateProductDialog({
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{step === 1 && (
|
)}
|
||||||
|
{(product || step === 1) && (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -274,7 +276,9 @@ export function CreateProductDialog({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{step === 2 && (
|
{product && <Separator className="bg-slate-200 dark:bg-white/10" />}
|
||||||
|
|
||||||
|
{(product || step === 2) && (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
@@ -309,7 +313,9 @@ export function CreateProductDialog({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{step === 3 && (
|
{product && <Separator className="bg-slate-200 dark:bg-white/10" />}
|
||||||
|
|
||||||
|
{(product || step === 3) && (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -375,7 +381,9 @@ export function CreateProductDialog({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{step === 4 && (
|
{product && <Separator className="bg-slate-200 dark:bg-white/10" />}
|
||||||
|
|
||||||
|
{(product || step === 4) && (
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
{/* Product Requirements */}
|
{/* Product Requirements */}
|
||||||
<FormField
|
<FormField
|
||||||
@@ -471,7 +479,9 @@ export function CreateProductDialog({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{step === 5 && (
|
{product && <Separator className="bg-slate-200 dark:bg-white/10" />}
|
||||||
|
|
||||||
|
{(product || step === 5) && (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<h3 className="text-lg font-semibold flex items-center gap-2">
|
<h3 className="text-lg font-semibold flex items-center gap-2">
|
||||||
@@ -695,6 +705,17 @@ export function CreateProductDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter className="pt-4 border-t border-slate-200 dark:border-white/10 flex justify-between items-center sm:justify-between">
|
<DialogFooter className="pt-4 border-t border-slate-200 dark:border-white/10 flex justify-between items-center sm:justify-between">
|
||||||
|
{product ? (
|
||||||
|
<>
|
||||||
|
<Button type="button" variant="ghost" onClick={() => setOpen(false)} className="text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white">
|
||||||
|
Abbrechen
|
||||||
|
</Button>
|
||||||
|
<Button type="submit" className="bg-primary hover:bg-primary/90 text-white">
|
||||||
|
Speichern
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
{step > 1 ? (
|
{step > 1 ? (
|
||||||
<Button type="button" variant="outline" onClick={() => setStep(prev => prev - 1)}>
|
<Button type="button" variant="outline" onClick={() => setStep(prev => prev - 1)}>
|
||||||
@@ -717,6 +738,8 @@ export function CreateProductDialog({
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
Reference in New Issue
Block a user