From 8e4af8e7453fedfcf2b2d6e0e326c620eb061bd7 Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Fri, 18 Jul 2025 05:34:46 +0000 Subject: [PATCH] when you click on edit flows, the whole flow sjould be displayed with an --- src/app/admin/flows/[id]/page.tsx | 72 +++++++++++---------- src/components/admin/flow-canvas.tsx | 95 ++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 32 deletions(-) create mode 100644 src/components/admin/flow-canvas.tsx diff --git a/src/app/admin/flows/[id]/page.tsx b/src/app/admin/flows/[id]/page.tsx index 2cacfb9..96c1963 100644 --- a/src/app/admin/flows/[id]/page.tsx +++ b/src/app/admin/flows/[id]/page.tsx @@ -8,11 +8,12 @@ import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Textarea } from '@/components/ui/textarea'; -import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; +import { Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter } from '@/components/ui/card'; import { useToast } from '@/hooks/use-toast'; import Link from 'next/link'; -import { ChevronLeft } from 'lucide-react'; +import { ChevronLeft, Plus } from 'lucide-react'; import { Skeleton } from '@/components/ui/skeleton'; +import { FlowCanvas } from '@/components/admin/flow-canvas'; interface FlowFormPageProps { params: { id: string }; @@ -93,7 +94,7 @@ export default function FlowFormPage({ params }: FlowFormPageProps) { } return ( -
+
- - - Flow Details - - {isNew ? 'Fill in the details for your new flow.' : 'Update the details for this flow.'} - - - - -
- - - {getError('name') &&

{getError('name')}

} -
-
- - - {getError('path') &&

{getError('path')}

} -
-
- -