chore: group invoices, payments and usd payments

This commit is contained in:
Nathnael
2026-08-13 11:22:45 +00:00
parent 4ae63d4e5c
commit 86d69a9577
7 changed files with 244 additions and 170 deletions

View File

@@ -44,10 +44,12 @@ const ROUTE_META: Array<{ prefix: string; meta: PageMeta }> = [
},
},
{
prefix: "/dashboard/payments",
// Invoices, Payments, and USD Payments are tabs on one page now
// (FinanceHubPage); the header title itself is set per-tab there.
prefix: "/dashboard/invoices",
meta: {
title: "Payments",
subtitle: "View booking payment transactions",
title: "Invoices",
subtitle: "Invoices, payments, and USD bank transfers",
},
},
{

View File

@@ -9,7 +9,6 @@ import {
FileText,
Hammer,
History,
Landmark,
LayoutDashboard,
LayoutGrid,
MapPin,
@@ -97,22 +96,13 @@ export const buildSidebarSections = (
permission: FREIGHT_PERMS.contracts.opsClearanceReview,
},
{
label: "Payments",
href: "/dashboard/payments",
icon: <Wallet />,
permission: FREIGHT_PERMS.payments.view,
},
{
label: "Invoices",
// Invoices, Payments, and USD Payments live on one page as tabs
// (FinanceHubPage) — single nav entry, OR'd across both keys so
// either permission alone still gets a user in.
label: "Transactions",
href: "/dashboard/invoices",
icon: <Receipt />,
permission: FREIGHT_PERMS.invoices.view,
},
{
label: "USD Payments",
href: "/dashboard/usd-payments",
icon: <Landmark />,
permission: FREIGHT_PERMS.invoices.view,
permission: [FREIGHT_PERMS.invoices.view, FREIGHT_PERMS.payments.view],
},
{
label: "Support",