many bug fixes

This commit is contained in:
2026-06-27 13:14:39 -04:00
parent 78dbbc2051
commit ddb2d58e2f
12 changed files with 170 additions and 42 deletions

View File

@@ -21,7 +21,10 @@ public class TournamentController : Controller
public async Task<IActionResult> Index(TournamentStatus? status, bool showArchived = false, int page = 1, int pageSize = PaginationHelper.PageSize)
{
var tournaments = await _tournamentService.GetAllAsync(includeArchived: showArchived);
var all = await _tournamentService.GetAllAsync(includeArchived: true);
var archivedCount = all.Count(t => t.IsArchived);
var tournaments = showArchived ? all : all.Where(t => !t.IsArchived);
if (status.HasValue)
{
@@ -30,6 +33,7 @@ public class TournamentController : Controller
ViewBag.SelectedStatus = status;
ViewBag.ShowArchived = showArchived;
ViewBag.ArchivedCount = archivedCount;
return View(this.Page(tournaments, page, pageSize));
}