2025-09-30 17:28:21 +00:00
|
|
|
import { Building2Icon, FileTextIcon, Mail, Phone, User } from "lucide-react";
|
|
|
|
|
import { CustomerSummary } from "../../schemas";
|
2025-09-30 15:58:04 +00:00
|
|
|
|
|
|
|
|
interface CustomerCardProps {
|
2025-09-30 17:28:21 +00:00
|
|
|
customer: CustomerSummary;
|
2025-09-30 15:58:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const CustomerCard = ({ customer }: CustomerCardProps) => {
|
|
|
|
|
return (
|
|
|
|
|
<div className='flex items-start gap-4'>
|
|
|
|
|
<div className='flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 border border-primary/20'>
|
|
|
|
|
<User className='h-6 w-6 text-primary' />
|
|
|
|
|
</div>
|
|
|
|
|
<div className='flex-1 space-y-2'>
|
2025-09-30 17:28:21 +00:00
|
|
|
<p className='text-left font-semibold text-foreground text-base'>{customer.name}</p>
|
2025-09-30 15:58:04 +00:00
|
|
|
<div className='space-y-1 text-sm text-muted-foreground'>
|
2025-09-30 17:28:21 +00:00
|
|
|
{customer.email_primary && (
|
|
|
|
|
<div className='flex items-center gap-2'>
|
|
|
|
|
<Mail className='h-3 w-3' />
|
|
|
|
|
{customer.email_primary}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
2025-09-30 15:58:04 +00:00
|
|
|
{customer.mobile_primary && (
|
|
|
|
|
<div className='flex items-center gap-2'>
|
|
|
|
|
<Phone className='h-3 w-3' />
|
|
|
|
|
{customer.mobile_primary}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{customer.trade_name && (
|
|
|
|
|
<div className='flex items-center gap-2'>
|
|
|
|
|
<Building2Icon className='h-3 w-3' />
|
|
|
|
|
{customer.trade_name}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{customer.tin && (
|
|
|
|
|
<div className='flex items-center gap-2'>
|
|
|
|
|
<FileTextIcon className='h-3 w-3' />
|
|
|
|
|
{customer.tin}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|