diff --git a/modules/customer-invoices/src/web/proformas/list/ui/blocks/proformas-grid/use-proforma-grid-columns.tsx b/modules/customer-invoices/src/web/proformas/list/ui/blocks/proformas-grid/use-proforma-grid-columns.tsx
index 2c8ea746..aa38d346 100644
--- a/modules/customer-invoices/src/web/proformas/list/ui/blocks/proformas-grid/use-proforma-grid-columns.tsx
+++ b/modules/customer-invoices/src/web/proformas/list/ui/blocks/proformas-grid/use-proforma-grid-columns.tsx
@@ -103,7 +103,6 @@ export function useProformasGridColumns(
-
+
+
+
+ Cancelar
+
+
+ {selectedCustomer ? "Confirmar selección" : "Seleccionar cliente"}
+
+
);
};
-
-type CustomerSelectionListProps = {
- customers: CustomerSelectionOption[];
- isLoading: boolean;
- onSelect: (customer: CustomerSelectionOption) => void;
-};
-
-const CustomerSelectionList = ({ customers, isLoading, onSelect }: CustomerSelectionListProps) => {
- const { t } = useTranslation();
-
- //const columns = useCustomersGridColumns({});
-
- if (isLoading) {
- return (
-
- );
- }
-
- if (customers.length === 0) {
- return
;
- }
-
- return (
-
- {customers.map((customer) => (
- - onSelect(customer)}
- role="listitem"
- >
-
-
- {customer.name}
- {customer.tin}
-
-
-
- ))}
-
- );
-};
diff --git a/modules/customers/src/common/features/customer-selection/ui/dialogs/select-customer-selection-list.tsx b/modules/customers/src/common/features/customer-selection/ui/dialogs/select-customer-selection-list.tsx
new file mode 100644
index 00000000..1a606c31
--- /dev/null
+++ b/modules/customers/src/common/features/customer-selection/ui/dialogs/select-customer-selection-list.tsx
@@ -0,0 +1,77 @@
+import { InitialsAvatar } from "@repo/rdx-ui/components";
+import {
+ Item,
+ ItemContent,
+ ItemDescription,
+ ItemGroup,
+ ItemMedia,
+ ItemTitle,
+} from "@repo/shadcn-ui/components";
+import { cn } from "@repo/shadcn-ui/lib/utils";
+
+import { useTranslation } from "../../../../../web/i18n";
+import type { CustomerSelectionOption } from "../../entities";
+
+import { SelectCustomerEmptyCard } from "./select-customer-empty-card";
+
+type SelectCustomerSelectionListProps = {
+ customers: CustomerSelectionOption[];
+ isLoading: boolean;
+ selectedCustomer?: CustomerSelectionOption;
+ onSelect: (customer: CustomerSelectionOption) => void;
+};
+
+export const SelectCustomerSelectionList = ({
+ customers,
+ isLoading,
+ selectedCustomer,
+ onSelect,
+}: SelectCustomerSelectionListProps) => {
+ const { t } = useTranslation();
+
+ //const columns = useCustomersGridColumns({});
+ console.log(selectedCustomer);
+
+ if (isLoading) {
+ return (
+
+ );
+ }
+
+ if (customers.length === 0) {
+ return
;
+ }
+
+ return (
+
+ {customers.map((customer) => (
+ - onSelect(customer)}
+ role="listitem"
+ variant={"outline"}
+ >
+
+
+
+
+
+ {customer.name}
+ {customer.tin}
+
+
+ ))}
+
+ );
+};
diff --git a/modules/customers/src/web/list/ui/blocks/customer-summary-panel/customer-header.tsx b/modules/customers/src/web/list/ui/blocks/customer-summary-panel/customer-header.tsx
index 25a98955..72a20133 100644
--- a/modules/customers/src/web/list/ui/blocks/customer-summary-panel/customer-header.tsx
+++ b/modules/customers/src/web/list/ui/blocks/customer-summary-panel/customer-header.tsx
@@ -1,24 +1,14 @@
-import { Avatar, AvatarFallback, Badge } from "@repo/shadcn-ui/components";
+import { InitialsAvatar } from "@repo/rdx-ui/components";
+import { Badge } from "@repo/shadcn-ui/components";
import { Building2Icon, CopyIcon, UserIcon } from "lucide-react";
import type { Customer } from "../../../../shared";
-import { Initials } from "../../components";
export const CustomerHeader = ({ customer }: { customer: Customer }) => {
return (
-
-
-
-
-
+
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 2a01f584..baa4fb30 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
@@ -1,8 +1,6 @@
import { safeHTTPUrl } from "@erp/core/client";
-import { DataTableColumnHeader } from "@repo/rdx-ui/components";
+import { DataTableColumnHeader, InitialsAvatar } from "@repo/rdx-ui/components";
import {
- Avatar,
- AvatarFallback,
Badge,
Button,
DropdownMenu,
@@ -18,7 +16,7 @@ import * as React from "react";
import { useTranslation } from "../../../../i18n";
import type { CustomerListRow } from "../../../../shared";
-import { AddressCell, ContactCell, Initials } from "../../components";
+import { AddressCell, ContactCell } from "../../components";
type GridActionHandlers = {
onEditClick?: (customer: CustomerListRow) => void;
@@ -58,17 +56,7 @@ export function useCustomersGridColumns(
type="button"
>
-
-
-
-
-
+
diff --git a/modules/customers/src/web/list/ui/components/index.ts b/modules/customers/src/web/list/ui/components/index.ts
index 46dd269b..c73ea6d7 100644
--- a/modules/customers/src/web/list/ui/components/index.ts
+++ b/modules/customers/src/web/list/ui/components/index.ts
@@ -1,5 +1,4 @@
export * from "./address-cell";
export * from "./contact-cell";
-export * from "./initials";
export * from "./kind-badge";
export * from "./soft";
diff --git a/modules/customers/src/web/list/ui/components/initials.tsx b/modules/customers/src/web/list/ui/components/initials.tsx
deleted file mode 100644
index 87b187ca..00000000
--- a/modules/customers/src/web/list/ui/components/initials.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const Initials = ({ name }: { name: string }) => {
- const parts = name.trim().split(/\s+/).slice(0, 2);
- return <> {parts.map((p) => p[0]?.toUpperCase() ?? "").join("") || "?"} >;
-};