diff --git a/src/app/admin/flows/[id]/page.tsx b/src/app/admin/flows/[id]/page.tsx index 176946e..3256623 100644 --- a/src/app/admin/flows/[id]/page.tsx +++ b/src/app/admin/flows/[id]/page.tsx @@ -11,9 +11,8 @@ import { Textarea } from '@/components/ui/textarea'; import { Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter } from '@/components/ui/card'; import { useToast } from '@/hooks/use-toast'; import Link from 'next/link'; -import { ChevronLeft, Plus } from 'lucide-react'; +import { ChevronLeft } from 'lucide-react'; import { Skeleton } from '@/components/ui/skeleton'; -import { FlowCanvas } from '@/components/admin/flow-canvas'; interface FlowFormPageProps { params: { id: string }; @@ -83,8 +82,10 @@ export default function FlowFormPage({ params }: FlowFormPageProps) { + + + - ) } @@ -107,7 +108,7 @@ export default function FlowFormPage({ params }: FlowFormPageProps) { -
+ Flow Details @@ -133,15 +134,10 @@ export default function FlowFormPage({ params }: FlowFormPageProps) { {getError('description') &&

{getError('description')}

} -
- - {!isNew && ( - - )} - -
+ -
+ + ); diff --git a/src/components/admin/flow-canvas.tsx b/src/components/admin/flow-canvas.tsx deleted file mode 100644 index a4a1659..0000000 --- a/src/components/admin/flow-canvas.tsx +++ /dev/null @@ -1,197 +0,0 @@ - -'use client'; - -import React, { useState } from 'react'; -import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; -import { MoreVertical, Trash2, Edit, Plus, Move } from 'lucide-react'; -import { Button } from '@/components/ui/button'; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/ui/dropdown-menu'; -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, - DialogDescription, - DialogFooter, - DialogClose, -} from '@/components/ui/dialog'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import { Textarea } from '../ui/textarea'; - -type FlowStep = { - id: number; - title: string; - type: string; - description: string; -}; - -// Mock data for the flow steps. -const initialFlowSteps: FlowStep[] = [ - { id: 1, title: 'Project Type', type: 'Step 1', description: 'What are you looking to build?' }, - { id: 2, title: 'Service Type', type: 'Step 2', description: 'Choose a service.' }, - { id: 3, title: 'Project Stage', type: 'Step 3', description: 'Choose the stage of your project.' }, - { id: 4, title: 'Design Process', type: 'Step 4', description: 'What type of design process?' }, - { id: 5, title: 'Page Count', type: 'Step 5', description: 'How many pages/screens?' }, - { id: 6, title: 'Animations', type: 'Step 6', description: 'Implement animated elements?' }, - { id: 7, title: 'Illustrations', type: 'Step 7', description: 'Create tailored illustrations?' }, - { id: 8, title: 'Branding', type: 'Step 8', description: 'Have you thought about branding?' }, - { id: 9, title: 'Additional Features', type: 'Step 9', description: 'Develop additional features?' }, - { id: 10, title: 'Shopping Cart', type: 'Step 10', description: 'Need a shopping cart?' }, - { id: 11, title: 'UI/UX Design', type: 'Step 12', description: 'What type of design process?' }, - { id: 12, title: 'Results', type: 'Results', description: 'Show the project estimate.' }, -]; - -function EditStepDialog({ - step, - isOpen, - onOpenChange, - onSave, -}: { - step: FlowStep | null; - isOpen: boolean; - onOpenChange: (isOpen: boolean) => void; - onSave: (updatedStep: FlowStep) => void; -}) { - const [editedStep, setEditedStep] = useState(step); - - React.useEffect(() => { - setEditedStep(step); - }, [step]); - - if (!editedStep) return null; - - const handleSave = () => { - onSave(editedStep); - onOpenChange(false); - }; - - return ( - - - - Edit Step: {step?.title} - - Modify the details for this step in your flow. - - -
-
- - setEditedStep({ ...editedStep, title: e.target.value })} - /> -
-
- -