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

@@ -72,7 +72,14 @@
</form>
}
<a asp-action="Edit" asp-route-id="@Model.TournamentId" class="btn btn-outline-primary">Edit</a>
@if (!Model.IsArchived)
@if (Model.IsArchived)
{
<form asp-action="Unarchive" method="post">
<input type="hidden" name="id" value="@Model.TournamentId" />
<button type="submit" class="btn btn-outline-dark">Unarchive</button>
</form>
}
else if (Model.Status == TournamentStatus.Completed)
{
<form asp-action="Archive" method="post">
<input type="hidden" name="id" value="@Model.TournamentId" />
@@ -80,13 +87,6 @@
onclick="return confirm('Archive this tournament? It will be hidden from the default list but not deleted, and can be restored later.')">Archive</button>
</form>
}
else
{
<form asp-action="Unarchive" method="post">
<input type="hidden" name="id" value="@Model.TournamentId" />
<button type="submit" class="btn btn-outline-dark">Unarchive</button>
</form>
}
</div>
</div>