87db67f979
Updated the MudPaper component styling in multiple files to use a consistent padding class of "pa-3 pa-md-6" instead of "pa-6". This change enhances the visual consistency of the UI across the Calendar, Events, Students, and Teams components, improving the overall user experience.
73 lines
2.8 KiB
Plaintext
73 lines
2.8 KiB
Plaintext
@page "/teams/goals"
|
|
@attribute [Authorize]
|
|
@using Microsoft.EntityFrameworkCore
|
|
@using WebApp.Models
|
|
@using WebApp.Components.Shared.Components
|
|
@inject IConfiguration Configuration
|
|
@inject AppDbContext Context
|
|
|
|
<PageHeader
|
|
Title="@($"{Configuration["ChapterSettings:Shortname"]} TSA Student Goals {Configuration["ChapterSettings:CompetitionYear"]}")"
|
|
Description="Set Your Goals for Success" />
|
|
|
|
@if (_students == null)
|
|
{
|
|
<p><em>Loading...</em></p>
|
|
}
|
|
else
|
|
{
|
|
<MudPaper Elevation="2" Class="pa-3 pa-md-6">
|
|
@foreach (var student in _students)
|
|
{
|
|
<MudContainer Class="pagebreak">
|
|
<MudText Typo="Typo.h4" Class="mb-4">@student.Name</MudText>
|
|
<MudText Typo="Typo.body2" Class="mb-3">
|
|
For each of your events, write down your goals for this competition year.
|
|
</MudText>
|
|
|
|
@foreach (var team in student.Teams.OrderBy(t => t.Event.Name))
|
|
{
|
|
<MudContainer Class="mb-4 nobrk">
|
|
<MudGrid>
|
|
<MudItem xs="12">
|
|
<MudText Typo="Typo.h6" Class="mb-2">
|
|
@team.Event.Name
|
|
@if (team.Event.EventFormat == EventFormat.Team)
|
|
{
|
|
<span style="font-weight: normal; font-size: 0.9em;">
|
|
(Team: @string.Join(", ", team.Students.OrderByDescending(e => e.Grade + e.TsaYear).Select(e => e.FirstName)))
|
|
</span>
|
|
}
|
|
</MudText>
|
|
</MudItem>
|
|
<MudItem xs="12">
|
|
<MudText Typo="Typo.caption" Class="mb-1">
|
|
<strong>Goal:</strong>
|
|
</MudText>
|
|
<div style="border-bottom: 1px solid #ccc; min-height: 30px; margin-bottom: 8px;"></div>
|
|
<div style="border-bottom: 1px solid #ccc; min-height: 30px; margin-bottom: 8px;"></div>
|
|
</MudItem>
|
|
</MudGrid>
|
|
</MudContainer>
|
|
}
|
|
</MudContainer>
|
|
}
|
|
</MudPaper>
|
|
}
|
|
|
|
@code {
|
|
private Student[]? _students;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
_students =
|
|
await Context.Students
|
|
.Include(e => e.Teams)
|
|
.ThenInclude(e => e.Event)
|
|
.Include(e => e.Teams)
|
|
.ThenInclude(e => e.Students)
|
|
.OrderBy(e => e.FirstName)
|
|
.ToArrayAsync();
|
|
}
|
|
}
|