diff --git a/modules/catalogs/src/web/settings/payment-terms/ui/components/payment-term-list-item.tsx b/modules/catalogs/src/web/settings/payment-terms/ui/components/payment-term-list-item.tsx index 9a7f7257..f9688eb4 100644 --- a/modules/catalogs/src/web/settings/payment-terms/ui/components/payment-term-list-item.tsx +++ b/modules/catalogs/src/web/settings/payment-terms/ui/components/payment-term-list-item.tsx @@ -1,4 +1,5 @@ -import { Card, CardContent, RdxBadge } from "@repo/shadcn-ui/components"; +import { RdxBadge } from "@repo/rdx-ui/components"; +import { Card, CardContent } from "@repo/shadcn-ui/components"; import { CalendarClockIcon } from "lucide-react"; import { useTranslation } from "../../../../i18n"; diff --git a/modules/catalogs/src/web/settings/tax-regimes/ui/pages/tax-regimes-settings-page.tsx b/modules/catalogs/src/web/settings/tax-regimes/ui/pages/tax-regimes-settings-page.tsx index a62883fc..465194c2 100644 --- a/modules/catalogs/src/web/settings/tax-regimes/ui/pages/tax-regimes-settings-page.tsx +++ b/modules/catalogs/src/web/settings/tax-regimes/ui/pages/tax-regimes-settings-page.tsx @@ -1,6 +1,6 @@ import { PageErrorState } from "@erp/core/components"; -import { RdxPageContainer } from "@repo/rdx-ui/components"; -import { Button, Card, CardContent, RdxBadge } from "@repo/shadcn-ui/components"; +import { RdxBadge, RdxPageContainer } from "@repo/rdx-ui/components"; +import { Button, Card, CardContent } from "@repo/shadcn-ui/components"; import { PlusIcon } from "lucide-react"; import { useTranslation } from "../../../../i18n"; diff --git a/modules/customer-invoices/src/web/customer-invoice-routes.tsx b/modules/customer-invoices/src/web/customer-invoice-routes.tsx index d7a26aec..4011c7ca 100644 --- a/modules/customer-invoices/src/web/customer-invoice-routes.tsx +++ b/modules/customer-invoices/src/web/customer-invoice-routes.tsx @@ -2,10 +2,6 @@ import type { ModuleClientParams } from "@erp/core/client"; import { lazy } from "react"; import { Outlet, type RouteObject } from "react-router-dom"; -const RecurringProformaLayout = lazy(() => - import("./recurring-proformas/shared/ui").then((m) => ({ default: m.RecurringProformaLayout })) -); - const ProformasListPage = lazy(() => import("./proformas/list").then((m) => ({ default: m.ListProformasPage })) ); @@ -42,10 +38,6 @@ const RecurringProformaDetailPage = lazy(() => import("./recurring-proformas").then((m) => ({ default: m.RecurringProformaDetailPage })) ); -const IssuedInvoicesLayout = lazy(() => - import("./issued-invoices/shared/ui").then((m) => ({ default: m.IssuedInvoicesLayout })) -); - const IssuedInvoiceListPage = lazy(() => import("./issued-invoices/list").then((m) => ({ default: m.ListIssuedInvoicesPage })) ); @@ -119,11 +111,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-sidebar", protected: true, }, - element: ( - - - - ), + element: , }, { path: "recurring-proformas/archived", @@ -131,11 +119,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-sidebar", protected: true, }, - element: ( - - - - ), + element: , }, { path: "recurring-proformas/create", @@ -143,11 +127,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-fullscreen", protected: true, }, - element: ( - - - - ), + element: , }, { path: "recurring-proformas/:recurring_proforma_id", @@ -155,11 +135,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-fullscreen", protected: true, }, - element: ( - - - - ), + element: , }, { @@ -168,11 +144,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-sidebar", protected: true, }, - element: ( - - - - ), + element: , children: [ { path: "", index: true, element: }, // index { path: "list", element: }, @@ -196,11 +168,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-fullscreen", protected: true, }, - element: ( - - - - ), + element: , }, { path: "settings/billing/verifactu", diff --git a/modules/customer-invoices/src/web/issued-invoices/detail/ui/blocks/issued-invoice-detail-content.tsx b/modules/customer-invoices/src/web/issued-invoices/detail/ui/blocks/issued-invoice-detail-content.tsx index 7b598fbd..169b1867 100644 --- a/modules/customer-invoices/src/web/issued-invoices/detail/ui/blocks/issued-invoice-detail-content.tsx +++ b/modules/customer-invoices/src/web/issued-invoices/detail/ui/blocks/issued-invoice-detail-content.tsx @@ -10,7 +10,7 @@ export const IssuedInvoiceDetailContent = ({ inspector, }: IssuedInvoiceDetailContentProps) => { return ( -
+
{documentPane} {inspector} diff --git a/modules/customer-invoices/src/web/issued-invoices/detail/ui/pages/issued-invoice-detail-page.tsx b/modules/customer-invoices/src/web/issued-invoices/detail/ui/pages/issued-invoice-detail-page.tsx index 11df61a4..b1e77523 100644 --- a/modules/customer-invoices/src/web/issued-invoices/detail/ui/pages/issued-invoice-detail-page.tsx +++ b/modules/customer-invoices/src/web/issued-invoices/detail/ui/pages/issued-invoice-detail-page.tsx @@ -1,4 +1,5 @@ import { PageErrorState } from "@erp/core/components"; +import { RdxPageContainer, RdxPageFrame } from "@repo/rdx-ui/components"; import { useTranslation } from "../../../../i18n"; import { useIssuedInvoiceDetailPageController } from "../../controllers"; @@ -20,8 +21,8 @@ export const IssuedInvoiceDetailPage = () => { if (ctrl.state.pageError) { return ( -
-
+ + { title={ctrl.state.pageError.title} variant={ctrl.state.pageError.variant} /> -
-
+ + ); } if (!(ctrl.header && ctrl.document && ctrl.general)) { return ( -
-
+ + { title={t("pages.issued_invoices.detail.page_error.unknown.title")} variant="unknown" /> -
-
+ + ); } return ( -
- - + + } + > { /> } /> -
+ ); }; diff --git a/modules/customer-invoices/src/web/issued-invoices/list/ui/components/issued-invoices-status-segmented-filter.tsx b/modules/customer-invoices/src/web/issued-invoices/list/ui/components/issued-invoices-status-segmented-filter.tsx index 49ff72aa..0d1f9439 100644 --- a/modules/customer-invoices/src/web/issued-invoices/list/ui/components/issued-invoices-status-segmented-filter.tsx +++ b/modules/customer-invoices/src/web/issued-invoices/list/ui/components/issued-invoices-status-segmented-filter.tsx @@ -1,3 +1,4 @@ +import { RdxBadge } from "@repo/rdx-ui/components"; import { ToggleGroup, ToggleGroupItem } from "@repo/shadcn-ui/components"; import { cn } from "@repo/shadcn-ui/lib/utils"; import { diff --git a/modules/customer-invoices/src/web/issued-invoices/list/ui/components/verifactu-status-badge.tsx b/modules/customer-invoices/src/web/issued-invoices/list/ui/components/verifactu-status-badge.tsx index d3a8c371..5572652f 100644 --- a/modules/customer-invoices/src/web/issued-invoices/list/ui/components/verifactu-status-badge.tsx +++ b/modules/customer-invoices/src/web/issued-invoices/list/ui/components/verifactu-status-badge.tsx @@ -1,3 +1,4 @@ +import { RdxBadge } from "@repo/rdx-ui/components"; import { Tooltip, TooltipContent, TooltipTrigger } from "@repo/shadcn-ui/components"; import { cn } from "@repo/shadcn-ui/lib/utils"; diff --git a/modules/customer-invoices/src/web/issued-invoices/list/ui/pages/list-issued-invoices-page.tsx b/modules/customer-invoices/src/web/issued-invoices/list/ui/pages/list-issued-invoices-page.tsx index 84369521..23f80652 100644 --- a/modules/customer-invoices/src/web/issued-invoices/list/ui/pages/list-issued-invoices-page.tsx +++ b/modules/customer-invoices/src/web/issued-invoices/list/ui/pages/list-issued-invoices-page.tsx @@ -1,6 +1,6 @@ import { ErrorAlert, PageErrorState, PageHeader, SimpleSearchInput } from "@erp/core/components"; import { useReturnToNavigation } from "@erp/core/hooks"; -import { LogoVerifactu } from "@repo/rdx-ui/components"; +import { LogoVerifactu, RdxPageContainer, RdxPageFrame } from "@repo/rdx-ui/components"; import { Alert, AlertDescription, AlertTitle, Button } from "@repo/shadcn-ui/components"; import { PlusIcon } from "lucide-react"; import { useState } from "react"; @@ -58,8 +58,8 @@ export const ListIssuedInvoicesPage = () => { if (hasBlockingError && pageError) { return ( -
-
+ + { title={pageError.title} variant={pageError.variant} /> -
-
+ + ); } return ( -
- navigate("/issued-invoices/create")} - > - - {t("pages.issued_invoices.create.title")} - - } - title={t("pages.issued_invoices.list.title")} - /> + + + navigate("/issued-invoices/create")} + > + + {t("pages.issued_invoices.create.title")} + + } + title={t("pages.issued_invoices.list.title")} + /> -
- {hasRefreshError && refreshError ? ( - - ) : null} +
+ {hasRefreshError && refreshError ? ( + + ) : null} - -
- ¡Atención! - - Las facturas de esta pantalla son de solo lectura. Se generan automáticamente al - emitir una proforma aprobada y no se pueden modificar ni eliminar. Solo puedes - descargar el PDF de cada factura. - -
- -
+ +
+ ¡Atención! + + Las facturas de esta pantalla son de solo lectura. Se generan automáticamente al + emitir una proforma aprobada y no se pueden modificar ni eliminar. Solo puedes + descargar el PDF de cada factura. + +
+ +
-
{
} /> -
- {listCtrl.data.totalItems === 0 ? : null} -
-
+ {listCtrl.data.totalItems === 0 ? : null} +
+ + ); }; diff --git a/modules/customer-invoices/src/web/issued-invoices/shared/ui/blocks/index.ts b/modules/customer-invoices/src/web/issued-invoices/shared/ui/blocks/index.ts index 0debbdd9..e69de29b 100644 --- a/modules/customer-invoices/src/web/issued-invoices/shared/ui/blocks/index.ts +++ b/modules/customer-invoices/src/web/issued-invoices/shared/ui/blocks/index.ts @@ -1 +0,0 @@ -export * from "./issued-invoices-layout"; diff --git a/modules/customer-invoices/src/web/issued-invoices/shared/ui/blocks/issued-invoices-layout.tsx b/modules/customer-invoices/src/web/issued-invoices/shared/ui/blocks/issued-invoices-layout.tsx deleted file mode 100644 index f5b62307..00000000 --- a/modules/customer-invoices/src/web/issued-invoices/shared/ui/blocks/issued-invoices-layout.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import type { PropsWithChildren } from "react"; - -export const IssuedInvoicesLayout = ({ children }: PropsWithChildren) => { - return
{children}
; -}; diff --git a/modules/customer-invoices/src/web/recurring-proformas/create/recurring-proforma-create-page.tsx b/modules/customer-invoices/src/web/recurring-proformas/create/recurring-proforma-create-page.tsx index 61348fc0..db30c519 100644 --- a/modules/customer-invoices/src/web/recurring-proformas/create/recurring-proforma-create-page.tsx +++ b/modules/customer-invoices/src/web/recurring-proformas/create/recurring-proforma-create-page.tsx @@ -1,6 +1,6 @@ import { PageFormHeader } from "@erp/core/components"; import { useHookForm } from "@erp/core/hooks"; -import { RdxEditorPageLayout } from "@repo/rdx-ui/components"; +import { RdxEditorLayout, RdxPageContainer, RdxPageFrame } from "@repo/rdx-ui/components"; import { Button, Card, @@ -50,35 +50,39 @@ export const RecurringProformaCreatePage = () => { }); return ( -
- - - -
- } - backLabel={t("recurring_proformas.create.cancel")} - onBack={() => navigate("/recurring-proformas")} - title={t("recurring_proformas.create.title")} - /> -
- + + + +
+ } + backLabel={t("recurring_proformas.create.cancel")} + onBack={() => navigate("/recurring-proformas")} + title={t("recurring_proformas.create.title")} + /> + } + > + +
{
- -
-
+ + + ); }; diff --git a/modules/customer-invoices/src/web/recurring-proformas/detail/ui/pages/recurring-proforma-detail-page.tsx b/modules/customer-invoices/src/web/recurring-proformas/detail/ui/pages/recurring-proforma-detail-page.tsx index 694ea49b..c0781fc6 100644 --- a/modules/customer-invoices/src/web/recurring-proformas/detail/ui/pages/recurring-proforma-detail-page.tsx +++ b/modules/customer-invoices/src/web/recurring-proformas/detail/ui/pages/recurring-proforma-detail-page.tsx @@ -1,10 +1,5 @@ import { PageErrorState } from "@erp/core/components"; -import { - RdxBadge, - RdxEditorPageLayout, - RdxPageContainer, - RdxPageStack, -} from "@repo/rdx-ui/components"; +import { RdxBadge, RdxPageContainer, RdxPageFrame, RdxPageStack } from "@repo/rdx-ui/components"; import { Button, Card, CardContent, CardHeader, CardTitle } from "@repo/shadcn-ui/components"; import { ArrowLeftIcon } from "lucide-react"; import { useNavigate, useParams } from "react-router-dom"; @@ -96,179 +91,181 @@ export const RecurringProformaDetailPage = () => { }); return ( - - - actionMutation.mutate({ id: recurringProforma.id, action }) - } - /> - } - backLabel={t("recurring_proformas.detail.back")} - onBack={() => navigate("/recurring-proformas")} - title={ -
- - {mainView.name} - - {t(mainView.statusKey)} - - - {t( - recurringProforma.has_issue - ? "recurring_proformas.list.issues.issue" - : "recurring_proformas.list.issues.none" - )} - - -

{metadata}

-
- } - /> - - - + + actionMutation.mutate({ id: recurringProforma.id, action }) + } + /> + } + backLabel={t("recurring_proformas.detail.back")} + onBack={() => navigate("/recurring-proformas")} + title={ +
+ + {mainView.name} + + {t(mainView.statusKey)} + + + {t( + recurringProforma.has_issue + ? "recurring_proformas.list.issues.issue" + : "recurring_proformas.list.issues.none" + )} + + +

{metadata}

+
+ } + /> + } + > + + -
-
- - - {t("recurring_proformas.detail.general.title")} - - - {recurringProforma.description ? ( -

- {recurringProforma.description} -

- ) : null} -
-
+
+ + + {t("recurring_proformas.detail.general.title")} + + + {recurringProforma.description ? ( +

+ {recurringProforma.description} +

+ ) : null} +
+
- - - {t("recurring_proformas.detail.schedule.title")} - - - {schedule ? ( + + + {t("recurring_proformas.detail.schedule.title")} + + + {schedule ? ( +
+ + + + +
+ ) : ( +

+ {t("recurring_proformas.list.schedule.none")} +

+ )} +
+
+ + + + {t("recurring_proformas.detail.commercial.title")} + +
+ + + {discount ? ( + + ) : null}
- ) : ( -

- {t("recurring_proformas.list.schedule.none")} -

- )} -
-
+
+
- - - {t("recurring_proformas.detail.commercial.title")} - - -
- - - - - - - {discount ? ( - - ) : null} -
-
-
+ + + {t("recurring_proformas.detail.items.title")} + + + {recurringProforma.items.length === 0 ? ( +

+ {t("recurring_proformas.detail.items.empty")} +

+ ) : ( +
    + {recurringProforma.items.map((item) => ( +
  1. + {item.position} + + {item.description ?? t("recurring_proformas.detail.items.no_description")} + +
  2. + ))} +
+ )} +
+
+
- - - {t("recurring_proformas.detail.items.title")} - - - {recurringProforma.items.length === 0 ? ( -

- {t("recurring_proformas.detail.items.empty")} -

- ) : ( -
    - {recurringProforma.items.map((item) => ( -
  1. - {item.position} - - {item.description ?? t("recurring_proformas.detail.items.no_description")} - -
  2. - ))} -
- )} -
-
-
+ - - - + +
- + ); }; diff --git a/modules/customer-invoices/src/web/recurring-proformas/list/list-recurring-proformas-page.test.tsx b/modules/customer-invoices/src/web/recurring-proformas/list/list-recurring-proformas-page.test.tsx index fd2ba7da..f8d7bed4 100644 --- a/modules/customer-invoices/src/web/recurring-proformas/list/list-recurring-proformas-page.test.tsx +++ b/modules/customer-invoices/src/web/recurring-proformas/list/list-recurring-proformas-page.test.tsx @@ -124,6 +124,7 @@ mock.module("./controllers/use-list-recurring-proformas-page-controller", { mock.module("@repo/rdx-ui/components", { namedExports: { RdxPageContainer: ({ children }: { children: ReactNode }) =>
{children}
, + RdxPageFrame: ({ children }: { children: ReactNode }) =>
{children}
, RdxPageStack: ({ children }: { children: ReactNode }) =>
{children}
, RdxPageHeader: ({ title, diff --git a/modules/customer-invoices/src/web/recurring-proformas/list/ui/pages/scoped-list-recurring-proformas-page-view.tsx b/modules/customer-invoices/src/web/recurring-proformas/list/ui/pages/scoped-list-recurring-proformas-page-view.tsx index d10ffc1a..210d5308 100644 --- a/modules/customer-invoices/src/web/recurring-proformas/list/ui/pages/scoped-list-recurring-proformas-page-view.tsx +++ b/modules/customer-invoices/src/web/recurring-proformas/list/ui/pages/scoped-list-recurring-proformas-page-view.tsx @@ -2,6 +2,7 @@ import { ErrorAlert } from "@erp/core/components"; import { RdxPageActions, RdxPageContainer, + RdxPageFrame, RdxPageHeader, RdxPageStack, } from "@repo/rdx-ui/components"; @@ -28,20 +29,22 @@ export const ScopedListRecurringProformasPageView = ({ content, }: ScopedListRecurringProformasPageViewProps) => { return ( - - - : undefined} - description={description} - title={title} - /> + + + + : undefined} + description={description} + title={title} + /> - {refreshError ? ( - - ) : null} + {refreshError ? ( + + ) : null} - {content} - - + {content} + + + ); }; diff --git a/modules/customer-invoices/src/web/recurring-proformas/shared/ui/blocks/index.ts b/modules/customer-invoices/src/web/recurring-proformas/shared/ui/blocks/index.ts index 61f9d676..e69de29b 100644 --- a/modules/customer-invoices/src/web/recurring-proformas/shared/ui/blocks/index.ts +++ b/modules/customer-invoices/src/web/recurring-proformas/shared/ui/blocks/index.ts @@ -1 +0,0 @@ -export * from "./recurring-proforma-layout"; diff --git a/modules/customer-invoices/src/web/recurring-proformas/shared/ui/blocks/recurring-proforma-layout.tsx b/modules/customer-invoices/src/web/recurring-proformas/shared/ui/blocks/recurring-proforma-layout.tsx deleted file mode 100644 index fe8530e7..00000000 --- a/modules/customer-invoices/src/web/recurring-proformas/shared/ui/blocks/recurring-proforma-layout.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import type { PropsWithChildren } from "react"; - -export function RecurringProformaLayout({ children }: PropsWithChildren) { - return ( -
- {children} -
- ); -} diff --git a/packages/rdx-ui/src/components/editor-page/rdx-editor-page-layout.tsx b/packages/rdx-ui/src/components/editor-page/rdx-editor-page-layout.tsx index b1dac7bf..1b9ffed4 100644 --- a/packages/rdx-ui/src/components/editor-page/rdx-editor-page-layout.tsx +++ b/packages/rdx-ui/src/components/editor-page/rdx-editor-page-layout.tsx @@ -21,12 +21,14 @@ const ASIDE_GRID_CLASSNAME: Record = { }; /** + * @deprecated * Distribuye el contenido interno de un contenedor en: * * - una región principal * - un aside opcional. * * No controla padding, scroll ni estructura general de página. + * Para nuevos consumidores usar RdxPageContainer + RdxEditorLayout. */ export const RdxEditorPageLayout = ({