many bug fixes
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
var eventName = ViewBag.EventName as string;
|
||||
var levelName = ViewBag.LevelName as string;
|
||||
var registrations = ViewBag.Registrations as IEnumerable<EventRegistrationDto>;
|
||||
var results = registrations?.Where(r => r.Score != null && r.Score.Placement != null)
|
||||
.OrderBy(r => r.Score!.Placement)
|
||||
.ToList() ?? new List<EventRegistrationDto>();
|
||||
}
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
@@ -95,3 +98,44 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm mt-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center" style="background-color:#003366; color:white;">
|
||||
<h5 class="mb-0">Results</h5>
|
||||
<span class="small">Best cleared height ranks athletes; points use the World Athletics formula.</span>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
@if (results.Any())
|
||||
{
|
||||
<table class="table table-hover mb-0">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Place</th>
|
||||
<th>Student</th>
|
||||
<th>School</th>
|
||||
<th>Best Height</th>
|
||||
<th>Points</th>
|
||||
<th>Placement Pts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var r in results)
|
||||
{
|
||||
<tr>
|
||||
<td><span class="badge bg-warning text-dark">#@r.Score!.Placement</span></td>
|
||||
<td>@r.StudentName</td>
|
||||
<td>@r.SchoolName</td>
|
||||
<td>@r.Score.RawPerformance.ToString("0.00")m</td>
|
||||
<td>@r.Score.CalculatedPoints</td>
|
||||
<td>@r.Score.PlacementPoints</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="text-muted p-3 mb-0">No results yet. Record clearances above, then click <strong>Calculate Results</strong> to rank athletes and award points.</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user