import { Button, Item, ItemContent, ItemDescription, ItemFooter, ItemTitle } from "@repo/shadcn-ui/components"; import { EyeIcon, RefreshCwIcon, UserPlusIcon } from "lucide-react"; import { CustomerSummary } from "../../schemas"; interface CustomerCardProps { customer: CustomerSummary; onViewCustomer?: () => void; onChangeCustomer?: () => void; onAddNewCustomer?: () => void; className?: string; } export const CustomerCard = ({ customer, onViewCustomer, onChangeCustomer, onAddNewCustomer, className, }: CustomerCardProps) => { const hasAddress = customer.street || customer.street2 || customer.city || customer.postal_code || customer.province || customer.country; return ( {customer.name} {customer.tin && ({customer.tin})} {/* Dirección con mejor estructura */} {hasAddress && (
{customer.street &&
{customer.street}
} {customer.street2 &&
{customer.street2}
}
{customer.postal_code && {customer.postal_code}} {customer.city && {customer.city}}
{customer.province && {customer.province}} {customer.country && {customer.country}}
)}
); };