fix: make yearly theme editable and stop printing events twice
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
<PageHeader
|
||||
Title="@($"TSA Events {Configuration["ChapterSettings:CompetitionYear"]}")"
|
||||
Description="Yearly theme: Unity Through Community" />
|
||||
Description="@($"Yearly theme: {Configuration["ChapterSettings:YearlyTheme"]}")" />
|
||||
|
||||
@if (_events == null)
|
||||
{
|
||||
@@ -66,7 +66,7 @@ else
|
||||
{
|
||||
<MudItem xs="3">
|
||||
<MudText Class="d-flex py-1">
|
||||
<i>Theme for 2025-26:</i>
|
||||
<i>Theme for @Configuration["ChapterSettings:CompetitionYear"]:</i>
|
||||
</MudText>
|
||||
</MudItem>
|
||||
<MudItem xs="8">
|
||||
@@ -91,83 +91,6 @@ else
|
||||
<MudDivider />
|
||||
}
|
||||
</MudContainer>
|
||||
|
||||
<MudContainer>
|
||||
@foreach (var evt in _events)
|
||||
{
|
||||
<MudContainer Class="mt-3 mb-1 nobrk">
|
||||
<MudGrid>
|
||||
<MudItem xs="4">
|
||||
<MudStack>
|
||||
<MudItem>
|
||||
<MudText Class="d-flex py-1" Typo="Typo.h5">@evt.Name</MudText>
|
||||
</MudItem>
|
||||
@if (evt.RegionalEvent)
|
||||
{
|
||||
<MudItem>
|
||||
<MudText Class="d-flex" Typo="Typo.caption"><i>Regional Event</i></MudText>
|
||||
</MudItem>
|
||||
}
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
<MudItem xs="2">
|
||||
|
||||
<MudText>
|
||||
@if (evt.EventFormat is EventFormat.Team)
|
||||
{
|
||||
<strong>@evt.EventFormat</strong>
|
||||
<br />
|
||||
<p>Size: <strong>@evt.TeamSize</strong></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<strong>@evt.EventFormat</strong>
|
||||
}
|
||||
</MudText>
|
||||
|
||||
</MudItem>
|
||||
<MudItem xs="3">
|
||||
Eligibility: @evt.Eligibility
|
||||
</MudItem>
|
||||
<MudItem xs="1">
|
||||
<strong> Effort</strong>: @evt.LevelOfEffort
|
||||
</MudItem>
|
||||
<MudItem xs="2">
|
||||
<strong>Activity</strong>: @evt.SemifinalistActivity
|
||||
</MudItem>
|
||||
|
||||
<MudItem xs="12">
|
||||
<MudText Class="d-flex py-1 pre-wrap-text">@evt.Description</MudText>
|
||||
</MudItem>
|
||||
@if (!string.IsNullOrEmpty(evt.Theme))
|
||||
{
|
||||
<MudItem xs="3">
|
||||
<MudText Class="d-flex py-1">
|
||||
<i>Theme for 2025-26:</i>
|
||||
</MudText>
|
||||
</MudItem>
|
||||
<MudItem xs="8">
|
||||
<MudText Class="d-flex py-1 pre-wrap-text">@evt.Theme</MudText>
|
||||
</MudItem>
|
||||
}
|
||||
|
||||
@if (!string.IsNullOrEmpty(evt.Documentation))
|
||||
{
|
||||
<MudItem xs="3">
|
||||
<MudText Class="d-flex py-1">
|
||||
<i>Materials:</i>
|
||||
</MudText>
|
||||
</MudItem>
|
||||
<MudItem xs="8">
|
||||
<MudText Class="d-flex py-1 pre-wrap-text">@evt.Documentation</MudText>
|
||||
</MudItem>
|
||||
}
|
||||
|
||||
</MudGrid>
|
||||
</MudContainer>
|
||||
<MudDivider />
|
||||
}
|
||||
</MudContainer>
|
||||
}
|
||||
@code {
|
||||
private EventDefinition[]? _events;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<PageHeader
|
||||
Title="@($"{Configuration["ChapterSettings:Shortname"]} TSA Teams {Configuration["ChapterSettings:CompetitionYear"]}")"
|
||||
Description="Yearly theme: Unity Through Community" />
|
||||
Description="@($"Yearly theme: {Configuration["ChapterSettings:YearlyTheme"]}")" />
|
||||
|
||||
@if (_teams == null || _students == null)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ else
|
||||
{
|
||||
<MudItem xs="3">
|
||||
<MudText Class="d-flex py-1">
|
||||
<i>Theme for 2025-26:</i>
|
||||
<i>Theme for @Configuration["ChapterSettings:CompetitionYear"]:</i>
|
||||
</MudText>
|
||||
</MudItem>
|
||||
<MudItem xs="8">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<PageHeader
|
||||
Title="@($"{Configuration["ChapterSettings:Shortname"]} TSA Teams {Configuration["ChapterSettings:CompetitionYear"]}")"
|
||||
Description="Yearly theme: Unity Through Community" />
|
||||
Description="@($"Yearly theme: {Configuration["ChapterSettings:YearlyTheme"]}")" />
|
||||
|
||||
<Legend></Legend>
|
||||
@if (_teams == null)
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
MaxLength="4"
|
||||
Required="true" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="6">
|
||||
<MudTextField @bind-Value="_settings.YearlyTheme"
|
||||
Label="Yearly Theme"
|
||||
Variant="Variant.Outlined"
|
||||
HelperText="National TSA yearly theme (e.g., Unity Through Community)" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="6">
|
||||
<MudSelect T="SchoolLevel?" @bind-Value="_settings.SchoolLevel"
|
||||
Label="School Level"
|
||||
|
||||
Reference in New Issue
Block a user