add troubleshoot button to classic schedules (#2615)
* add troubleshoot button to classic schedules * move troubleshoot button
This commit is contained in:
@@ -1134,5 +1134,4 @@
|
||||
}
|
||||
|
||||
private string SelectedRowClassFunc(ProgramScheduleItemEditViewModel element, int rowNumber) => _selectedItem != null && _selectedItem == element ? "selected" : string.Empty;
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<ColGroup>
|
||||
<MudHidden Breakpoint="Breakpoint.Xs">
|
||||
<col/>
|
||||
<col style="width: 240px;"/>
|
||||
<col style="width: 300px;"/>
|
||||
</MudHidden>
|
||||
</ColGroup>
|
||||
<ToolBarContent>
|
||||
@@ -58,6 +58,11 @@
|
||||
OnClick="@(_ => CopySchedule(context))">
|
||||
</MudIconButton>
|
||||
</MudTooltip>
|
||||
<MudTooltip Text="Troubleshoot">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Info"
|
||||
OnClick="@(_ => Troubleshoot(context))">
|
||||
</MudIconButton>
|
||||
</MudTooltip>
|
||||
<MudTooltip Text="Delete Schedule">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
||||
OnClick="@(_ => DeleteSchedule(context))">
|
||||
@@ -213,5 +218,17 @@
|
||||
_table.ReloadServerData();
|
||||
}
|
||||
|
||||
private async Task Troubleshoot(ProgramScheduleViewModel schedule)
|
||||
{
|
||||
Option<IEnumerable<ProgramScheduleItemViewModel>> maybeResults = await Mediator.Send(new GetProgramScheduleItems(schedule.Id), _cts.Token);
|
||||
foreach (IEnumerable<ProgramScheduleItemViewModel> results in maybeResults)
|
||||
{
|
||||
var parameters = new DialogParameters { { "Schedule", schedule }, { "Items", results } };
|
||||
var options = new DialogOptions { CloseButton = true, CloseOnEscapeKey = true, MaxWidth = MaxWidth.Medium, FullWidth = true };
|
||||
IDialogReference dialog = await Dialog.ShowAsync<ScheduleItemsDialog>(schedule.Name, parameters, options);
|
||||
DialogResult _ = await dialog.Result;
|
||||
}
|
||||
}
|
||||
|
||||
private string SelectedRowClassFunc(ProgramScheduleViewModel element, int rowNumber) => _selectedSchedule != null && _selectedSchedule == element ? "selected" : string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user