| | 1 | | @namespace Syki.Front.Features.Academic.CreateClass |
| | 2 | |
|
| | 3 | | <MudForm Class="ml-2"> |
| | 4 | | <MudGrid Spacing="2"> |
| | 5 | | <MudItem xs="12" sm="4" md="4" lg="4"> |
| | 6 | | <MudSelect |
| | 7 | | Dense="true" |
| | 8 | | Margin="Margin.Dense" |
| | 9 | | Variant="Variant.Outlined" |
| | 10 | | T="Day?" |
| | 11 | | @bind-Value="@Data.Day" |
| | 12 | | Label="Dia" |
| | 13 | | Required="true" |
| | 14 | | RequiredError="Informe!" |
| | 15 | | AdornmentColor="Color.Primary" |
| | 16 | | > |
| 0 | 17 | | @foreach (Day? day in Enum.GetValues<Day>()) |
| | 18 | | { |
| | 19 | | <MudSelectItem Value="@day">@day.GetDescription()</MudSelectItem> |
| | 20 | | } |
| | 21 | | </MudSelect> |
| | 22 | | </MudItem> |
| | 23 | | <MudItem xs="12" sm="8" md="8" lg="8"> |
| | 24 | | <MudStack Row="true" Class="mb-2" Spacing="2"> |
| | 25 | | <MudItem xs="5"> |
| | 26 | | <MudSelect |
| | 27 | | Dense="true" |
| | 28 | | Margin="Margin.Dense" |
| | 29 | | Variant="Variant.Outlined" |
| | 30 | | T="Hour?" |
| | 31 | | @bind-Value="@Data.Start" |
| | 32 | | Label="Início" |
| | 33 | | Required="true" |
| | 34 | | RequiredError="Informe!" |
| | 35 | | AdornmentColor="Color.Primary" |
| | 36 | | > |
| 0 | 37 | | @foreach (Hour? hour in Enum.GetValues<Hour>()) |
| | 38 | | { |
| | 39 | | <MudSelectItem Value="@hour">@hour.GetDescription()</MudSelectItem> |
| | 40 | | } |
| | 41 | | </MudSelect> |
| | 42 | | </MudItem> |
| | 43 | | <MudItem xs="5"> |
| | 44 | | <MudSelect |
| | 45 | | Dense="true" |
| | 46 | | Margin="Margin.Dense" |
| | 47 | | Variant="Variant.Outlined" |
| | 48 | | T="Hour?" |
| | 49 | | @bind-Value="@Data.End" |
| | 50 | | Label="Fim" |
| | 51 | | Required="true" |
| | 52 | | RequiredError="Informe!" |
| | 53 | | AdornmentColor="Color.Primary" |
| | 54 | | > |
| 0 | 55 | | @foreach (Hour? hour in Enum.GetValues<Hour>()) |
| | 56 | | { |
| 0 | 57 | | if (Data.Start == null || hour <= Data.Start) continue; |
| | 58 | | <MudSelectItem Value="@hour">@hour.GetDescription()</MudSelectItem> |
| | 59 | | } |
| | 60 | | </MudSelect> |
| | 61 | | </MudItem> |
| | 62 | | <MudItem xs="2"> |
| | 63 | | <MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" OnClick="@HandleDeleteClick" |
| | 64 | | </MudItem> |
| | 65 | | </MudStack> |
| | 66 | | </MudItem> |
| | 67 | | </MudGrid> |
| | 68 | | </MudForm> |
| | 69 | |
|
| | 70 | | @code |
| | 71 | | { |
| | 72 | | [Parameter] |
| 0 | 73 | | public ScheduleInFillable Data { get; set; } |
| | 74 | |
|
| | 75 | | [Parameter] |
| 0 | 76 | | public EventCallback<Guid> OnDeleteClick { get; set; } |
| | 77 | |
|
| | 78 | | private async Task HandleDeleteClick() |
| | 79 | | { |
| 0 | 80 | | await OnDeleteClick.InvokeAsync(Data.Id); |
| 0 | 81 | | } |
| | 82 | | } |