From 4215a68d35e2811129b8da0c9708301bf3475313 Mon Sep 17 00:00:00 2001 From: Jason Sylvestre Date: Thu, 4 Jun 2026 06:58:18 -0700 Subject: [PATCH 1/3] Add pending approval transaction count to home page This provides users with visibility into transactions awaiting approval for each team directly from the dashboard. --- Sloth.Web/Controllers/HomeController.cs | 12 ++++++++++++ .../Models/HomeViewModels/HomeIndexViewModel.cs | 2 ++ Sloth.Web/Views/Home/Index.cshtml | 2 ++ 3 files changed, 16 insertions(+) diff --git a/Sloth.Web/Controllers/HomeController.cs b/Sloth.Web/Controllers/HomeController.cs index 94d8c782..6793dc77 100644 --- a/Sloth.Web/Controllers/HomeController.cs +++ b/Sloth.Web/Controllers/HomeController.cs @@ -54,6 +54,17 @@ public async Task Index() }) .ToDictionaryAsync(t => t.Slug, t => t.Count); + var pendingApprovalTransactionCounts = await DbContext.Transactions + .Where(t => teamSlugs.Contains(t.Source.Team.Slug) + && t.Status == TransactionStatuses.PendingApproval) + .GroupBy(t => t.Source.Team.Slug) + .Select(t => new + { + Slug = t.Key, + Count = t.Count(), + }) + .ToDictionaryAsync(t => t.Slug, t => t.Count); + var stuckTransactionCounts = await DbContext.Transactions .Where(t => teamSlugs.Contains(t.Source.Team.Slug) && ((t.Status == TransactionStatuses.Processing && t.LastModified < stuckCutoff) @@ -75,6 +86,7 @@ public async Task Index() Slug = t.Slug, SourceNames = t.Sources?.OrderBy(s => s.Name).Select(s => s.Name).ToList() ?? new List(), FailedTransactionCount = failedTransactionCounts.TryGetValue(t.Slug, out var failedCount) ? failedCount : 0, + PendingApprovalTransactionCount = pendingApprovalTransactionCounts.TryGetValue(t.Slug, out var pendingApprovalCount) ? pendingApprovalCount : 0, StuckTransactionCount = stuckTransactionCounts.TryGetValue(t.Slug, out var stuckCount) ? stuckCount : 0, }) .ToList(), diff --git a/Sloth.Web/Models/HomeViewModels/HomeIndexViewModel.cs b/Sloth.Web/Models/HomeViewModels/HomeIndexViewModel.cs index e6cfdf24..8e19c57f 100644 --- a/Sloth.Web/Models/HomeViewModels/HomeIndexViewModel.cs +++ b/Sloth.Web/Models/HomeViewModels/HomeIndexViewModel.cs @@ -17,6 +17,8 @@ public class HomeTeamSummaryViewModel public int FailedTransactionCount { get; set; } + public int PendingApprovalTransactionCount { get; set; } + public int StuckTransactionCount { get; set; } } } diff --git a/Sloth.Web/Views/Home/Index.cshtml b/Sloth.Web/Views/Home/Index.cshtml index 1189c77c..c439fc57 100644 --- a/Sloth.Web/Views/Home/Index.cshtml +++ b/Sloth.Web/Views/Home/Index.cshtml @@ -21,6 +21,7 @@ Slug Sources Rejected Transactions + Pending Approval Transactions Stuck Transactions @@ -35,6 +36,7 @@ @team.Slug @(team.SourceNames.Any() ? string.Join(", ", team.SourceNames) : "None") @team.FailedTransactionCount + @team.PendingApprovalTransactionCount @team.StuckTransactionCount } From 1ae9003a06087099dbb8539d1b6646386eca63f1 Mon Sep 17 00:00:00 2001 From: Jason Sylvestre Date: Thu, 4 Jun 2026 06:58:39 -0700 Subject: [PATCH 2/3] Refine SLOTH branding and reorder home dashboard columns Updates the presentation of the S.L.O.T.H. acronym for a cleaner display. Reorders the "Pending Approval" and "Rejected Transactions" columns in the team overview table on the home page for improved readability, also shortening the "Pending Approval Transactions" header. --- Sloth.Web/Views/Home/Index.cshtml | 6 +++--- Sloth.Web/Views/Home/TeamIndex.cshtml | 13 ++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Sloth.Web/Views/Home/Index.cshtml b/Sloth.Web/Views/Home/Index.cshtml index c439fc57..97ab5a08 100644 --- a/Sloth.Web/Views/Home/Index.cshtml +++ b/Sloth.Web/Views/Home/Index.cshtml @@ -20,8 +20,8 @@ Name Slug Sources - Rejected Transactions - Pending Approval Transactions + Pending Approval + Rejected Transactions Stuck Transactions @@ -35,8 +35,8 @@ @team.Slug @(team.SourceNames.Any() ? string.Join(", ", team.SourceNames) : "None") - @team.FailedTransactionCount @team.PendingApprovalTransactionCount + @team.FailedTransactionCount @team.StuckTransactionCount } diff --git a/Sloth.Web/Views/Home/TeamIndex.cshtml b/Sloth.Web/Views/Home/TeamIndex.cshtml index 08bc90cc..df34b5aa 100644 --- a/Sloth.Web/Views/Home/TeamIndex.cshtml +++ b/Sloth.Web/Views/Home/TeamIndex.cshtml @@ -13,15 +13,10 @@
- -

SLOTH

-
    -
  • Secure Scrubber
  • -
  • Ledger Loader
  • -
  • Online
  • -
  • Transaction
  • -
  • Hub
  • -
+
+

S.L.O.T.H.

+

Secure Ledger Online Transaction Hub

+
From c0842db42a6054f1a1f71896961eba384664d328 Mon Sep 17 00:00:00 2001 From: Jason Sylvestre Date: Thu, 4 Jun 2026 07:13:50 -0700 Subject: [PATCH 3/3] Add `home-page` class to main container on home view --- Sloth.Web/Views/Home/TeamIndex.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sloth.Web/Views/Home/TeamIndex.cshtml b/Sloth.Web/Views/Home/TeamIndex.cshtml index df34b5aa..1de92dd5 100644 --- a/Sloth.Web/Views/Home/TeamIndex.cshtml +++ b/Sloth.Web/Views/Home/TeamIndex.cshtml @@ -10,7 +10,7 @@ .Sum(x => x.Amount); } -
+