From b2566af74334b69eb45ca03c89db9ea137e9bccf Mon Sep 17 00:00:00 2001 From: Erik Silva Date: Wed, 4 Feb 2026 19:57:20 -0300 Subject: [PATCH] fix: remove remaining redundant items and sync mobile menu with financial sub-items --- .../(dashboard)/dashboard/financial/page.tsx | 12 ++- src/components/FinancialDashboard.tsx | 89 +------------------ src/components/MobileNav.tsx | 61 +++++++++---- 3 files changed, 56 insertions(+), 106 deletions(-) diff --git a/src/app/(dashboard)/dashboard/financial/page.tsx b/src/app/(dashboard)/dashboard/financial/page.tsx index dee029b..c591695 100644 --- a/src/app/(dashboard)/dashboard/financial/page.tsx +++ b/src/app/(dashboard)/dashboard/financial/page.tsx @@ -19,8 +19,16 @@ export default async function FinancialPage({ searchParams }: FinancialPageProps
-

Financeiro

-

Gerencie mensalidades, caixinha e arrecadações extras.

+

+ {tab === 'TRANSACTIONS' ? 'Fluxo de Caixa' : tab === 'REPORTS' ? 'Relatórios Financeiros' : 'Eventos Financeiros'} +

+

+ {tab === 'TRANSACTIONS' + ? 'Acompanhe as entradas e saídas do caixa do grupo.' + : tab === 'REPORTS' + ? 'Análise detalhada da saúde financeira do time.' + : 'Gerencie mensalidades e arrecadações extras.'} +

diff --git a/src/components/FinancialDashboard.tsx b/src/components/FinancialDashboard.tsx index e53d7ea..48d76e5 100644 --- a/src/components/FinancialDashboard.tsx +++ b/src/components/FinancialDashboard.tsx @@ -292,45 +292,7 @@ export function FinancialDashboard({ events, transactions, players, group, initi return (
- {/* Stats Overview */} -
-
-
-
- -
-
-

Saldo em Caixa

-

R$ {totalStats.balance.toFixed(2)}

-

Total acumulado

-
-
-
-
-
-
- -
-
-

Entradas (Mesas/Extras)

-

R$ {(totalStats.paid + totalStats.transIncome).toFixed(2)}

-
-
-
- -
-
-
- -
-
-

Saídas / Despesas

-

R$ {totalStats.transExpense.toFixed(2)}

-
-
-
-
@@ -420,56 +382,7 @@ export function FinancialDashboard({ events, transactions, players, group, initi
-
- {mainTab === 'EVENTS' ? ( - [ - { id: 'ALL', label: 'Todos' }, - { id: 'MONTHLY_FEE', label: 'Mensalidades' }, - { id: 'EXTRA_EVENT', label: 'Eventos Extras' } - ].map((tab) => ( - - )) - ) : mainTab === 'TRANSACTIONS' ? ( - [ - { id: 'ALL', label: 'Histórico Completo' }, - { id: 'INCOME', label: 'Entradas' }, - { id: 'EXPENSE', label: 'Saídas' } - ].map((tab) => ( - - )) - ) : ( -
- Resumo Inteligente -
- )} -
- {mainTab === 'EVENTS' ? filteredEvents.length : mainTab === 'TRANSACTIONS' ? filteredTransactions.length : '1'} REGISTROS -
-
+

Menu Principal

{navItems.map((item) => { - const isActive = pathname === item.href + const isActive = pathname === item.href || (item.subItems && pathname.startsWith(item.href)) + const hasSubItems = item.subItems && item.subItems.length > 0 + return ( - setIsOpen(false)} - className={clsx( - "flex items-center gap-4 px-4 py-4 rounded-xl text-base font-medium transition-all duration-200 group relative overflow-hidden", - isActive - ? "bg-primary text-background shadow-lg shadow-primary/20" - : "text-muted hover:text-foreground hover:bg-surface border border-transparent hover:border-white/5" +
+ !hasSubItems && setIsOpen(false)} + className={clsx( + "flex items-center gap-4 px-4 py-4 rounded-xl text-base font-medium transition-all duration-200 group relative overflow-hidden", + isActive + ? "bg-primary text-background shadow-lg shadow-primary/20" + : "text-muted hover:text-foreground hover:bg-surface border border-transparent hover:border-white/5" + )} + > + + {item.name} + {!isActive && !hasSubItems && } + + + {hasSubItems && (isActive || pathname.startsWith(item.href)) && ( +
+ {item.subItems!.map((sub) => ( + setIsOpen(false)} + className="flex items-center gap-3 py-3 text-sm font-bold uppercase tracking-wider text-muted hover:text-primary transition-colors" + > + + {sub.name} + + ))} +
)} - > - - {item.name} - {!isActive && } - +
) })}