- {transactions.slice(0, 10).map(tx => (
-
+
+ {transactions.slice(0, 8).map(tx => (
+
-
{tx.name}
+
{tx.name}
{tx.date}
-
- {tx.type === 'income' ? '+' : '-'}{fmt(tx.amount)}
+
+ {tx.type === 'income' ? '+' : '−'}{fmt(tx.amount)}
))}
+
+ {/* Top Expenses */}
+
+
+ Top Monthly Expenses
+
+
+
+ {topExpenses.slice(0, 10).map(expense => (
+
+ {expense.name}
+ {fmt(getMonthlyAmount(expense.amount, expense.frequency))}
+
+ ))}
+
+
+
+
+ {/* Summary Stats */}
+
+
+ Monthly Summary
+
+
+
+
+
{fmt(monthlyIncome)}
+
Total Income
+
+
+
{fmt(monthlyExpenses)}
+
Total Expenses
+
+
+
= 0 ? 'text-green-400' : 'text-red-400'}`}>{fmt(monthlySavings)}
+
Net Savings
+
+
+
+
+ Savings Rate
+ = 20 ? 'text-green-400' : ''}`}>{savingsRate.toFixed(1)}%
+
+
+
= 20 ? 'bg-green-400/50' : 'bg-foreground/30'}`} style={{width: `${Math.min(savingsRate, 100)}%`}} />
+
+
+
+
+
+
+
+
);
}
-
diff --git a/frontend-web/src/pages/ClientsPage.tsx b/frontend-web/src/pages/ClientsPage.tsx
index 6a31069..a2254c7 100644
--- a/frontend-web/src/pages/ClientsPage.tsx
+++ b/frontend-web/src/pages/ClientsPage.tsx
@@ -1,8 +1,11 @@
+import {useState} from 'react';
import {Card, CardContent} from '@/components/ui/card';
import {Button} from '@/components/ui/button';
import {useAppSelector} from '@/store';
+import AddClientDialog from '@/components/dialogs/AddClientDialog';
export default function ClientsPage() {
+ const [dialogOpen, setDialogOpen] = useState(false);
const {clients, invoices} = useAppSelector(state => state.invoices);
const getClientStats = (clientId: string) => {
@@ -29,7 +32,7 @@ export default function ClientsPage() {
Outstanding {fmt(totalOutstanding)}