"use client"; import { motion } from 'motion/react'; import { Card900, CardContent } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { ExternalLink, MoreHorizontal } from 'lucide-react'; import Link from 'next/link'; import { LazyImage } from '@/components/ui/lazy-image'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { Tooltip, TooltipContent, TooltipTrigger, } from '@/components/ui/tooltip'; import { HoverCard, HoverCardContent, HoverCardTrigger, } from "@/components/ui/hover-card"; import { cn } from '@/lib/utils'; import BadgeStatus from '@/components/ui/badge-status'; import { IClient } from '../../types'; interface ClientGridProps { clients: IClient[]; onEdit: (client: IClient) => void; onDelete: (client: IClient) => void; } export default function ClientGrid({ clients, onEdit, onDelete }: ClientGridProps) { return (
{projectCount === 0 && imCount === 0 && woCount === 0 ? ( "No active projects, internal memos, or work orders recorded for this client yet." ) : ( <> {(projectCount! > 0 || imCount > 0) && ( <> Currently managing a portfolio of{" "} {projectCount! > 0 && ( {projectCount} project{projectCount! > 1 ? 's' : ''} )} {projectCount! > 0 && imCount > 0 && " and "} {imCount > 0 && ( {imCount} internal memo{imCount > 1 ? 's' : ''} )} .{" "} > )} {woCount! > 0 && ( <> A dedicated team of{" "} {userCount} experts is handling{" "} {woCount} work order{woCount! > 1 ? 's' : ''} {" "} to ensure successful delivery for {client.name}. > )} > )}
{user?.name}
{user?.position?.name}