Address compiler warnings
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
ShowBackButton="true"
|
||||
BackButtonUrl="/students" />
|
||||
|
||||
<EditForm id="create-student-form" Model="Student" OnValidSubmit="OnValidSubmit" Enhance>
|
||||
<EditForm Model="Student" OnValidSubmit="OnValidSubmit" Enhance>
|
||||
<FormChangeTracker @ref="_formChangeTracker" />
|
||||
<AntiforgeryToken />
|
||||
<DataAnnotationsValidator />
|
||||
@@ -26,13 +26,12 @@
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
<FormActions>
|
||||
<MudButton ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary">Create</MudButton>
|
||||
<MudButton OnClick="HandleCancel" Variant="Variant.Text">Cancel</MudButton>
|
||||
</FormActions>
|
||||
</EditForm>
|
||||
|
||||
<FormActions>
|
||||
<MudButton ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary" Form="create-student-form">Create</MudButton>
|
||||
<MudButton OnClick="HandleCancel" Variant="Variant.Text">Cancel</MudButton>
|
||||
</FormActions>
|
||||
|
||||
@code {
|
||||
[SupplyParameterFromForm]
|
||||
private Student Student { get; set; } = new() { TsaYear = 1 };
|
||||
|
||||
@@ -97,11 +97,11 @@ else
|
||||
private Student[]? _students;
|
||||
|
||||
private class EventStudentRankings {
|
||||
public EventDefinition Event {get; set; }
|
||||
public Tuple<Student,int> [] StudentRanking { get; set; }
|
||||
public required EventDefinition Event {get; set; }
|
||||
public required Tuple<Student,int>[] StudentRanking { get; set; }
|
||||
}
|
||||
|
||||
private EventStudentRankings[] _eventStudentRankings;
|
||||
private EventStudentRankings[] _eventStudentRankings = null!;
|
||||
private int _maxEventStudentRankings;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
|
||||
@@ -32,15 +32,13 @@
|
||||
}
|
||||
</MudStack>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Edit"
|
||||
Size="Size.Small"
|
||||
Href="@($"/students/edit?id={context.Item.Id}&returnUrl=/students")"
|
||||
Title="Edit" />
|
||||
<MudIconButton Icon="@Icons.Material.Outlined.Delete"
|
||||
Size="Size.Small"
|
||||
Color="Color.Error"
|
||||
OnClick="() => DeleteStudent(context.Item!)"
|
||||
Title="Delete" />
|
||||
<IconButtonWithTooltip Icon="@Icons.Material.Filled.Edit"
|
||||
TooltipText="Edit"
|
||||
Href="@($"/students/edit?id={context.Item.Id}&returnUrl=/students")" />
|
||||
<IconButtonWithTooltip Icon="@Icons.Material.Outlined.Delete"
|
||||
TooltipText="Delete"
|
||||
Color="Color.Error"
|
||||
OnClick="() => DeleteStudent(context.Item!)" />
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
</CellTemplate>
|
||||
|
||||
Reference in New Issue
Block a user