diff --git a/src/components/admin/AdminSidebar.tsx b/src/components/admin/AdminSidebar.tsx index d7d1c9f..2df1cd8 100644 --- a/src/components/admin/AdminSidebar.tsx +++ b/src/components/admin/AdminSidebar.tsx @@ -34,30 +34,34 @@ export function AdminSidebar({ collapsed = false }: { collapsed?: boolean }) { const isActive = (href: string, exact?: boolean) => exact ? pathname === href : pathname === href || pathname.startsWith(href + "/"); - // Text fades out immediately on collapse, but only fades back in once the - // width transition is underway on expand (avoids reflow mid-animation). - const textClass = cn( - "whitespace-nowrap transition-opacity duration-200 delay-150", - collapsed && "opacity-0 pointer-events-none delay-0" - ); + // Shared row layout: full width + gap + label when expanded, icon centered + // (no gap, no padding) when collapsed so nothing pushes the icon off-center. + const rowClass = collapsed ? "justify-center px-0" : "gap-3 px-3"; return ( diff --git a/src/components/admin/leads/LeadTable.tsx b/src/components/admin/leads/LeadTable.tsx index 75d74f3..a91ddc8 100644 --- a/src/components/admin/leads/LeadTable.tsx +++ b/src/components/admin/leads/LeadTable.tsx @@ -14,6 +14,7 @@ import { renameLeadTag, } from "@/app/admin/pipeline/actions"; import type { LeadWithTags, LeadFieldOptions } from "@/lib/admin-queries"; +import { cn } from "@/lib/utils"; const COLUMN_HEADERS = [ "Nome", @@ -26,6 +27,11 @@ const COLUMN_HEADERS = [ "Azioni", ]; const COL_COUNT = COLUMN_HEADERS.length; +const HEADER_ALIGN: Record = { + Stato: "text-center", + Tag: "text-center", + Azioni: "text-right", +}; function StatusCell({ lead, @@ -196,7 +202,7 @@ export function LeadTable({ {COLUMN_HEADERS.map((header) => ( - + {header} ))} @@ -213,6 +219,10 @@ export function LeadTable({ {leads.length === 0 && (
Nessun lead trovato
)} + +
+ Mostrando {leads.length} lead +
); } diff --git a/src/components/admin/leads/LeadsKanbanBoard.tsx b/src/components/admin/leads/LeadsKanbanBoard.tsx index 4288ef6..ddbbf92 100644 --- a/src/components/admin/leads/LeadsKanbanBoard.tsx +++ b/src/components/admin/leads/LeadsKanbanBoard.tsx @@ -15,6 +15,7 @@ import { } from "@dnd-kit/core"; import { updateLeadField } from "@/app/admin/pipeline/actions"; import type { LeadWithTags } from "@/lib/admin-queries"; +import { StatusBadge } from "@/components/ui/StatusBadge"; type LeadStage = "contacted" | "qualified" | "proposal_sent" | "negotiating" | "won" | "lost"; @@ -65,7 +66,7 @@ function DroppableColumn({
{leads.map((lead) => ( - + ))} {leads.length === 0 && (

@@ -77,7 +78,15 @@ function DroppableColumn({ ); } -function DraggableLeadCard({ lead, isActive }: { lead: LeadWithTags; isActive: boolean }) { +function DraggableLeadCard({ + lead, + status, + isActive, +}: { + lead: LeadWithTags; + status: LeadStage; + isActive: boolean; +}) { const { attributes, listeners, setNodeRef, transform, isDragging } = useDraggable({ id: lead.id }); const style = transform @@ -94,9 +103,15 @@ function DraggableLeadCard({ lead, isActive }: { lead: LeadWithTags; isActive: b isDragging ? "opacity-30" : "hover:border-primary/30 hover:shadow-card-hover" }`} > -

{lead.name}

+
+

{lead.name}

+ +
+ {lead.email && ( +

{lead.email}

+ )} {lead.company && ( -

{lead.company}

+

{lead.company}

)} {lead.next_action && (

{lead.next_action}