Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

feat(dashboard): redesign hero card around available balance (#785)

Victor Hugo dos Santosd4b698b0264b
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index 5f3e8f45..37148cc1 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -481,9 +481,10 @@
"greetingMorning": "Guten Morgen",
"greetingAfternoon": "Guten Tag",
"greetingEvening": "Guten Abend",
- "totalBalance": "Gesamtsaldo",
- "byCurrency": "Nach Währung:",
- "totalBalanceTooltip": "Der Hauptbetrag fasst alle Konten umgerechnet in deine bevorzugte Währung zusammen. Die Zeile \"Nach Währung\" zeigt die Summen gruppiert nach der Währung des Kontos, nicht umgerechnet. Daher stimmt der Betrag in deiner bevorzugten Währung eventuell nicht mit dem Gesamtsaldo überein (der Rest ergibt sich aus der Umrechnung der anderen Währungen). \"Netto\" passt das Gesamtergebnis um den Betrag an, den du in Gruppensplits schuldest oder geschuldet bekommst.",
+ "availableBalance": "Verfügbarer Kontostand",
+ "netWorth": "Nettovermögen",
+ "netWorthTooltip": "Konten + Investitionen, abzüglich offener Kreditkartenrechnungen.",
+ "creditCardBalance": "Offene Kreditkartenrechnungen",
"pendingSharesOwe": "Netto {{net}} nach Gruppenschulden ({{owed}} ausstehend)",
"pendingSharesOwed": "Netto {{net}} einschließlich {{owed}}, die dir geschuldet werden",
"pendingSharesTooltip": "Spiegelt wider, was du in deinen Gruppen schuldest / dir geschuldet wird, vor einer Abrechnung.",
@@ -528,6 +529,7 @@
"drillDownClose": "Schließen",
"accrualNote": "Kreditkartentransaktionen werden nach dem Fälligkeitsdatum der Abrechnung gruppiert (Soll-Modus).",
"savingsRate": "Sparquote",
+ "savingsRateCaption": "des Einkommens diesen Monat gespart",
"spendingProjection": "Bei diesem Tempo wirst du bis Ende des Monats {{amount}} ausgeben",
"uncategorizedCta": "{{count}} Transaktionen müssen kategorisiert werden",
"uncategorizedTotal": "{{amount}} insgesamt",
diff --git a/frontend/src/locales/el.json b/frontend/src/locales/el.json
index b110f451..8d7e0ca3 100644
--- a/frontend/src/locales/el.json
+++ b/frontend/src/locales/el.json
@@ -481,9 +481,10 @@
"greetingMorning": "Καλημέρα",
"greetingAfternoon": "Καλό απόγευμα",
"greetingEvening": "Καλησπέρα",
- "totalBalance": "Συνολικό υπόλοιπο",
- "byCurrency": "Ανά νόμισμα:",
- "totalBalanceTooltip": "Ο κύριος αριθμός αθροίζει όλους τους λογαριασμούς μετατρεπόμενους στο προτιμώμενο νόμισμά σας. Η γραμμή \"Ανά νόμισμα\" εμφανίζει τα σύνολα ομαδοποιημένα κατά το αρχικό νόμισμα κάθε λογαριασμού, χωρίς μετατροπή — έτσι το στοιχείο στο προτιμώμενο νόμισμά σας μπορεί να μην ταιριάζει με το σύνολο (το υπόλοιπο προέρχεται από μετατροπή των άλλων νομισμάτων). Το \"Καθαρό\" προσαρμόζει το σύνολο για όσα οφείλετε ή σας οφείλονται σε ομαδικούς διαχωρισμούς.",
+ "availableBalance": "Διαθέσιμο υπόλοιπο",
+ "netWorth": "Καθαρή θέση",
+ "netWorthTooltip": "Λογαριασμοί + επενδύσεις, μείον τις ανεξόφλητες οφειλές πιστωτικών καρτών.",
+ "creditCardBalance": "Ανεξόφλητες οφειλές πιστωτικών καρτών",
"pendingSharesOwe": "Καθαρό {{net}} μετά από ομαδικά χρέη ({{owed}} σε εκκρεμότητα)",
"pendingSharesOwed": "Καθαρό {{net}} συμπεριλαμβανομένων {{owed}} που σας οφείλονται",
"pendingSharesTooltip": "Αντικατοπτρίζει όσα οφείλετε / σας οφείλονται στις ομάδες σας, πριν από οποιονδήποτε διακανονισμό.",
@@ -528,6 +529,7 @@
"drillDownClose": "Κλείσιμο",
"accrualNote": "Οι συναλλαγές πιστωτικών καρτών ομαδοποιούνται κατά την ημερομηνία λήξης του λογαριασμού (λειτουργία δεδουλευμένων).",
"savingsRate": "Ποσοστό αποταμίευσης",
+ "savingsRateCaption": "ποσοστό του εισοδήματος που αποταμιεύτηκε αυτόν τον μήνα",
"spendingProjection": "Με αυτόν τον ρυθμό, θα ξοδέψετε {{amount}} μέχρι το τέλος του μήνα",
"uncategorizedCta": "{{count}} συναλλαγές χρειάζονται κατηγοριοποίηση",
"uncategorizedTotal": "{{amount}} συνολικά",
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index 13de2664..91703002 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -481,9 +481,10 @@
"greetingMorning": "Good morning",
"greetingAfternoon": "Good afternoon",
"greetingEvening": "Good evening",
- "totalBalance": "Total Balance",
- "byCurrency": "By currency:",
- "totalBalanceTooltip": "The main figure sums all accounts converted to your preferred currency. The \"By currency\" line shows totals grouped by each account's native currency, unconverted — so the component in your preferred currency may not match the total (the rest comes from converting the other currencies). \"Net\" adjusts the total for what you owe or are owed in group splits.",
+ "availableBalance": "Available balance",
+ "netWorth": "Net Worth",
+ "netWorthTooltip": "Accounts + investments, minus open credit card bills.",
+ "creditCardBalance": "Open credit card bills",
"pendingSharesOwe": "Net {{net}} after group debts ({{owed}} pending)",
"pendingSharesOwed": "Net {{net}} including {{owed}} owed to you",
"pendingSharesTooltip": "Reflects what you owe / are owed across your groups, before any settlement.",
@@ -528,6 +529,7 @@
"drillDownClose": "Close",
"accrualNote": "Credit-card transactions are grouped by bill due date (accrual mode).",
"savingsRate": "Savings Rate",
+ "savingsRateCaption": "share of income saved this month",
"spendingProjection": "At this pace, you'll spend {{amount}} by month end",
"uncategorizedCta": "{{count}} transactions need categorizing",
"uncategorizedTotal": "{{amount}} in total",
diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json
index 0862748c..9841cf28 100644
--- a/frontend/src/locales/es.json
+++ b/frontend/src/locales/es.json
@@ -481,9 +481,10 @@
"greetingMorning": "Buenos días",
"greetingAfternoon": "Buenas tardes",
"greetingEvening": "Buenas noches",
- "totalBalance": "Saldo total",
- "byCurrency": "Por moneda:",
- "totalBalanceTooltip": "La cifra principal suma todas las cuentas convertidas a tu moneda preferida. La línea \"Por moneda\" muestra totales agrupados por la moneda nativa de cada cuenta, sin convertir — por eso el componente en tu moneda preferida puede no coincidir con el total (la diferencia proviene de convertir las otras monedas). \"Neto\" ajusta el total por lo que debes o te deben en divisiones de grupo.",
+ "availableBalance": "Saldo disponible en cuentas",
+ "netWorth": "Patrimonio neto",
+ "netWorthTooltip": "Cuentas + inversiones, descontando las facturas de tarjeta abiertas.",
+ "creditCardBalance": "Facturas de tarjeta abiertas",
"pendingSharesOwe": "Neto {{net}} después de deudas del grupo ({{owed}} pendientes)",
"pendingSharesOwed": "Neto {{net}} incluyendo {{owed}} que te deben",
"pendingSharesTooltip": "Refleja lo que debes / te deben en tus grupos, antes de cualquier liquidación.",
@@ -528,6 +529,7 @@
"drillDownClose": "Cerrar",
"accrualNote": "Las transacciones con tarjeta de crédito se agrupan por la fecha de vencimiento de la factura (modo acumulado).",
"savingsRate": "Tasa de ahorro",
+ "savingsRateCaption": "de tus ingresos ahorrado este mes",
"spendingProjection": "A este ritmo, gastarás {{amount}} para fin de mes",
"uncategorizedCta": "{{count}} transacciones necesitan categorización",
"uncategorizedTotal": "{{amount}} en total",
diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json
index 63caf1b4..2efffccc 100644
--- a/frontend/src/locales/fr.json
+++ b/frontend/src/locales/fr.json
@@ -481,9 +481,10 @@
"greetingMorning": "Bonjour",
"greetingAfternoon": "Bon après-midi",
"greetingEvening": "Bonsoir",
- "totalBalance": "Solde total",
- "byCurrency": "Par devise :",
- "totalBalanceTooltip": "Le chiffre principal additionne tous les comptes convertis dans votre devise préférée. La ligne « Par devise » affiche les totaux regroupés par devise native de chaque compte, sans conversion — le montant dans votre devise préférée peut donc ne pas correspondre au total (le reste provient de la conversion des autres devises). « Net » ajuste le total en fonction de ce que vous devez ou de ce qu'on vous doit dans les partages de groupe.",
+ "availableBalance": "Solde disponible en compte",
+ "netWorth": "Valeur nette",
+ "netWorthTooltip": "Comptes + investissements, moins les factures de carte ouvertes.",
+ "creditCardBalance": "Factures de carte ouvertes",
"pendingSharesOwe": "Net {{net}} après dettes de groupe ({{owed}} en attente)",
"pendingSharesOwed": "Net {{net}} incluant {{owed}} qui vous sont dus",
"pendingSharesTooltip": "Reflète ce que vous devez / ce qu'on vous doit dans vos groupes, avant tout règlement.",
@@ -528,6 +529,7 @@
"drillDownClose": "Fermer",
"accrualNote": "Les transactions par carte de crédit sont regroupées par date d'échéance de la facture (mode comptabilité d'engagement).",
"savingsRate": "Taux d'épargne",
+ "savingsRateCaption": "de vos revenus épargnés ce mois-ci",
"spendingProjection": "À ce rythme, vous dépenserez {{amount}} d'ici la fin du mois",
"uncategorizedCta": "{{count}} transactions à catégoriser",
"uncategorizedTotal": "{{amount}} au total",
diff --git a/frontend/src/locales/it.json b/frontend/src/locales/it.json
index 65821329..145bb27a 100644
--- a/frontend/src/locales/it.json
+++ b/frontend/src/locales/it.json
@@ -481,9 +481,10 @@
"greetingMorning": "Buongiorno",
"greetingAfternoon": "Buon pomeriggio",
"greetingEvening": "Buonasera",
- "totalBalance": "Saldo totale",
- "byCurrency": "Per valuta:",
- "totalBalanceTooltip": "La cifra principale somma tutti i conti convertiti nella tua valuta preferita. La riga \"Per valuta\" mostra i totali raggruppati per valuta nativa di ciascun conto, non convertiti — quindi la componente nella tua valuta preferita potrebbe non coincidere con il totale (il resto deriva dalla conversione delle altre valute). \"Netto\" corregge il totale in base a ciò che devi o che ti è dovuto nelle divisioni di gruppo.",
+ "availableBalance": "Saldo disponibile in conto",
+ "netWorth": "Patrimonio netto",
+ "netWorthTooltip": "Conti + investimenti, meno le fatture della carta di credito aperte.",
+ "creditCardBalance": "Fatture della carta aperte",
"pendingSharesOwe": "Netto {{net}} dopo i debiti di gruppo ({{owed}} in sospeso)",
"pendingSharesOwed": "Netto {{net}} incluso {{owed}} che ti è dovuto",
"pendingSharesTooltip": "Riflette ciò che devi / ti è dovuto nei tuoi gruppi, prima di qualsiasi saldo.",
@@ -528,6 +529,7 @@
"drillDownClose": "Chiudi",
"accrualNote": "Le transazioni con carta di credito sono raggruppate per scadenza dell'estratto conto (modalità per competenza).",
"savingsRate": "Tasso di risparmio",
+ "savingsRateCaption": "del reddito di questo mese risparmiato",
"spendingProjection": "A questo ritmo, spenderai {{amount}} entro fine mese",
"uncategorizedCta": "{{count}} transazioni da categorizzare",
"uncategorizedTotal": "{{amount}} in totale",
diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json
index c2ddd357..18b737ac 100644
--- a/frontend/src/locales/nl.json
+++ b/frontend/src/locales/nl.json
@@ -481,9 +481,10 @@
"greetingMorning": "Goedemorgen",
"greetingAfternoon": "Goedemiddag",
"greetingEvening": "Goedenavond",
- "totalBalance": "Totaal saldo",
- "byCurrency": "Per valuta:",
- "totalBalanceTooltip": "Het hoofdcijfer somt alle rekeningen op die zijn omgerekend naar de valuta van uw voorkeur. Op de regel 'Per valuta' worden de totalen weergegeven, gegroepeerd op de eigen valuta van elke account, niet omgerekend. De component in de valuta van uw voorkeur komt dus mogelijk niet overeen met het totaal (de rest komt door het omrekenen van de andere valuta's). \"Netto\" past het totaal aan voor wat u verschuldigd bent of verschuldigd bent in groepssplitsingen.",
+ "availableBalance": "Beschikbaar saldo op rekeningen",
+ "netWorth": "Nettovermogen",
+ "netWorthTooltip": "Rekeningen + beleggingen, min openstaande creditcardafschriften.",
+ "creditCardBalance": "Openstaande creditcardafschriften",
"pendingSharesOwe": "Netto {{net}} na groepsschulden ({{owed}} in behandeling)",
"pendingSharesOwed": "Netto {{net}} inclusief {{owed}} aan u verschuldigd",
"pendingSharesTooltip": "Geeft weer wat u verschuldigd bent/is aan al uw groepen, vóór enige schikking.",
@@ -528,6 +529,7 @@
"drillDownClose": "Sluiten",
"accrualNote": "Creditcardtransacties worden gegroepeerd op vervaldatum van de factuur (toerekeningsmodus).",
"savingsRate": "Spaarquote",
+ "savingsRateCaption": "van het inkomen deze maand gespaard",
"spendingProjection": "In dit tempo geeft u aan het einde van de maand {{amount}} uit",
"uncategorizedCta": "{{count}} transacties moeten worden gecategoriseerd",
"uncategorizedTotal": "{{amount}} in totaal",
diff --git a/frontend/src/locales/pl.json b/frontend/src/locales/pl.json
index 23df1958..1cf82a0c 100644
--- a/frontend/src/locales/pl.json
+++ b/frontend/src/locales/pl.json
@@ -481,9 +481,10 @@
"greetingMorning": "Dzień dobry",
"greetingAfternoon": "Dzień dobry",
"greetingEvening": "Dobry wieczór",
- "totalBalance": "Saldo łączne",
- "byCurrency": "Wg waluty:",
- "totalBalanceTooltip": "Główna kwota sumuje wszystkie konta przeliczone na preferowaną walutę. Wiersz „Wg waluty” pokazuje sumy zgrupowane wg waluty własnej każdego konta, bez przeliczania — dlatego część w preferowanej walucie może nie zgadzać się z sumą (reszta pochodzi z przeliczenia pozostałych walut). „Netto” koryguje sumę o to, co jesteś winien lub co jest winne Tobie w podziałach grupowych.",
+ "availableBalance": "Dostępne saldo na kontach",
+ "netWorth": "Majątek netto",
+ "netWorthTooltip": "Konta + inwestycje, pomniejszone o otwarte rachunki karty kredytowej.",
+ "creditCardBalance": "Otwarte rachunki karty kredytowej",
"pendingSharesOwe": "Netto {{net}} po długach grupowych ({{owed}} oczekuje)",
"pendingSharesOwed": "Netto {{net}}, w tym {{owed}} należne Tobie",
"pendingSharesTooltip": "Odzwierciedla to, co jesteś winien / co jest Ci winne w grupach, przed rozliczeniem.",
@@ -531,6 +532,7 @@
"drillDownClose": "Zamknij",
"accrualNote": "Transakcje kartą kredytową są grupowane wg terminu płatności rachunku (tryb memoriałowy).",
"savingsRate": "Stopa oszczędności",
+ "savingsRateCaption": "dochodu z tego miesiąca zaoszczędzone",
"spendingProjection": "W tym tempie do końca miesiąca wydasz {{amount}}",
"uncategorizedCta_one": "{{count}} transakcja wymaga skategoryzowania",
"uncategorizedCta_few": "{{count}} transakcje wymagają skategoryzowania",
diff --git a/frontend/src/locales/pt-BR.json b/frontend/src/locales/pt-BR.json
index fe89d08b..4ac0eab0 100644
--- a/frontend/src/locales/pt-BR.json
+++ b/frontend/src/locales/pt-BR.json
@@ -481,9 +481,10 @@
"greetingMorning": "Bom dia",
"greetingAfternoon": "Boa tarde",
"greetingEvening": "Boa noite",
- "totalBalance": "Saldo Total",
- "byCurrency": "Por moeda:",
- "totalBalanceTooltip": "O valor principal soma todas as contas convertidas para sua moeda preferida. A linha \"Por moeda\" mostra os totais separados por moeda original, sem conversão — por isso a soma dos componentes na sua moeda preferida pode não bater com o total (o restante vem da conversão das outras moedas). \"Líquido\" ajusta o total pelo que você tem a receber ou pagar em divisões de grupo.",
+ "availableBalance": "Saldo disponível em contas",
+ "netWorth": "Patrimônio líquido",
+ "netWorthTooltip": "Contas + investimentos, descontando faturas de cartão em aberto.",
+ "creditCardBalance": "Faturas de cartão em aberto",
"pendingSharesOwe": "Líquido {{net}} após dívidas de grupo ({{owed}} pendente)",
"pendingSharesOwed": "Líquido {{net}} incluindo {{owed}} a receber",
"pendingSharesTooltip": "Reflete o que você deve ou vai receber em grupos, antes de qualquer acerto.",
@@ -528,6 +529,7 @@
"drillDownClose": "Fechar",
"accrualNote": "Transações de cartão de crédito são agrupadas pela data de vencimento da fatura (modo competência).",
"savingsRate": "Taxa de Economia",
+ "savingsRateCaption": "da renda deste mês ficou guardada",
"spendingProjection": "Nesse ritmo, você gastará {{amount}} até o fim do mês",
"uncategorizedCta": "{{count}} transações precisam ser categorizadas",
"uncategorizedTotal": "{{amount}} no total",
diff --git a/frontend/src/locales/pt-PT.json b/frontend/src/locales/pt-PT.json
index 73ed9065..13513310 100644
--- a/frontend/src/locales/pt-PT.json
+++ b/frontend/src/locales/pt-PT.json
@@ -481,9 +481,10 @@
"greetingMorning": "Bom dia",
"greetingAfternoon": "Boa tarde",
"greetingEvening": "Boa noite",
- "totalBalance": "Saldo Total",
- "byCurrency": "Por moeda:",
- "totalBalanceTooltip": "O valor principal soma todas as contas convertidas para a tua moeda preferida. A linha \"Por moeda\" mostra os totais separados por moeda original, sem conversão — por isso a soma dos componentes na tua moeda preferida pode não bater com o total (o restante vem da conversão das outras moedas). \"Líquido\" ajusta o total pelo que tens a receber ou pagar em divisões de grupo.",
+ "availableBalance": "Saldo disponível em contas",
+ "netWorth": "Património líquido",
+ "netWorthTooltip": "Contas + investimentos, descontando faturas de cartão em aberto.",
+ "creditCardBalance": "Faturas de cartão em aberto",
"pendingSharesOwe": "Líquido {{net}} após dívidas de grupo ({{owed}} pendente)",
"pendingSharesOwed": "Líquido {{net}} incluindo {{owed}} a receber",
"pendingSharesTooltip": "Reflete o que deves ou vais receber em grupos, antes de qualquer acerto.",
@@ -528,6 +529,7 @@
"drillDownClose": "Fechar",
"accrualNote": "Transações de cartão de crédito são agrupadas pela data de vencimento da fatura (modo competência).",
"savingsRate": "Taxa de Economia",
+ "savingsRateCaption": "do rendimento deste mês ficou guardado",
"spendingProjection": "A esse ritmo, vais gastar {{amount}} até ao fim do mês",
"uncategorizedCta": "{{count}} transações precisam de ser categorizadas",
"uncategorizedTotal": "{{amount}} no total",
diff --git a/frontend/src/locales/ru.json b/frontend/src/locales/ru.json
index 6b9594b5..7da6b4c9 100644
--- a/frontend/src/locales/ru.json
+++ b/frontend/src/locales/ru.json
@@ -481,9 +481,10 @@
"greetingMorning": "Доброе утро",
"greetingAfternoon": "Добрый день",
"greetingEvening": "Добрый вечер",
- "totalBalance": "Общий баланс",
- "byCurrency": "По валютам:",
- "totalBalanceTooltip": "Основная цифра суммирует все счета, конвертированные в вашу основную валюту. Строка «По валютам» показывает итоги, сгруппированные по родной валюте каждого счета, без конвертации — поэтому составляющая в вашей основной валюте может не совпадать с общей суммой (остальное получается от конвертации других валют). «Чистый» корректирует общую сумму с учётом того, что вы должны или вам должны в групповых разделениях.",
+ "availableBalance": "Доступный баланс на счетах",
+ "netWorth": "Собственный капитал",
+ "netWorthTooltip": "Счета + инвестиции, за вычетом открытых счетов по кредитной карте.",
+ "creditCardBalance": "Открытые счета по кредитной карте",
"pendingSharesOwe": "Чистый {{net}} после групповых долгов ({{owed}} ожидает)",
"pendingSharesOwed": "Чистый {{net}} включая {{owed}} задолженность вам",
"pendingSharesTooltip": "Отражает, что вы должны / вам должны по вашим группам, до урегулирования.",
@@ -528,6 +529,7 @@
"drillDownClose": "Закрыть",
"accrualNote": "Кредитные карты: транзакции группируются по дате платежа (метод начисления).",
"savingsRate": "Норма сбережений",
+ "savingsRateCaption": "дохода в этом месяце сохранено",
"spendingProjection": "Такими темпами вы потратите {{amount}} к концу месяца",
"uncategorizedCta": "{{count}} транзакций нужно категоризировать",
"uncategorizedTotal": "На сумму {{amount}}",
diff --git a/frontend/src/locales/sk.json b/frontend/src/locales/sk.json
index 149ba8ec..4d48f91f 100644
--- a/frontend/src/locales/sk.json
+++ b/frontend/src/locales/sk.json
@@ -481,9 +481,10 @@
"greetingMorning": "Dobré ráno",
"greetingAfternoon": "Dobrý deň",
"greetingEvening": "Dobrý večer",
- "totalBalance": "Celkový zostatok",
- "byCurrency": "Podľa meny:",
- "totalBalanceTooltip": "Hlavné číslo je súčet všetkých účtov prepočítaný na tvoju preferovanú menu. Riadok „Podľa meny“ ukazuje súčty zoskupené podľa pôvodnej meny každého účtu, bez prepočtu — takže položka v tvojej preferovanej mene nemusí sedieť s celkovou sumou (zvyšok vzniká prepočtom ostatných mien). „Netto“ upravuje celkovú sumu o to, čo dlhuješ alebo čo ti dlhujú v skupinových výdavkoch.",
+ "availableBalance": "Dostupný zostatok na účtoch",
+ "netWorth": "Čisté imanie",
+ "netWorthTooltip": "Účty + investície, po odpočítaní otvorených faktúr kreditnej karty.",
+ "creditCardBalance": "Otvorené faktúry kreditnej karty",
"pendingSharesOwe": "Netto {{net}} po skupinových dlhoch ({{owed}} čaká na vyrovnanie)",
"pendingSharesOwed": "Netto {{net}} vrátane {{owed}}, ktoré ti dlhujú",
"pendingSharesTooltip": "Zohľadňuje, čo dlhuješ / čo ti dlhujú v tvojich skupinách, pred vyrovnaním.",
@@ -532,6 +533,7 @@
"drillDownClose": "Zavrieť",
"accrualNote": "Transakcie kreditnou kartou sú zoskupené podľa dátumu splatnosti výpisu (akruálny režim).",
"savingsRate": "Miera úspor",
+ "savingsRateCaption": "z príjmu tento mesiac usporené",
"spendingProjection": "Týmto tempom minieš do konca mesiaca {{amount}}",
"uncategorizedCta": "{{count}} transakcií čaká na kategorizáciu",
"uncategorizedCta_one": "{{count}} transakcia čaká na kategorizáciu",
diff --git a/frontend/src/locales/uk.json b/frontend/src/locales/uk.json
index 81be511f..19198ec2 100644
--- a/frontend/src/locales/uk.json
+++ b/frontend/src/locales/uk.json
@@ -481,9 +481,10 @@
"greetingMorning": "Доброго ранку",
"greetingAfternoon": "Добрий день",
"greetingEvening": "Добрий вечір",
- "totalBalance": "Загальний баланс",
- "byCurrency": "За валютами:",
- "totalBalanceTooltip": "Основна цифра підсумовує всі рахунки, конвертовані у вашу основну валюту. Рядок «За валютами» показує підсумки, згруповані за рідною валютою кожного рахунку, без конвертації — тому складова у вашій основній валюті може не збігатися із загальною сумою (решта отримується від конвертації інших валют). «Чистий» коригує загальну суму з урахуванням того, що ви винні або вам винні у групових розділеннях.",
+ "availableBalance": "Доступний баланс на рахунках",
+ "netWorth": "Власний капітал",
+ "netWorthTooltip": "Рахунки + інвестиції, за вирахуванням відкритих рахунків за кредитною карткою.",
+ "creditCardBalance": "Відкриті рахунки за кредитною карткою",
"pendingSharesOwe": "Чистий {{net}} після групових боргів ({{owed}} очікує)",
"pendingSharesOwed": "Чистий {{net}} включно з {{owed}} заборгованості вам",
"pendingSharesTooltip": "Відображає, що ви винні / вам винні за вашими групами, до врегулювання.",
@@ -528,6 +529,7 @@
"drillDownClose": "Закрити",
"accrualNote": "Кредитні картки: транзакції групуються за датою платежу (метод нарахування).",
"savingsRate": "Норма заощаджень",
+ "savingsRateCaption": "доходу заощаджено цього місяця",
"spendingProjection": "Такими темпами ви витратите {{amount}} до кінця місяця",
"uncategorizedCta": "{{count}} транзакцій потрібно категоризувати",
"uncategorizedTotal": "На суму {{amount}}",
diff --git a/frontend/src/pages/dashboard.tsx b/frontend/src/pages/dashboard.tsx
index 20733efd..7258adfb 100644
--- a/frontend/src/pages/dashboard.tsx
+++ b/frontend/src/pages/dashboard.tsx
@@ -1,5 +1,5 @@
import { useState, useEffect, useMemo, useRef } from 'react'
-import { getAccountName } from '@/lib/account-utils'
+import { getAccountLabel, getAccountName } from '@/lib/account-utils'
import { currentMonth, shiftMonth, monthLastDay, monthLabel, monthRange } from '@/lib/month-utils'
import { useTranslation } from 'react-i18next'
import { useDisplayLocale, useDateLocale } from '@/hooks/use-display-locale'
@@ -19,6 +19,7 @@ import {
SelectValue,
} from '@/components/ui/select'
import { Popover, PopoverTrigger, PopoverContent } from '@/components/ui/popover'
+import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip'
import { MonthPicker } from '@/components/ui/monthpicker'
import {
Table,
@@ -34,10 +35,10 @@ import {
Line,
XAxis,
YAxis,
- Tooltip,
+ Tooltip as RechartsTooltip,
ResponsiveContainer,
} from 'recharts'
-import { CheckCircle2, CalendarIcon, Clock, Paperclip, Target, ArrowUpDown, HelpCircle, EyeClosed } from 'lucide-react'
+import { CheckCircle2, CalendarIcon, Clock, Paperclip, Target, ArrowUpDown, HelpCircle, EyeClosed, AlertCircle } from 'lucide-react'
import { Link, useNavigate, useSearchParams } from 'react-router-dom'
import { ICON_MAP } from '@/lib/category-icons'
import { PageHeader } from '@/components/page-header'
@@ -261,7 +262,7 @@ export default function DashboardPage() {
queryFn: categoryGroupsApi.list,
})
- const { data: accountsList } = useQuery({
+ const { data: accountsList, isLoading: accountsLoading, isError: accountsError } = useQuery({
queryKey: ['accounts'],
queryFn: () => accountsApi.list(),
})
@@ -390,11 +391,39 @@ export default function DashboardPage() {
const totalBalance = summary?.total_balance_primary ?? Object.values(summary?.total_balance ?? {}).reduce((a, b) => a + Number(b), 0)
const projectedBalance = summary?.projected_balance_primary ?? Object.values(summary?.projected_balance ?? {}).reduce((a, b) => a + Number(b), 0)
const hasProjectedBalance = Math.abs(projectedBalance - totalBalance) >= 0.01
-
+ const assetsValue = summary?.assets_value_primary ?? Object.values(summary?.assets_value ?? {}).reduce((a, b) => a + b, 0)
+
+ // Available balance: checking/savings accounts only — what's actually
+ // spendable today, as opposed to `totalBalance` (net worth: accounts +
+ // investments - open card bills). Scoped to the active Collection filter,
+ // same as the rest of the dashboard.
+ const availableBalanceAccounts = useMemo(() => {
+ const all = accountsList ?? []
+ const scoped = activeAccountIds ? all.filter((a) => activeAccountIds.includes(a.id)) : all
+ return scoped.filter((a) => a.type === 'checking' || a.type === 'savings')
+ }, [accountsList, activeAccountIds])
+ const availableBalance = availableBalanceAccounts.reduce(
+ (sum, a) => sum + Number(a.balance_primary ?? a.current_balance), 0,
+ )
+ // While accounts are loading or failed to load, treat their balance
+ // components as unavailable rather than silently rendering zero.
+ const accountsUnavailable = accountsLoading || accountsError
+ const creditCardBalance = (accountsList ?? [])
+ .filter((a) => (activeAccountIds ? activeAccountIds.includes(a.id) : true) && a.type === 'credit_card')
+ .reduce((sum, a) => sum + Number(a.balance_primary ?? a.current_balance), 0)
+ // Net worth's "Available balance" breakdown row: every non-card account
+ // (unlike the headline `availableBalance`, which is checking/savings only),
+ // so it reconciles with `totalBalance` — which sums all account types.
+ const nonCardAccountsBalance = (accountsList ?? [])
+ .filter((a) => (activeAccountIds ? activeAccountIds.includes(a.id) : true) && a.type !== 'credit_card')
+ .reduce((sum, a) => sum + Number(a.balance_primary ?? a.current_balance), 0)
// Savings rate & projection
const income = Number(summary?.monthly_income_primary ?? summary?.monthly_income ?? 0)
const expenses = Number(summary?.monthly_expenses_primary ?? summary?.monthly_expenses ?? 0)
+ // What the month is still expected to close at, once recurring entries that
+ // have not posted yet are counted. Rendered only when it differs from the
+ // realised figure, so a month with nothing pending stays quiet.
const projectedIncome = Number(summary?.projected_income_primary ?? summary?.projected_income ?? income)
const projectedExpenses = Number(summary?.projected_expenses_primary ?? summary?.projected_expenses ?? expenses)
const savingsRate = income > 0 ? ((income - expenses) / income) * 100 : 0
@@ -625,194 +654,252 @@ export default function DashboardPage() {
}
/>
- {/* Hero Card: Savings Rate + Uncategorized CTA */}
- <div className="bg-card rounded-xl border border-border shadow-sm mb-5">
- <div className="grid grid-cols-1 lg:grid-cols-3">
- {/* Left: Savings Rate & Metrics */}
- <div className="lg:col-span-2 px-5 py-4">
- <div className="flex items-baseline gap-3 mb-3">
- <div>
- <p className="text-xs font-medium text-muted-foreground mb-0.5">{t('dashboard.savingsRate')}</p>
- {summaryLoading ? (
- <Skeleton className="h-10 w-28" />
- ) : (
- <p className={`text-4xl font-bold tabular-nums leading-tight ${savingsRateColor}`}>
- {savingsRateDisplay}
+ {/* Hero Card: Available Balance + secondary indicators */}
+ <div className="bg-card rounded-xl border border-border shadow-sm mb-5 px-5 pt-5 pb-4">
+ {/* Available balance in checking/savings accounts */}
+ <div className="pb-4 mb-4 border-b border-border">
+ <p className="text-xs font-semibold text-muted-foreground mb-1">{t('dashboard.availableBalance')}</p>
+ {summaryLoading || accountsUnavailable ? (
+ <Skeleton className="h-9 w-40" />
+ ) : (
+ <>
+ {/* Neutral while positive. Size and weight carry the headline;
+ colour is left to mean direction (income, expenses) and
+ exception (a negative balance), so it still says something
+ when it does appear. */}
+ <p className={`text-3xl font-bold tabular-nums leading-tight ${availableBalance < 0 ? 'text-rose-500' : 'text-foreground'}`}>
+ {mask(formatCurrency(availableBalance, primaryCurrency, locale))}
+ </p>
+ {availableBalanceAccounts.length > 0 && (
+ <div className="flex flex-wrap gap-1.5 mt-3">
+ {availableBalanceAccounts.map((acc) => {
+ const bal = Number(acc.balance_primary ?? acc.current_balance)
+ const balCurrency = acc.balance_primary != null ? primaryCurrency : acc.currency
+ // A link, not a click handler: the chip is a navigation
+ // target, so it gets keyboard focus and cmd-click into a
+ // new tab for free. Scale on hover only, which the
+ // compositor handles without touching layout.
+ return (
+ <Link
+ key={acc.id}
+ to={`/accounts/${acc.id}`}
+ className="group inline-flex items-center gap-1 text-[11px] pl-1 pr-2 py-0.5 rounded-full border border-border bg-background transition-transform duration-150 ease-out hover:scale-105 hover:border-foreground/25 focus:outline-none focus-visible:ring-ring/30 focus-visible:ring-[2px]"
+ >
+ {/* The bank mark is what the eye actually sorts on in a
+ row of chips; the name is the confirmation. Falls
+ back to the account-type icon, so manual accounts
+ and providers without a logo still line up. */}
+ <AccountIcon account={acc} size="xs" className="w-4 h-4 rounded-md" />
+ {/* getAccountLabel, not getAccountName: two accounts can
+ share a name, and the mask suffix is what tells them
+ apart in a row of chips. */}
+ <span className="text-muted-foreground group-hover:text-foreground transition-colors">{getAccountLabel(acc)}</span>
+ <span className={`font-semibold tabular-nums ${bal < 0 ? 'text-rose-500' : 'text-foreground'}`}>
+ {mask(formatCurrency(bal, balCurrency, locale))}
+ </span>
+ </Link>
+ )
+ })}
+ </div>
+ )}
+ {/* Net of pending group shares — show only when meaningfully
+ nonzero so users without groups see the same UI as before. */}
+ {summary && Math.abs(summary.pending_shares_net) >= 0.01 && (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <p className="text-xs tabular-nums mt-2.5 inline-block cursor-help text-muted-foreground underline decoration-dotted underline-offset-2">
+ {summary.pending_shares_net < 0
+ ? t('dashboard.pendingSharesOwe', {
+ net: mask(formatCurrency(availableBalance + summary.pending_shares_net, primaryCurrency, locale)),
+ owed: mask(formatCurrency(Math.abs(summary.pending_shares_net), primaryCurrency, locale)),
+ })
+ : t('dashboard.pendingSharesOwed', {
+ net: mask(formatCurrency(availableBalance + summary.pending_shares_net, primaryCurrency, locale)),
+ owed: mask(formatCurrency(summary.pending_shares_net, primaryCurrency, locale)),
+ })}
+ </p>
+ </TooltipTrigger>
+ <TooltipContent>{t('dashboard.pendingSharesTooltip')}</TooltipContent>
+ </Tooltip>
+ )}
+ </>
+ )}
+ </div>
+
+ {/* Secondary indicators */}
+ <div className="grid grid-cols-2 sm:grid-cols-4 gap-x-5 gap-y-4">
+ {/* Income */}
+ <button
+ type="button"
+ className="min-w-0 text-left cursor-pointer hover:opacity-70 transition-opacity"
+ onClick={() => setDrillDown({
+ title: t('dashboard.drillDownIncome', { month: monthLabelStr }),
+ type: 'credit',
+ from: monthStart,
+ to: monthEnd,
+ })}
+ >
+ <p className="text-xs font-medium text-muted-foreground mb-1 min-h-[16px] flex items-center">{t('dashboard.monthlyIncome')}</p>
+ {summaryLoading ? (
+ <Skeleton className="h-6 w-20" />
+ ) : (
+ <>
+ <p className="text-xl font-bold tabular-nums text-emerald-600">
+ +{mask(formatCurrency(income, primaryCurrency, locale))}
+ </p>
+ {Math.abs(projectedIncome - income) >= 0.01 && (
+ <p className="text-xs text-muted-foreground tabular-nums mt-1">
+ {t('dashboard.projectedIncome')} {mask(formatCurrency(projectedIncome, primaryCurrency, locale))}
</p>
)}
- </div>
- </div>
-
- <div className="flex flex-wrap gap-6">
- {/* Balance */}
- <div className="min-w-0">
- <p className="text-xs font-medium text-muted-foreground mb-0.5 flex items-center gap-1">
- {t('dashboard.totalBalance')}
- <span title={t('dashboard.totalBalanceTooltip')} className="inline-flex cursor-help">
- <HelpCircle className="h-3 w-3 text-muted-foreground/60" />
- </span>
+ </>
+ )}
+ </button>
+
+ {/* Expenses */}
+ <button
+ type="button"
+ className="relative min-w-0 text-left cursor-pointer hover:opacity-70 transition-opacity before:content-[''] before:hidden sm:before:block before:absolute before:-left-2.5 before:top-1.5 before:bottom-1.5 before:w-px before:bg-border"
+ onClick={() => setDrillDown({
+ title: t('dashboard.drillDownExpenses', { month: monthLabelStr }),
+ type: 'debit',
+ from: monthStart,
+ to: monthEnd,
+ })}
+ >
+ <p className="text-xs font-medium text-muted-foreground mb-1 min-h-[16px] flex items-center">{t('dashboard.monthlyExpenses')}</p>
+ {summaryLoading ? (
+ <Skeleton className="h-6 w-20" />
+ ) : (
+ <>
+ <p className="text-xl font-bold tabular-nums text-rose-500">
+ -{mask(formatCurrency(expenses, primaryCurrency, locale))}
</p>
- {summaryLoading ? (
- <Skeleton className="h-7 w-24" />
- ) : (
- <div>
- <p className={`text-lg font-bold tabular-nums ${totalBalance < 0 ? 'text-rose-500' : 'text-foreground'}`}>
- {mask(formatCurrency(totalBalance, primaryCurrency, locale))}
- </p>
- {/* Per-currency breakdown when multiple currencies */}
- {summary?.total_balance && Object.keys(summary.total_balance).length > 1 && (
- <div className="flex flex-wrap items-baseline gap-x-1.5 mt-0.5">
- <span className="text-[10px] text-muted-foreground/70">{t('dashboard.byCurrency')}</span>
- {Object.entries(summary.total_balance).map(([cur, val]) => (
- <span key={cur} className="text-[10px] text-muted-foreground tabular-nums">
- {mask(formatCurrency(val, cur, locale))}
- </span>
- ))}
+ {Math.abs(projectedExpenses - expenses) >= 0.01 && (
+ <p className="text-xs text-muted-foreground tabular-nums mt-1">
+ {t('dashboard.projectedExpenses')} {mask(formatCurrency(projectedExpenses, primaryCurrency, locale))}
+ </p>
+ )}
+ </>
+ )}
+ </button>
+
+ {/* Net worth */}
+ <div className="relative min-w-0 before:content-[''] before:hidden sm:before:block before:absolute before:-left-2.5 before:top-1.5 before:bottom-1.5 before:w-px before:bg-border">
+ <p className="text-xs font-medium text-muted-foreground mb-1 min-h-[16px] flex items-center gap-1">
+ {t('dashboard.netWorth')}
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <button
+ type="button"
+ className="inline-flex items-center justify-center w-3.5 h-3.5 rounded-full bg-muted text-muted-foreground hover:bg-primary hover:text-primary-foreground transition-colors text-[9px] font-bold leading-none"
+ >
+ i
+ </button>
+ </TooltipTrigger>
+ <TooltipContent className="w-56">
+ <p>{t('dashboard.netWorthTooltip')}</p>
+ <div className="mt-1.5 pt-1.5 border-t border-background/20 space-y-0.5">
+ <div className="flex justify-between gap-3">
+ <span>{t('dashboard.availableBalance')}</span>
+ <span>{mask(formatCurrency(nonCardAccountsBalance, primaryCurrency, locale))}</span>
+ </div>
+ {assetsValue > 0 && (
+ <div className="flex justify-between gap-3">
+ <span>{t('dashboard.assetsValue')}</span>
+ <span>{mask(formatCurrency(assetsValue, primaryCurrency, locale))}</span>
</div>
)}
- {hasProjectedBalance && (
- <p className="text-[10px] text-muted-foreground tabular-nums mt-0.5">
- {t('dashboard.projectedBalance')} {mask(formatCurrency(projectedBalance, primaryCurrency, locale))}
- </p>
+ {creditCardBalance !== 0 && (
+ <div className="flex justify-between gap-3">
+ <span>{t('dashboard.creditCardBalance')}</span>
+ <span>{mask(formatCurrency(creditCardBalance, primaryCurrency, locale))}</span>
+ </div>
)}
- {/* Net of pending group shares — show only when
- meaningfully nonzero so users without groups
- see the same UI as before. */}
- {summary && Math.abs(summary.pending_shares_net) >= 0.01 && (
- <p
- className={`text-[10px] tabular-nums mt-0.5 ${
- summary.pending_shares_net < 0 ? 'text-rose-500' : 'text-emerald-600'
- }`}
- title={t('dashboard.pendingSharesTooltip')}
- >
- {summary.pending_shares_net < 0
- ? t('dashboard.pendingSharesOwe', {
- net: mask(formatCurrency(totalBalance + summary.pending_shares_net, primaryCurrency, locale)),
- owed: mask(formatCurrency(Math.abs(summary.pending_shares_net), primaryCurrency, locale)),
- })
- : t('dashboard.pendingSharesOwed', {
- net: mask(formatCurrency(totalBalance + summary.pending_shares_net, primaryCurrency, locale)),
- owed: mask(formatCurrency(summary.pending_shares_net, primaryCurrency, locale)),
- })}
- </p>
+ {hasProjectedBalance && (
+ <div className="flex justify-between gap-3">
+ <span>{t('dashboard.projectedBalance')}</span>
+ <span>{mask(formatCurrency(projectedBalance, primaryCurrency, locale))}</span>
+ </div>
)}
</div>
- )}
- </div>
-
- {/* Income */}
- <div
- className="min-w-0 cursor-pointer hover:opacity-70 transition-opacity"
- onClick={() => setDrillDown({
- title: t('dashboard.drillDownIncome', { month: monthLabelStr }),
- type: 'credit',
- from: monthStart,
- to: monthEnd,
- })}
- >
- <p className="text-xs font-medium text-muted-foreground mb-0.5">{t('dashboard.monthlyIncome')}</p>
- {summaryLoading ? (
- <Skeleton className="h-7 w-24" />
- ) : (
- <>
- <p className="text-lg font-bold tabular-nums text-emerald-600">
- +{mask(formatCurrency(income, primaryCurrency, locale))}
- </p>
- {Math.abs(projectedIncome - income) >= 0.01 && (
- <p className="text-[10px] text-muted-foreground tabular-nums mt-0.5">
- {t('dashboard.projectedIncome')} {mask(formatCurrency(projectedIncome, primaryCurrency, locale))}
- </p>
- )}
- </>
- )}
- </div>
-
- {/* Expenses */}
- <div
- className="min-w-0 cursor-pointer hover:opacity-70 transition-opacity"
- onClick={() => setDrillDown({
- title: t('dashboard.drillDownExpenses', { month: monthLabelStr }),
- type: 'debit',
- from: monthStart,
- to: monthEnd,
- })}
- >
- <p className="text-xs font-medium text-muted-foreground mb-0.5">{t('dashboard.monthlyExpenses')}</p>
- {summaryLoading ? (
- <Skeleton className="h-7 w-24" />
- ) : (
- <>
- <p className="text-lg font-bold tabular-nums text-rose-500">
- -{mask(formatCurrency(expenses, primaryCurrency, locale))}
- </p>
- {Math.abs(projectedExpenses - expenses) >= 0.01 && (
- <p className="text-[10px] text-muted-foreground tabular-nums mt-0.5">
- {t('dashboard.projectedExpenses')} {mask(formatCurrency(projectedExpenses, primaryCurrency, locale))}
- </p>
- )}
- </>
- )}
- </div>
-
- {/* Assets Value */}
- {!summaryLoading && summary?.assets_value && Object.values(summary.assets_value).reduce((a, b) => a + b, 0) > 0 && (
- <div className="min-w-0">
- <p className="text-xs font-medium text-muted-foreground mb-0.5">{t('dashboard.assetsValue')}</p>
- <p className="text-lg font-bold tabular-nums text-blue-600">
- {mask(formatCurrency(summary.assets_value_primary ?? Object.values(summary.assets_value).reduce((a, b) => a + b, 0), primaryCurrency, locale))}
- </p>
- </div>
- )}
- </div>
-
- {/* Spending projection */}
- {projectedSpend !== null && !summaryLoading && (
- <p className="text-xs text-muted-foreground mt-2">
- {t('dashboard.spendingProjection', { amount: mask(formatCurrency(projectedSpend, primaryCurrency, locale)) })}
+ </TooltipContent>
+ </Tooltip>
+ </p>
+ {/* Net worth stays neutral so the secondary row does not out-shout
+ the headline above it. It is the larger number here; colouring
+ it too pulled the eye away from available balance. */}
+ {summaryLoading || accountsUnavailable ? (
+ <Skeleton className="h-6 w-24" />
+ ) : (
+ <p className={`text-xl font-bold tabular-nums ${totalBalance < 0 ? 'text-rose-500' : 'text-foreground'}`}>
+ {mask(formatCurrency(totalBalance, primaryCurrency, locale))}
</p>
)}
</div>
- {/* Right: Uncategorized CTA */}
- <div className="lg:col-span-1 px-5 py-4 border-t lg:border-t-0 lg:border-l border-border flex flex-col items-center justify-center text-center">
+ {/* Savings rate */}
+ <div className="relative min-w-0 before:content-[''] before:hidden sm:before:block before:absolute before:-left-2.5 before:top-1.5 before:bottom-1.5 before:w-px before:bg-border">
+ <p className="text-xs font-medium text-muted-foreground mb-1 min-h-[16px] flex items-center">{t('dashboard.savingsRate')}</p>
{summaryLoading ? (
- <Skeleton className="h-16 w-16 rounded-full" />
- ) : uncategorizedCount > 0 ? (
- <div
- className="cursor-pointer hover:opacity-80 transition-opacity"
- onClick={() => setDrillDown({
- title: t('dashboard.drillDownUncategorized'),
- uncategorized: true,
- })}
- >
- <div className={`w-14 h-14 rounded-full flex items-center justify-center text-xl font-bold text-white mx-auto mb-2 ${
- uncategorizedCount >= 20 ? 'bg-amber-500' : 'bg-amber-400'
- }`}>
- {uncategorizedCount}
- </div>
- <p className="text-sm font-medium text-foreground">
- {t('dashboard.uncategorizedCta', { count: uncategorizedCount })}
- </p>
- {uncategorizedAmount > 0 && (
- <p className="text-xs text-muted-foreground mt-0.5">
- {mask(t('dashboard.uncategorizedTotal', { amount: formatCurrency(uncategorizedAmount, userCurrency, locale) }))}
- </p>
- )}
- <p className="text-sm font-semibold text-amber-600 mt-2 hover:underline">
- {t('dashboard.categorizeNow')} &rarr;
- </p>
- </div>
+ <Skeleton className="h-6 w-16" />
) : (
- <div>
- <CheckCircle2 className="w-10 h-10 text-emerald-500 mx-auto mb-1.5" />
- <p className="text-sm font-semibold text-foreground">{t('dashboard.allCategorized')}</p>
- <p className="text-xs text-muted-foreground mt-0.5">{t('dashboard.allCategorizedDesc')}</p>
- </div>
+ <>
+ <p className={`text-xl font-bold tabular-nums ${savingsRateColor}`}>
+ {savingsRateDisplay}
+ </p>
+ <p className="text-[10px] text-muted-foreground mt-0.5">{t('dashboard.savingsRateCaption')}</p>
+ </>
)}
</div>
</div>
+
+ {/* Spending projection */}
+ {projectedSpend !== null && !summaryLoading && (
+ <p className="text-xs text-muted-foreground mt-3">
+ {t('dashboard.spendingProjection', { amount: mask(formatCurrency(projectedSpend, primaryCurrency, locale)) })}
+ </p>
+ )}
</div>
+ {/* Uncategorized banner */}
+ {!summaryLoading && (
+ uncategorizedCount > 0 ? (
+ <button
+ type="button"
+ className="w-full flex items-center justify-between gap-3 bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/30 rounded-lg px-4 py-2.5 mb-5 cursor-pointer hover:bg-amber-100 dark:hover:bg-amber-500/20 transition-colors"
+ onClick={() => setDrillDown({
+ title: t('dashboard.drillDownUncategorized'),
+ uncategorized: true,
+ })}
+ >
+ <div className="flex items-center gap-2.5 min-w-0">
+ {/* An icon, not the count: the sentence beside it already states
+ the number, and a fixed 24px circle clipped it from four
+ digits on. Severity still reads through the tint. */}
+ <AlertCircle
+ size={16}
+ className={`shrink-0 ${uncategorizedCount >= 20 ? 'text-amber-600 dark:text-amber-400' : 'text-amber-500 dark:text-amber-500'}`}
+ />
+ <span className="text-sm text-amber-900 dark:text-amber-200 truncate">
+ {t('dashboard.uncategorizedCta', { count: uncategorizedCount })}
+ {uncategorizedAmount > 0 && (
+ <span className="text-amber-700/70 dark:text-amber-300/70"> · {mask(formatCurrency(uncategorizedAmount, userCurrency, locale))}</span>
+ )}
+ </span>
+ </div>
+ <span className="shrink-0 text-sm font-semibold text-amber-600 dark:text-amber-400 hover:underline">
+ {t('dashboard.categorizeNow')} &rarr;
+ </span>
+ </button>
+ ) : (
+ <div className="flex items-center gap-2 bg-emerald-50 dark:bg-emerald-500/10 border border-emerald-200 dark:border-emerald-500/30 rounded-lg px-4 py-2.5 mb-5">
+ <CheckCircle2 className="w-4 h-4 text-emerald-500 shrink-0" />
+ <span className="text-sm text-emerald-900 dark:text-emerald-200">{t('dashboard.allCategorized')}</span>
+ </div>
+ )
+ )}
+
{/* Charts: Category Spending Bars + Balance Flow */}
<div className="grid grid-cols-1 lg:grid-cols-2 gap-5 mb-5" style={{ gridAutoRows: 'minmax(380px, auto)' }}>
{/* Category Spending Bars */}
@@ -989,7 +1076,7 @@ export default function DashboardPage() {
(dataMax: number) => Math.ceil(dataMax / 100) * 100,
]}
/>
- <Tooltip
+ <RechartsTooltip
formatter={(value, name) => [
value !== null ? (privacyMode ? MASK : formatCurrency(Number(value), userCurrency, locale)) : '\u2014',
name === 'current' ? monthLabel(selectedMonth, uiLocale).split(' ')[0] : monthLabel(prevMonth, uiLocale).split(' ')[0],