From 5d2d019e870b0d36926e8e5190bc4190e804dfbe Mon Sep 17 00:00:00 2001 From: James Kolpack Date: Wed, 8 Apr 2026 14:22:47 -0400 Subject: [PATCH] Refactor Printout component to enhance student ordering and include captain information --- WebApp/Components/Features/Teams/Printout.razor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebApp/Components/Features/Teams/Printout.razor b/WebApp/Components/Features/Teams/Printout.razor index e0059ca..0d264fb 100644 --- a/WebApp/Components/Features/Teams/Printout.razor +++ b/WebApp/Components/Features/Teams/Printout.razor @@ -41,9 +41,8 @@ else @{ var students = context.Students - .OrderByDescending(s => s == context.Captain) - .ThenByDescending(e => e.Grade) - .ThenByDescending(e => e.TsaYear) + .OrderByDescending(s => context.Captain != null && context.Captain.Equals(s)) + .ThenByDescending(e => e.Grade + e.TsaYear) .ThenBy(e => e.FirstName) .ToArray(); } @@ -233,6 +232,7 @@ else .AsNoTracking() .Include(e => e.Event) .Include(e => e.Students) + .Include(e => e.Captain) .OrderByEventFormatFirst() .ThenBy(e => e.Event.Name) .ThenBy(e => e.Identifier ?? "")