From f29664316e6692fb292e054ba832eb1b909f0e0e Mon Sep 17 00:00:00 2001 From: Ruud Andriessen Date: Fri, 16 Oct 2026 13:42:18 +0200 Subject: [PATCH] fix(apollo-vertex): use tabular, right-aligned figures in numeric columns TableChart already right-aligns columns whose align is "right" (the adapter derives this from numeric, currency, percentage, duration and datetime field types). Those cells now also use tabular-nums so digits line up across rows. Table is a generic shadcn primitive with no numeric or align API, so it is left unchanged. The docs example and the dashboard templates now set text-right tabular-nums on their amount columns, and right-align the matching headers. --- apps/apollo-vertex/content/docs/components/table.mdx | 4 ++-- apps/apollo-vertex/templates/dashboard/DashboardCards.tsx | 6 ++++-- apps/apollo-vertex/templates/shell/InvoiceDashboard.tsx | 6 ++++-- apps/apollo-vertex/templates/shell/LoanQcDashboard.tsx | 6 ++++-- .../apollo-vertex/registry/table-chart/table-chart-view.tsx | 6 +++++- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/apps/apollo-vertex/content/docs/components/table.mdx b/apps/apollo-vertex/content/docs/components/table.mdx index 7b718ae180..22d0c6af28 100644 --- a/apps/apollo-vertex/content/docs/components/table.mdx +++ b/apps/apollo-vertex/content/docs/components/table.mdx @@ -30,14 +30,14 @@ export const invoices = [ {invoice.invoice} {invoice.status} {invoice.method} - {invoice.amount} + {invoice.amount} ))} Total - $1,750.00 + $1,750.00 diff --git a/apps/apollo-vertex/templates/dashboard/DashboardCards.tsx b/apps/apollo-vertex/templates/dashboard/DashboardCards.tsx index 7627ea72a7..373dadacd8 100644 --- a/apps/apollo-vertex/templates/dashboard/DashboardCards.tsx +++ b/apps/apollo-vertex/templates/dashboard/DashboardCards.tsx @@ -164,7 +164,7 @@ export function InvoiceTable() { {t("invoice")} {t("vendor")} - {t("amount")} + {t("amount")} {t("status")} {t("date")} @@ -176,7 +176,9 @@ export function InvoiceTable() { {inv.id} {inv.vendor} - {inv.amount} + + {inv.amount} + Invoice Vendor - Amount + Amount Status Date @@ -176,7 +176,9 @@ export function InvoiceDashboard() { > {inv.id} {inv.vendor} - {inv.amount} + + {inv.amount} + {inv.status} diff --git a/apps/apollo-vertex/templates/shell/LoanQcDashboard.tsx b/apps/apollo-vertex/templates/shell/LoanQcDashboard.tsx index aacfff11eb..45513dc3b5 100644 --- a/apps/apollo-vertex/templates/shell/LoanQcDashboard.tsx +++ b/apps/apollo-vertex/templates/shell/LoanQcDashboard.tsx @@ -183,7 +183,7 @@ export function LoanQcDashboard() { Loan ID Borrower - Amount + Amount Type Status Date @@ -196,7 +196,9 @@ export function LoanQcDashboard() { {loan.id} {loan.borrower} - {loan.amount} + + {loan.amount} + {loan.type} diff --git a/packages/apollo-vertex/registry/table-chart/table-chart-view.tsx b/packages/apollo-vertex/registry/table-chart/table-chart-view.tsx index 7f7b712abd..362e96e554 100644 --- a/packages/apollo-vertex/registry/table-chart/table-chart-view.tsx +++ b/packages/apollo-vertex/registry/table-chart/table-chart-view.tsx @@ -89,7 +89,11 @@ export function TableChart({ const value = getValue(); return (
{column.format(value)}