@model IEnumerable<SportsDivision.Application.DTOs.ReportDtos.StudentPointsReportDto>
@{
    ViewData["Title"] = "Student Points";
}

<h2>Student Points</h2>
<hr />

<table class="table table-striped table-hover">
    <thead class="table-dark">
        <tr><th>Student</th><th>School</th><th>Sex</th><th class="text-center">Events</th><th class="text-center">Total Points</th></tr>
    </thead>
    <tbody>
        @foreach (var s in Model)
        {
            <tr>
                <td>@s.StudentName</td>
                <td>@s.SchoolName</td>
                <td><span class="badge @(s.Sex == "Male" ? "bg-primary" : "bg-danger")">@s.Sex</span></td>
                <td class="text-center">@s.EventCount</td>
                <td class="text-center"><strong>@s.TotalPlacementPoints</strong></td>
            </tr>
        }
    </tbody>
</table>

<a asp-action="Index" class="btn btn-secondary">Back to Reports</a>
