From 97e3d1b490e3f433013e6b268814d20e14f440e2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 Aug 2025 17:43:57 +0000 Subject: [PATCH] Fix desktop week grouping to start weeks on Monday instead of grouping consecutive days Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> --- Client/Pages/Index.razor.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Client/Pages/Index.razor.cs b/Client/Pages/Index.razor.cs index da3764c..81bf0a7 100644 --- a/Client/Pages/Index.razor.cs +++ b/Client/Pages/Index.razor.cs @@ -331,15 +331,15 @@ namespace ShiftScheduler.Client.Pages foreach (var day in days) { - // Add the day to current week - currentWeek.Add(day); - - // End the week when it's Sunday - if (day.DayOfWeek == DayOfWeek.Sunday) + // Start a new week if this is Monday and we have days in current week + if (day.DayOfWeek == DayOfWeek.Monday && currentWeek.Count > 0) { weeks.Add(currentWeek); currentWeek = new List(); } + + // Add the day to current week + currentWeek.Add(day); } // Add any remaining days as the last week