From 9742da439a03beacd0ca83479d7412932f1d9744 Mon Sep 17 00:00:00 2001 From: vladtechno Date: Sat, 20 Jun 2026 00:59:53 +1000 Subject: [PATCH] =?UTF-8?q?feat(pwa):=20balance=20hero=20shows=20net=20?= =?UTF-8?q?=C2=AB=D0=91=D0=B0=D0=BB=D0=B0=D0=BD=D1=81=C2=BB=20(was=20?= =?UTF-8?q?=C2=AB=D0=9E=D0=B1=D1=89=D0=B8=D0=B9=20=D0=B4=D0=BE=D0=BB=D0=B3?= =?UTF-8?q?=C2=BB=20of=20negatives)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- driver-pwa/frontend/src/pages/BalancePage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driver-pwa/frontend/src/pages/BalancePage.tsx b/driver-pwa/frontend/src/pages/BalancePage.tsx index 2ca0dba..169d3a5 100644 --- a/driver-pwa/frontend/src/pages/BalancePage.tsx +++ b/driver-pwa/frontend/src/pages/BalancePage.tsx @@ -13,14 +13,14 @@ export function BalancePage() { const { data, isLoading, isError, refetch } = useQuery({ queryKey: ["balance"], queryFn: getBalance }); const accounts = data?.accounts ?? []; - const totalDebt = accounts.filter((a) => a.balance < 0).reduce((s, a) => s + a.balance, 0); + const total = accounts.reduce((s, a) => s + a.balance, 0); return (
-

Общий долг

-

{formatMoney(totalDebt)}

+

Баланс

+

{formatMoney(total)}

{isLoading ? (