diff --git a/modules/customers/src/web/list/ui/blocks/customers-grid/use-customer-grid-columns.tsx b/modules/customers/src/web/list/ui/blocks/customers-grid/use-customer-grid-columns.tsx index f53de539..d6712286 100644 --- a/modules/customers/src/web/list/ui/blocks/customers-grid/use-customer-grid-columns.tsx +++ b/modules/customers/src/web/list/ui/blocks/customers-grid/use-customer-grid-columns.tsx @@ -71,6 +71,9 @@ export function useCustomersGridColumns( enableHiding: false, size: 140, minSize: 120, + meta: { + title: t("list.columns.customer"), + }, cell: ({ row }) => { const customer = row.original; @@ -131,6 +134,9 @@ export function useCustomersGridColumns( enableSorting: false, size: 140, minSize: 120, + meta: { + title: t("list.columns.contact"), + }, cell: ({ row }) => , }, { @@ -147,12 +153,16 @@ export function useCustomersGridColumns( enableSorting: false, size: 140, minSize: 120, + meta: { + title: t("list.columns.address"), + }, cell: ({ row }) => , }, { id: "actions", meta: { isActionsColumn: true, + title: t("common.actions"), headerClassName: "text-right", }, header: "Acciones", diff --git a/modules/customers/src/web/list/ui/components/address-cell.tsx b/modules/customers/src/web/list/ui/components/address-cell.tsx index edfe8117..5dad9c08 100644 --- a/modules/customers/src/web/list/ui/components/address-cell.tsx +++ b/modules/customers/src/web/list/ui/components/address-cell.tsx @@ -1,3 +1,4 @@ +import { EmptyCellValue } from "@erp/core/components"; import { ExternalLinkIcon, MapPinIcon } from "lucide-react"; import { useTranslation } from "../../../i18n"; @@ -37,6 +38,11 @@ export const AddressCell = ({ address }: { address: CustomerAddress }) => { const line2 = join([address.postalCode, address.city], " "); const line3 = join([address.province, address.country], ", "); const line23 = join([line2, line3], " - "); + const hasAddress = Boolean(line1 || line23); + + if (!hasAddress) { + return ; + } return (
diff --git a/modules/customers/src/web/list/ui/components/contact-cell.tsx b/modules/customers/src/web/list/ui/components/contact-cell.tsx index a6fa75a6..40b02bb9 100644 --- a/modules/customers/src/web/list/ui/components/contact-cell.tsx +++ b/modules/customers/src/web/list/ui/components/contact-cell.tsx @@ -1,3 +1,4 @@ +import { EmptyCellValue } from "@erp/core/components"; import { GlobeIcon, MailIcon, PhoneIcon, PrinterIcon, SmartphoneIcon } from "lucide-react"; interface ContactCellData { @@ -66,7 +67,9 @@ export const ContactCell = ({ contact }: { contact: ContactCellData }) => { : []), ]; - if (items.length === 0) return null; + if (items.length === 0) { + return ; + } return (