From d92ab05f35f338a2890304e8552f20d6d65b14ca Mon Sep 17 00:00:00 2001 From: David Date: Thu, 3 Sep 2026 18:50:57 +0200 Subject: [PATCH] feat: refactor badge component and update related usages - Replaced instances of Badge with RdxBadge in SupplierStatusBadge, DataTableFacetedFilter, MultiSelectField, and other components. - Updated RdxEditorPageLayout to use width prop instead of complexity. - Added new recurring proforma operational summary feature with tests. - Introduced recurring proforma status entity and related UI helpers. - Enhanced recurring proforma list and detail views with new components and hooks. - Added tests for new functionality and components. --- .../src/development/ui-kit/ui-kit-page.tsx | 119 ++++--- apps/web/src/pages/shadcn-ui-page.tsx | 8 +- .../ChatGPT Image 2 sept 2026, 12_27_14.png | Bin 0 -> 1394691 bytes .../recurring-proformas-view-mockup.png | Bin 0 -> 1164164 bytes .../pages/payment-methods-settings-page.tsx | 16 +- .../components/payment-term-form-dialog.tsx | 34 +- .../ui/components/payment-term-list-item.tsx | 10 +- .../ui/pages/tax-regimes-settings-page.tsx | 10 +- .../form/form-actions/page-form-header.tsx | 8 +- .../models/recurring-proforma-read.models.ts | 2 + .../recurring-proforma-capabilities.test.ts | 17 +- .../recurring-proforma-capabilities.ts | 31 +- .../express/presenters/index.ts | 8 + ...ecurring-proformas-read.presenters.test.ts | 14 +- .../src/common/locales/en.json | 12 + .../src/common/locales/es.json | 12 + .../issued-invoice-payment-section.tsx | 18 +- .../issued-invoices-grid.tsx | 8 +- ...ssued-invoices-status-segmented-filter.tsx | 13 +- .../ui/components/verifactu-status-badge.tsx | 6 +- .../ui/pages/list-issued-invoices-page.tsx | 14 +- .../create/ui/pages/proforma-create-page.tsx | 2 +- .../ui/blocks/proforma-detail-header.tsx | 2 +- .../proforma-linked-invoice-section.tsx | 10 +- .../proforma-header.tsx | 5 +- .../ui/components/proforma-status-badge.tsx | 7 +- .../proforma-status-segmented-filter.tsx | 9 +- .../proformas/list/ui/pages/orders-table.tsx | 29 +- .../customer-view-dialog.tsx | 10 +- .../selected-recipient-summary.tsx | 6 +- .../proforma-update-help-popover.tsx | 17 +- .../editors/proforma-update-editor-form.tsx | 2 +- .../editors/proforma-update-header-editor.tsx | 6 +- .../update/ui/pages/proforma-update-page.tsx | 16 +- .../create/recurring-proforma-create-page.tsx | 7 +- .../recurring-proforma-detail-actions.ts | 6 +- .../recurring-proforma-detail-utils.test.ts | 25 +- ...recurring-proforma-occurrences-section.tsx | 103 +++++-- ...rring-proforma-operational-summary.test.ts | 79 +++++ .../recurring-proforma-operational-summary.ts | 70 +++++ ...recurring-proforma-operational-summary.tsx | 129 ++++++++ .../pages/recurring-proforma-detail-page.tsx | 290 +++++++++--------- .../src/web/recurring-proformas/index.ts | 2 +- .../src/web/recurring-proformas/list/index.ts | 2 + .../list-recurring-proformas-page.test.tsx | 14 + .../list/list-recurring-proformas-page.tsx | 98 +++--- .../list/ui/components/index.ts | 1 + ...rring-proforma-status-segmented-filter.tsx | 43 +-- .../web/recurring-proformas/list/ui/index.ts | 2 + .../list/ui/pages/index.ts | 1 + .../shared/adapters/index.ts | 1 + .../recurring-proformas/shared/api/index.ts | 5 + .../shared/entities/index.ts | 1 + .../recurring-proforma-status.entity.ts | 14 + .../shared/helpers/index.ts | 1 + .../recurring-proforma-status-ui.test.ts | 19 ++ .../helpers/recurring-proforma-status-ui.ts | 62 ++++ .../recurring-proformas/shared/hooks/index.ts | 7 + .../use-recurring-proforma-action-mutation.ts | 1 + .../web/recurring-proformas/shared/index.ts | 9 + .../shared/recurring-proforma-list.ts | 8 +- .../create/ui/pages/customer-create-page.tsx | 2 +- .../customer-header.tsx | 9 +- .../customer-proformas-section.tsx | 15 +- .../use-customer-grid-columns.tsx | 9 +- .../src/web/list/ui/components/kind-badge.tsx | 5 +- .../update/ui/pages/customer-update-page.tsx | 40 ++- .../src/web/account/ui/pages/account-page.tsx | 30 +- .../src/web/create/supplier-create-page.tsx | 2 +- .../src/web/list/ui/suppliers-grid.tsx | 5 +- .../web/shared/ui/supplier-status-badge.tsx | 6 +- .../src/web/update/supplier-update-page.tsx | 2 +- packages/rdx-ui/package.json | 1 + .../datatable/data-table-faceted-filter.tsx | 15 +- .../rdx-editor-foundations.test.tsx | 4 +- .../editor-page/rdx-editor-page-layout.tsx | 27 +- .../components/form/multi-select-field.tsx | 12 +- packages/rdx-ui/src/components/index.ts | 1 + .../rdx-ui/src/components/layout/nav-user.tsx | 4 +- .../components/layout/rdx-page-container.tsx | 10 +- .../src/components/layout/rdx-page-header.tsx | 8 +- .../rdx-ui/src/components/multi-select.tsx | 11 +- .../rdx-ui/src/components/rdx-badge.test.tsx | 12 + packages/rdx-ui/src/components/rdx-badge.tsx | 11 + packages/shadcn-ui/src/components/badge.tsx | 24 +- pnpm-lock.yaml | 3 + 86 files changed, 1231 insertions(+), 518 deletions(-) create mode 100644 docs/recurring-proformas/ChatGPT Image 2 sept 2026, 12_27_14.png create mode 100644 docs/recurring-proformas/recurring-proformas-view-mockup.png create mode 100644 modules/customer-invoices/src/web/recurring-proformas/detail/recurring-proforma-operational-summary.test.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/detail/recurring-proforma-operational-summary.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/detail/ui/blocks/recurring-proforma-operational-summary.tsx create mode 100644 modules/customer-invoices/src/web/recurring-proformas/list/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/list/ui/components/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/list/ui/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/list/ui/pages/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/adapters/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/api/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/entities/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/entities/recurring-proforma-status.entity.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/helpers/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/helpers/recurring-proforma-status-ui.test.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/helpers/recurring-proforma-status-ui.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/hooks/index.ts create mode 100644 modules/customer-invoices/src/web/recurring-proformas/shared/index.ts create mode 100644 packages/rdx-ui/src/components/rdx-badge.test.tsx create mode 100644 packages/rdx-ui/src/components/rdx-badge.tsx diff --git a/apps/web/src/development/ui-kit/ui-kit-page.tsx b/apps/web/src/development/ui-kit/ui-kit-page.tsx index 29b2de4f..ed62a004 100644 --- a/apps/web/src/development/ui-kit/ui-kit-page.tsx +++ b/apps/web/src/development/ui-kit/ui-kit-page.tsx @@ -1,11 +1,11 @@ -import { useTheme } from "@/lib/hooks"; import { + RdxBadge, + RdxContextPanel, RdxEditorPageLayout, RdxEditorSection, RdxEditorStickyFooter, RdxFormGrid, RdxPageActions, - RdxContextPanel, RdxPageContainer, RdxPageHeader, RdxPageStack, @@ -13,7 +13,6 @@ import { RightPanel, } from "@repo/rdx-ui/components"; import { - Badge, Button, Card, CardContent, @@ -34,6 +33,8 @@ import { import { ArrowLeftIcon, MoreHorizontalIcon, PlusIcon, XIcon } from "lucide-react"; import type { ReactNode } from "react"; +import { useTheme } from "@/lib/hooks"; + import { UiKitSection } from "./sections/ui-kit-section"; type ThemeValue = "dark" | "light" | "system"; @@ -60,11 +61,7 @@ const ExampleCard = ({ title, notes, children }: ExampleCardProps) => { }; const SurfaceExample = ({ children }: { children: ReactNode }) => { - return ( -
- {children} -
- ); + return
{children}
; }; const OverflowMenuExample = () => { @@ -94,27 +91,34 @@ export default function UiKitPage() { } primary={ } - secondary={} - overflow={} + secondary={ + + } /> } description="Infraestructura mínima del sistema visual Rdx para validar foundations estructurales antes de migrar pantallas funcionales." metadata={ <> - Development only - Static data + Development only + Static data } title="Rdx UI Kit" /> -