Private
Public Access
1
0

Limit dashboard spending to top 10 categories and fix nav double-highlight

Show top 10 categories in spending breakdown with label indicating the limit.
Fix account-scoped transactions highlighting both Accounts and Transactions
nav items by excluding sub-route match when account-transactions is active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-15 15:59:27 -05:00
parent d5c90a9197
commit dc4fd692ba
3 changed files with 4 additions and 3 deletions
@@ -56,6 +56,7 @@ public class DashboardService : IDashboardService
.GroupBy(t => t.CategoryId)
.Select(g => new { CategoryId = g.Key, Total = -g.Sum(t => t.Amount) })
.OrderByDescending(x => x.Total)
.Take(10)
.ToListAsync();
var categoryIds = spendingByCategory.Where(x => x.CategoryId.HasValue).Select(x => x.CategoryId!.Value);