mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 15:18:11 +00:00
Payment discrepancy report updates
This commit is contained in:
@@ -121,9 +121,10 @@ const navigationSections: { title: string; items: NavItem[] }[] = [
|
||||
{
|
||||
title: 'Analytics & Reports',
|
||||
items: [
|
||||
{ name: 'Overall', href: '/reports', icon: BarChart3, permission: PERMS.reports.view },
|
||||
{ name: 'Overall', href: '/reports/overall', icon: BarChart3, permission: PERMS.reports.view },
|
||||
{ name: 'Seats', href: '/reports/seats', icon: Armchair, permission: PERMS.reports.view },
|
||||
{ name: 'Passengers', href: '/reports/passengers', icon: Users, permission: PERMS.reports.view },
|
||||
{ name: 'Payments', href: '/reports/payments', icon: CreditCard, permission: PERMS.reports.view },
|
||||
{ name: 'Payment Discrepancy', href: '/reports/payment-discrepancy', icon: AlertTriangle, permission: PERMS.reports.view },
|
||||
// { name: 'Operational Reports', href: '/operational-reports', icon: FileText, permission: PERMS.reports.view },
|
||||
]
|
||||
@@ -221,11 +222,12 @@ export default function Sidebar() {
|
||||
// Special handling for Settings to avoid conflict with User Management
|
||||
let isActive;
|
||||
if (item.href === '/settings') {
|
||||
// Settings is active only for exact match or non-users sub-routes
|
||||
isActive = pathname === '/settings' ||
|
||||
isActive = pathname === '/settings' ||
|
||||
(pathname?.startsWith('/settings/') && !pathname.startsWith('/settings/users'));
|
||||
} else if (item.href === '/payments') {
|
||||
// Exact match only — avoid colliding with /reports/payments
|
||||
isActive = pathname === '/payments' || pathname?.startsWith('/payments/');
|
||||
} else {
|
||||
// Standard matching for other items
|
||||
isActive = pathname === item.href || pathname?.startsWith(item.href + '/');
|
||||
}
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user