|
|
|
@ -2,28 +2,30 @@ |
|
|
|
@using ErsatzTV.Application.ProgramSchedules.Queries |
|
|
|
@using ErsatzTV.Application.ProgramSchedules.Queries |
|
|
|
@inject IMediator Mediator |
|
|
|
@inject IMediator Mediator |
|
|
|
|
|
|
|
|
|
|
|
<MudDialog> |
|
|
|
<div @onkeydown="@OnKeyDown"> |
|
|
|
<DialogContent> |
|
|
|
<MudDialog> |
|
|
|
<MudContainer Class="mb-6"> |
|
|
|
<DialogContent> |
|
|
|
<MudHighlighter Class="mud-primary-text" |
|
|
|
<MudContainer Class="mb-6"> |
|
|
|
Style="background-color: transparent; font-weight: bold" |
|
|
|
<MudHighlighter Class="mud-primary-text" |
|
|
|
Text="@FormatText()" |
|
|
|
Style="background-color: transparent; font-weight: bold" |
|
|
|
HighlightedText="@EntityName"/> |
|
|
|
Text="@FormatText()" |
|
|
|
</MudContainer> |
|
|
|
HighlightedText="@EntityName"/> |
|
|
|
<MudSelect Label="Schedule" @bind-Value="_selectedSchedule" For="@(() => _selectedSchedule)" Class="mb-6 mx-4"> |
|
|
|
</MudContainer> |
|
|
|
@foreach (ProgramScheduleViewModel schedule in _schedules) |
|
|
|
<MudSelect Label="Schedule" @bind-Value="_selectedSchedule" For="@(() => _selectedSchedule)" Class="mb-6 mx-4"> |
|
|
|
{ |
|
|
|
@foreach (ProgramScheduleViewModel schedule in _schedules) |
|
|
|
<MudSelectItem Value="@schedule">@schedule.Name</MudSelectItem> |
|
|
|
{ |
|
|
|
} |
|
|
|
<MudSelectItem Value="@schedule">@schedule.Name</MudSelectItem> |
|
|
|
</MudSelect> |
|
|
|
} |
|
|
|
</DialogContent> |
|
|
|
</MudSelect> |
|
|
|
<DialogActions> |
|
|
|
</DialogContent> |
|
|
|
<MudButton OnClick="Cancel">Cancel</MudButton> |
|
|
|
<DialogActions> |
|
|
|
<MudButton Color="Color.Primary" Variant="Variant.Filled" Disabled="@(_selectedSchedule == null)" OnClick="Submit"> |
|
|
|
<MudButton OnClick="Cancel">Cancel</MudButton> |
|
|
|
Add To Schedule |
|
|
|
<MudButton Color="Color.Primary" Variant="Variant.Filled" Disabled="@(_selectedSchedule == null)" OnClick="Submit"> |
|
|
|
</MudButton> |
|
|
|
Add To Schedule |
|
|
|
</DialogActions> |
|
|
|
</MudButton> |
|
|
|
</MudDialog> |
|
|
|
</DialogActions> |
|
|
|
|
|
|
|
</MudDialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
@code { |
|
|
|
@code { |
|
|
|
|
|
|
|
|
|
|
|
@ -54,5 +56,13 @@ |
|
|
|
private void Submit() => MudDialog.Close(DialogResult.Ok(_selectedSchedule)); |
|
|
|
private void Submit() => MudDialog.Close(DialogResult.Ok(_selectedSchedule)); |
|
|
|
|
|
|
|
|
|
|
|
private void Cancel() => MudDialog.Cancel(); |
|
|
|
private void Cancel() => MudDialog.Cancel(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void OnKeyDown(KeyboardEventArgs e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (e.Code is "Enter" or "NumpadEnter") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Submit(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |