many bug fixes
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user