Fix a bunch of warnings
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<MudTooltip Text="Delete">
|
||||
<MudIconButton Icon="@Icons.Material.Outlined.Delete"
|
||||
Color="Color.Error"
|
||||
OnClick="() => DeleteOnClick()"/>
|
||||
OnClick="HandleDeleteClick"/>
|
||||
</MudTooltip>
|
||||
}
|
||||
</MudButtonGroup>
|
||||
@@ -25,5 +25,13 @@
|
||||
|
||||
[Parameter] public string? DetailsHref { get; set; }
|
||||
[Parameter] public string? EditHref { get; set; }
|
||||
[Parameter] public Action? DeleteOnClick { get; set; }
|
||||
[Parameter] public Func<Task>? DeleteOnClick { get; set; }
|
||||
|
||||
private async Task HandleDeleteClick()
|
||||
{
|
||||
if (DeleteOnClick != null)
|
||||
{
|
||||
await DeleteOnClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@
|
||||
: InputType.Password;
|
||||
}
|
||||
|
||||
private async Task HandleLogin()
|
||||
private void HandleLogin()
|
||||
{
|
||||
_isSubmitting = true;
|
||||
_errorMessage = null;
|
||||
|
||||
@@ -84,6 +84,6 @@
|
||||
|
||||
//_isRowBlocked = false;
|
||||
StateHasChanged();
|
||||
_dataGrid.ReloadServerData();
|
||||
await _dataGrid.ReloadServerData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,6 @@
|
||||
|
||||
//_isRowBlocked = false;
|
||||
StateHasChanged();
|
||||
_dataGrid.ReloadServerData();
|
||||
await _dataGrid.ReloadServerData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,14 +205,14 @@
|
||||
}
|
||||
@if (isIncluded)
|
||||
{
|
||||
<MudTooltip Title="@($"Add requirement for {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudTooltip Text="@($"Add requirement for {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudIconButton Icon="@Icons.Material.Outlined.ThumbUpAlt" Class="ml-3" Size="Size.Small" Color="Color.Default"
|
||||
OnClick="() => RequireEvent(e, context.Student, Requirement.Include)"></MudIconButton>
|
||||
</MudTooltip>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudTooltip Title="@($"Remove requirement for {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudTooltip Text="@($"Remove requirement for {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ThumbUpAlt" Class="ml-3" Size="Size.Small" Color="Color.Dark"
|
||||
OnClick="() => RemoveRequireEvent(e, context.Student, Requirement.Include)"></MudIconButton>
|
||||
</MudTooltip>
|
||||
@@ -220,14 +220,14 @@
|
||||
|
||||
@if (isExcluded)
|
||||
{
|
||||
<MudTooltip Title="@($"Add restriction against {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudTooltip Text="@($"Add restriction against {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudIconButton Icon="@Icons.Material.Outlined.ThumbDownAlt" Size="Size.Small" Color="Color.Default"
|
||||
OnClick="() => RequireEvent(e, context.Student, Requirement.Exclude)"></MudIconButton>
|
||||
</MudTooltip>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudTooltip Title="@($"Remove restriction against {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudTooltip Text="@($"Remove restriction against {context.Student.FirstName} in {e.ShortName}")">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ThumbDownAlt" Size="Size.Small" Color="Color.Dark"
|
||||
OnClick="() => RemoveRequireEvent(e, context.Student, Requirement.Exclude)"></MudIconButton>
|
||||
</MudTooltip>
|
||||
|
||||
@@ -103,6 +103,6 @@
|
||||
|
||||
//_isRowBlocked = false;
|
||||
StateHasChanged();
|
||||
_dataGrid.ReloadServerData();
|
||||
await _dataGrid.ReloadServerData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,17 +82,17 @@
|
||||
|
||||
private Student? _currentStudentValue;
|
||||
|
||||
private async Task<IEnumerable<Student>> SearchStudents(string? searchText, CancellationToken cancellationToken)
|
||||
private Task<IEnumerable<Student>> SearchStudents(string? searchText, CancellationToken cancellationToken)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(searchText))
|
||||
return Students.Where(s => !SelectedStudents.Contains(s));
|
||||
return Task.FromResult<IEnumerable<Student>>(Students.Where(s => !SelectedStudents.Contains(s)));
|
||||
|
||||
var search = searchText.ToLower();
|
||||
return Students
|
||||
return Task.FromResult<IEnumerable<Student>>(Students
|
||||
.Where(s => !SelectedStudents.Contains(s))
|
||||
.Where(s => s.FirstName.ToLower().Contains(search) ||
|
||||
s.LastName.ToLower().Contains(search))
|
||||
.OrderBy(s => s.FirstName);
|
||||
.OrderBy(s => s.FirstName));
|
||||
}
|
||||
|
||||
private void RemoveStudent(Student student)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@using WebApp.Components.Pages
|
||||
|
||||
@if (Title != null)
|
||||
{
|
||||
<MudText Typo="Typo.h4">@Title</MudText>
|
||||
|
||||
Reference in New Issue
Block a user