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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user