feat(10-02): implement lead management UI with list, detail, and form pages
- Create /admin/leads list page with LeadTable component showing all leads - Implement /admin/leads/[id] detail page with activity log and reminders - Add LeadForm component (CreateLeadModal and EditLeadModal) for CRUD operations - Create server actions (createLead, updateLead, deleteLead) with Zod validation - Add missing UI components (dialog.tsx, form.tsx) from shadcn - Install date-fns for date formatting with Italian locale support - All routes compile successfully with npm run build Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { Suspense } from "react";
|
||||
import { getAllLeads } from "@/lib/lead-service";
|
||||
import { LeadTable } from "@/components/admin/leads/LeadTable";
|
||||
import { CreateLeadModal } from "@/components/admin/leads/LeadForm";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
async function LeadsList() {
|
||||
const leads = await getAllLeads();
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="flex justify-between items-center">
|
||||
<h1 className="text-3xl font-bold">Lead Pipeline</h1>
|
||||
<CreateLeadModal />
|
||||
</div>
|
||||
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<LeadTable leads={leads} />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function LeadsPage() {
|
||||
return <LeadsList />;
|
||||
}
|
||||
Reference in New Issue
Block a user