From 3eb7c37a7ba8a74c39322c71664ba4bb17b74251 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 4 Sep 2026 11:41:37 +0200 Subject: [PATCH] Refactor proforma-related components and layouts - Simplified the AppFullscreenLayout documentation. - Removed ProformaLayout and refactored routes to use Outlet directly. - Updated ProformaCreateCustomerField styles for better visibility. - Adjusted ProformaCreateHeader to hide keyboard shortcuts button on small screens. - Replaced FormSectionCard and FormSectionGrid with RdxPanel and RdxFormGrid in ProformaCreateInitialInfoCard. - Refactored ProformaCreatePage to use RdxPageFrame for better layout control. - Enhanced ProformaDetailContent and ProformaDetailPage for improved responsiveness. - Updated ScopedListProformasPageView to use RdxPageFrame for consistent layout. - Added new RdxEditorLayout and RdxPageFrame components for better structure in editor pages. - Adjusted tests to accommodate new layout components and ensure proper rendering. --- apps/web/src/layout/app-fullscreen-layout.tsx | 3 +- .../src/web/customer-invoice-routes.tsx | 28 +- .../blocks/proforma-create-customer-field.tsx | 2 +- .../ui/blocks/proforma-create-header.tsx | 2 +- .../proforma-create-initial-info-card.tsx | 23 +- .../create/ui/pages/proforma-create-page.tsx | 64 ++-- .../ui/blocks/proforma-detail-content.tsx | 2 +- .../detail/ui/pages/proforma-detail-page.tsx | 23 +- .../pages/scoped-list-proformas-page-view.tsx | 31 +- .../web/proformas/shared/ui/blocks/index.ts | 1 - .../shared/ui/blocks/proforma-layout.tsx | 9 - .../editors/proforma-update-editor-form.tsx | 7 +- .../ui/pages/proforma-update-page.test.tsx | 15 + .../update/ui/pages/proforma-update-page.tsx | 331 +++++++++--------- .../pages/recurring-proforma-detail-page.tsx | 2 +- .../list/list-recurring-proformas-page.tsx | 2 + .../src/components/editor-page/index.ts | 1 + .../editor-page/rdx-editor-action-bar.tsx | 2 +- .../rdx-editor-foundations.test.tsx | 13 + .../editor-page/rdx-editor-layout.tsx | 31 ++ .../src/components/editor-page/rdx-panel.tsx | 45 ++- .../rdx-ui/src/components/layout/index.ts | 1 + .../layout/rdx-page-foundations.test.tsx | 15 + .../src/components/layout/rdx-page-frame.tsx | 35 ++ .../src/components/layout/rdx-page-stack.tsx | 4 +- 25 files changed, 388 insertions(+), 304 deletions(-) delete mode 100644 modules/customer-invoices/src/web/proformas/shared/ui/blocks/proforma-layout.tsx create mode 100644 packages/rdx-ui/src/components/editor-page/rdx-editor-layout.tsx create mode 100644 packages/rdx-ui/src/components/layout/rdx-page-frame.tsx diff --git a/apps/web/src/layout/app-fullscreen-layout.tsx b/apps/web/src/layout/app-fullscreen-layout.tsx index 405b5120..3f030ba0 100644 --- a/apps/web/src/layout/app-fullscreen-layout.tsx +++ b/apps/web/src/layout/app-fullscreen-layout.tsx @@ -12,8 +12,7 @@ export const AppFullscreenLayoutFrame = ({ children }: AppFullscreenLayoutFrameP }; /** - * Shell de aplicación para páginas que ocupan toda el área disponible. - * Se utiliza en editores y vistas de detalle sin sidebar ni topbar global. + * Shell para páginas fullscreen sin sidebar ni topbar global. */ export const AppFullscreenLayout = () => { diff --git a/modules/customer-invoices/src/web/customer-invoice-routes.tsx b/modules/customer-invoices/src/web/customer-invoice-routes.tsx index a2cdfc98..d7a26aec 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 ProformaLayout = lazy(() => - import("./proformas/shared/ui").then((m) => ({ default: m.ProformaLayout })) -); - const RecurringProformaLayout = lazy(() => import("./recurring-proformas/shared/ui").then((m) => ({ default: m.RecurringProformaLayout })) ); @@ -70,11 +66,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-sidebar", protected: true, }, - element: ( - - - - ), + element: , children: [ { index: true, @@ -101,11 +93,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-fullscreen", protected: true, }, - element: ( - - - - ), + element: , }, { @@ -114,11 +102,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-fullscreen", protected: true, }, - element: ( - - - - ), + element: , }, { @@ -127,11 +111,7 @@ export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] layout: "app-fullscreen", protected: true, }, - element: ( - - - - ), + element: , }, { path: "recurring-proformas", diff --git a/modules/customer-invoices/src/web/proformas/create/ui/blocks/proforma-create-customer-field.tsx b/modules/customer-invoices/src/web/proformas/create/ui/blocks/proforma-create-customer-field.tsx index 64d98fd3..86555973 100644 --- a/modules/customer-invoices/src/web/proformas/create/ui/blocks/proforma-create-customer-field.tsx +++ b/modules/customer-invoices/src/web/proformas/create/ui/blocks/proforma-create-customer-field.tsx @@ -38,7 +38,7 @@ export const ProformaCreateCustomerField = ({