feat: add transaction statistics to TransactionsPage; implement reconciled and categorized percentage calculations, enhance card layout, and update UI components for improved data presentation
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m11s

This commit is contained in:
Julien Froidefond
2025-12-23 11:27:06 +01:00
parent 9de7d1a467
commit 01c1f25de2
3 changed files with 78 additions and 6 deletions

View File

@@ -41,13 +41,13 @@ export function OverviewCards({ data }: OverviewCardsProps) {
const reconciled = data.transactions.filter((t) => t.isReconciled).length;
const total = data.transactions.length;
const reconciledPercent =
total > 0 ? Math.round((reconciled / total) * 100) : 0;
total > 0 ? ((reconciled / total) * 100).toFixed(2) : "0.00";
const categorized = data.transactions.filter(
(t) => t.categoryId !== null
).length;
const categorizedPercent =
total > 0 ? Math.round((categorized / total) * 100) : 0;
total > 0 ? ((categorized / total) * 100).toFixed(2) : "0.00";
const formatCurrency = (amount: number) => {
return new Intl.NumberFormat("fr-FR", {