Initial Commit

This commit is contained in:
2026-03-01 15:14:42 -04:00
commit f60174625e
377 changed files with 98166 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
@model IEnumerable<EventRegistrationDto>
@{
ViewData["Title"] = "Student Registrations";
var studentName = ViewBag.StudentName as string;
}
<h2>Registrations for @studentName</h2>
<hr />
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr><th>Event</th><th>Level</th><th>Registered</th><th>Score</th><th>Placement</th></tr>
</thead>
<tbody>
@foreach (var r in Model)
{
<tr>
<td>@r.EventName</td>
<td>@r.EventLevelName</td>
<td>@r.RegisteredAt.ToString("MMM d, yyyy")</td>
<td>@(r.Score?.RawPerformance.ToString() ?? "-")</td>
<td>@(r.Score?.Placement?.ToString() ?? "-")</td>
</tr>
}
</tbody>
</table>
<a asp-controller="Student" asp-action="Index" class="btn btn-secondary">Back to Students</a>

View File

@@ -0,0 +1,64 @@
@model IEnumerable<EventRegistrationDto>
@{
ViewData["Title"] = "Registrations";
var telId = ViewBag.TournamentEventLevelId as int?;
var eventName = ViewBag.EventName as string;
var levelName = ViewBag.LevelName as string;
}
<div class="d-flex justify-content-between align-items-center mb-3">
<div>
<h2>Registrations</h2>
@if (eventName != null) { <p class="text-muted mb-0">@eventName - @levelName</p> }
</div>
@if (telId.HasValue)
{
<a asp-action="Register" asp-route-tournamentEventLevelId="@telId" class="btn btn-primary">Register Student</a>
}
</div>
<partial name="_Notification" />
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr>
<th>Student</th>
<th>School</th>
<th>Event</th>
<th>Level</th>
<th>Registered</th>
<th>Score</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach (var r in Model)
{
<tr>
<td>@(r.StudentName ?? r.RelayTeamName ?? "N/A")</td>
<td>@r.SchoolName</td>
<td>@r.EventName</td>
<td>@r.EventLevelName</td>
<td>@r.RegisteredAt.ToString("MMM d, yyyy HH:mm")</td>
<td>
@if (r.Score != null)
{
<span class="badge bg-success">@r.Score.RawPerformance</span>
@if (r.Score.Placement.HasValue) { <span class="badge bg-warning text-dark">#@r.Score.Placement</span> }
}
else
{
<span class="text-muted">-</span>
}
</td>
<td>
<form asp-action="Unregister" method="post" class="d-inline">
<input type="hidden" name="eventRegistrationId" value="@r.EventRegistrationId" />
@if (telId.HasValue) { <input type="hidden" name="tournamentEventLevelId" value="@telId" /> }
<button type="submit" class="btn btn-sm btn-outline-danger" onclick="return confirm('Unregister?')">Remove</button>
</form>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,30 @@
@{
ViewData["Title"] = "Register Student";
var students = ViewBag.Students as IEnumerable<StudentDto>;
var telId = ViewBag.TournamentEventLevelId as int?;
var eventName = ViewBag.EventName as string;
var levelName = ViewBag.LevelName as string;
}
<h2>Register Student</h2>
<p class="text-muted">@eventName - @levelName</p>
<hr />
<partial name="_Notification" />
<div class="row">
<div class="col-md-6">
<form asp-action="Register" method="post">
<input type="hidden" name="TournamentEventLevelId" value="@telId" />
<div class="mb-3">
<label class="form-label">Student</label>
<select name="StudentId" class="form-select">
<option value="">Select Student</option>
@if (students != null) { @foreach (var s in students) { <option value="@s.StudentId">@s.FullName (@s.SchoolName) - @s.Sex</option> } }
</select>
</div>
<button type="submit" class="btn btn-primary">Register</button>
<a asp-action="Index" asp-route-tournamentEventLevelId="@telId" class="btn btn-secondary">Cancel</a>
</form>
</div>
</div>