Files
chapter-organizer/WebApp/Components/Features/Teams/Goals.razor
T
poprhythm 5c1e0b7444 Update padding for MudPaper components across various features
Increased padding from 'pa-4' to 'pa-6' for MudPaper components in Events, MeetingSchedule, Students, and Teams features to ensure consistent styling and improved visual spacing.
2025-12-27 10:43:15 -05:00

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-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();
}
}