< Summary

Information
Class: Syki.Front.Features.Academic.CreateClass.ClassSchedule
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Features/Academic/CreateClass/ClassSchedule.razor
Tag: 22_11348620282
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 82
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 10
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Data()100%210%
get_OnDeleteClick()100%210%
HandleDeleteClick()100%210%

File(s)

/home/runner/work/syki/syki/Front/Features/Academic/CreateClass/ClassSchedule.razor

#LineLine coverage
 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            >
 017                @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                    >
 037                        @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                    >
 055                        @foreach (Hour? hour in Enum.GetValues<Hour>())
 56                        {
 057                        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]
 073    public ScheduleInFillable Data { get; set; }
 74
 75    [Parameter]
 076    public EventCallback<Guid> OnDeleteClick { get; set; }
 77
 78    private async Task HandleDeleteClick()
 79    {
 080        await OnDeleteClick.InvokeAsync(Data.Id);
 081    }
 82}