diff --git a/modules/core/src/web/components/page-header.tsx b/modules/core/src/web/components/page-header.tsx index cc51f9a6..941f1bf7 100644 --- a/modules/core/src/web/components/page-header.tsx +++ b/modules/core/src/web/components/page-header.tsx @@ -40,7 +40,7 @@ export function PageHeader({

{title}

- {description &&

{description}

} + {description &&
{description}
} diff --git a/modules/customers/src/web/view/ui/pages/customer-view-page copy b/modules/customers/src/web/view/ui/pages/customer-view-page copy deleted file mode 100644 index bfbd3094..00000000 --- a/modules/customers/src/web/view/ui/pages/customer-view-page copy +++ /dev/null @@ -1,333 +0,0 @@ -import { PageHeader } from "@erp/core/components"; -import { useUrlParamId } from "@erp/core/hooks"; -import { AppContent, AppHeader, BackHistoryButton } from "@repo/rdx-ui/components"; -import { - Badge, - Button, - Card, - CardContent, - CardHeader, - CardTitle, -} from "@repo/shadcn-ui/components"; -import { - Banknote, - EditIcon, - FileText, - Globe, - Languages, - Mail, - MapPin, - MoreVertical, - Phone, - Smartphone, -} from "lucide-react"; -import { useNavigate } from "react-router-dom"; - -import { CustomerEditorSkeleton, ErrorAlert } from "../../../components"; -import { useTranslation } from "../../../i18n"; -import { useCustomerGetQuery } from "../../hooks"; - -export const CustomerViewPage2 = () => { - const customerId = useUrlParamId(); - const { t } = useTranslation(); - const navigate = useNavigate(); - - // 1) Estado de carga del cliente (query) - const { - data: customer, - isLoading: isLoadingCustomer, - isError: isLoadError, - error: loadError, - } = useCustomerGetQuery(customerId, { enabled: !!customerId }); - - if (isLoadingCustomer) { - return ; - } - - if (isLoadError) { - return ( - <> - - - -
- -
-
- - ); - } - - return ( - <> - - - - {customer?.tin} - - {customer?.is_company ? "Empresa" : "Persona"} - - } - rightSlot={ -
- - -
- } - title={ -
- {customer?.name}{" "} - {customer?.trade_name && ( - ({customer.trade_name}) - )} -
- } - /> -
- - {/* Main Content Grid */} -
- {/* Información Básica */} - - - - - Información Básica - - - -
-
Nombre
-
{customer?.name}
-
-
-
Referencia
-
{customer?.reference}
-
-
-
Registro Legal
-
{customer?.legal_record}
-
-
-
Impuestos por Defecto
-
- {customer?.default_taxes.map((tax) => ( - - {tax} - - ))} -
-
-
-
- - {/* Dirección */} - - - - - Dirección - - - -
-
Calle
-
- {customer?.street} - {customer?.street2 && ( - <> -
- {customer?.street2} - - )} -
-
-
-
-
Ciudad
-
{customer?.city}
-
-
-
Código Postal
-
{customer?.postal_code}
-
-
-
-
-
Provincia
-
{customer?.province}
-
-
-
País
-
{customer?.country}
-
-
-
-
- - {/* Información de Contacto */} - - - - - Información de Contacto - - - -
- {/* Contacto Principal */} -
-

Contacto Principal

- {customer?.email_primary && ( -
- -
-
Email
-
- {customer?.email_primary} -
-
-
- )} - {customer?.mobile_primary && ( -
- -
-
Móvil
-
- {customer?.mobile_primary} -
-
-
- )} - {customer?.phone_primary && ( -
- -
-
Teléfono
-
- {customer?.phone_primary} -
-
-
- )} -
- - {/* Contacto Secundario */} -
-

Contacto Secundario

- {customer?.email_secondary && ( -
- -
-
Email
-
- {customer?.email_secondary} -
-
-
- )} - {customer?.mobile_secondary && ( -
- -
-
Móvil
-
- {customer?.mobile_secondary} -
-
-
- )} - {customer?.phone_secondary && ( -
- -
-
Teléfono
-
- {customer?.phone_secondary} -
-
-
- )} -
- - {/* Otros Contactos */} - {(customer?.website || customer?.fax) && ( -
-

Otros

-
- {customer?.website && ( -
- -
-
Sitio Web
-
- - {customer?.website} - -
-
-
- )} - {customer?.fax && ( -
- -
-
Fax
-
{customer?.fax}
-
-
- )} -
-
- )} -
-
-
- - {/* Preferencias */} - - - - - Preferencias - - - -
-
- -
-
Idioma Preferido
-
{customer?.language_code}
-
-
-
- -
-
Moneda Preferida
-
{customer?.currency_code}
-
-
-
-
-
-
-
- - ); -};