< Summary

Information
Class: Syki.Front.Pages.Teacher.TeacherAgendaPage
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Pages/Teacher/TeacherAgendaPage.razor
Tag: 22_11348620282
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 54
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
OnInitializedAsync()100%210%

File(s)

/home/runner/work/syki/syki/Front/Pages/Teacher/TeacherAgendaPage.razor

#LineLine coverage
 1@using Syki.Front.Components.Agenda
 2
 3@namespace Syki.Front.Pages.Teacher
 4
 5@page "/teacher/agenda"
 6@attribute [Authorize(Roles = "Teacher")]
 7
 8<SykiPageTitle Title="Agenda" />
 9
 10<MudContainer Class="my-4 px-4">
 11    <SykiPageHeader Icon="@Icons.Material.Filled.CalendarMonth" Title="Agenda" Class="mb-4" />
 012    @if (_loading)
 13    {
 14        <MudContainer Class="px-0">
 15            <MudCard>
 16                <MudCardContent>
 17                    <MudProgressLinear Color="Color.Info" Indeterminate="true" />
 18                </MudCardContent>
 19            </MudCard>
 20        </MudContainer>
 21    }
 22    else
 23    {
 024        @if (Days.Count > 0)
 25        {
 26            <CascadingValue Name="Days" Value="@Days">
 27                <WeeklyAgenda Class="px-0" />
 28            </CascadingValue>
 29        }
 30        else
 31        {
 32            <MudAlert Class="mt-4" Severity="Severity.Normal" NoIcon="true" Variant="Variant.Text" Elevation="1">
 33                <MudStack Row="true" Justify="Justify.SpaceAround">
 34                    <MudText>Sua agenda está vazia...</MudText>
 35                </MudStack>
 36            </MudAlert>
 37        }
 38    }
 39</MudContainer>
 40
 41@inject GetTeacherAgendaClient Client
 42
 43@code
 44{
 45    private bool _loading;
 046    private List<AgendaDayOut> Days = [];
 47
 48    protected override async Task OnInitializedAsync()
 49    {
 050        _loading = true;
 051        Days = await Client.Get();
 052        _loading = false;
 053    }
 54}

Methods/Properties

.ctor()
OnInitializedAsync()