From 801f04df12221ee241bc2db42f2ef8b56d90b6d9 Mon Sep 17 00:00:00 2001 From: Jose Selesan Date: Fri, 29 May 2026 19:13:22 -0300 Subject: [PATCH] feat(dashboard): add monthly totals data to DashboardPage and update pending payments display --- apps/frontend/src/features/dashboard/DashboardPage.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/features/dashboard/DashboardPage.tsx b/apps/frontend/src/features/dashboard/DashboardPage.tsx index 77c59f6..1a6f968 100644 --- a/apps/frontend/src/features/dashboard/DashboardPage.tsx +++ b/apps/frontend/src/features/dashboard/DashboardPage.tsx @@ -1,7 +1,7 @@ import { Minus, RefreshCw, TrendingDown, TrendingUp } from "lucide-react"; import { RelativeTime } from "@/lib/time"; import type { Quote } from "@/lib/api"; -import { useQuotes, useFetchQuotes, useMonthlyPayedTotal } from "@/lib/queries"; +import { useQuotes, useFetchQuotes, useMonthlyPayedTotal, useMonthlyTotals } from "@/lib/queries"; import { useNavigate } from "@tanstack/react-router"; import { Tooltip, @@ -103,6 +103,7 @@ export function DashboardPage() { const now = new Date(); const { data: monthlyExpenses } = useMonthlyPayedTotal(now.getFullYear(), now.getMonth() + 1); + const { data: monthlyTotals } = useMonthlyTotals(now.getFullYear(), now.getMonth() + 1); const isFetching = isLoading || isPending; @@ -122,8 +123,8 @@ export function DashboardPage() {
-

Total ingresos

-

$0.00

+

Pagos pendientes

+

${priceFormatter.format(monthlyTotals?.pending ?? 0)}

Gastos del mes