< Summary

Information
Class: Syki.Front.Pages.Student.StudentDisciplinesPage
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Pages/Student/StudentDisciplinesPage.razor
Tag: 22_11348620282
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 69
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/Student/StudentDisciplinesPage.razor

#LineLine coverage
 1@namespace Syki.Front.Pages.Student
 2
 3@page "/student/disciplines"
 4@attribute [Authorize(Roles = "Student")]
 5
 6<SykiPageTitle Title="Disciplinas" />
 7
 8<MudContainer Class="my-4 px-4">
 9    <SykiPageHeader Icon="@Icons.Material.Filled.Apps" Title="Disciplinas" />
 10    <MudContainer Class="px-0 my-4">
 011        @if (_loading)
 12        {
 13            <MudContainer Class="px-0">
 14                <MudCard>
 15                    <MudCardContent>
 16                        <MudProgressLinear Color="Color.Info" Indeterminate="true" />
 17                    </MudCardContent>
 18                </MudCard>
 19            </MudContainer>
 20        }
 21        else
 22        {
 23            <MudExpansionPanels MultiExpansion="true">
 024                @foreach (var period in _disciplines.ConvertAll(d => d.Period).Distinct().Order())
 25                {
 26                    <MudExpansionPanel Expanded="@(period == 1)">
 27                        <TitleContent>
 28                            <div class="d-flex">
 29                                <MudIcon Icon="@Icons.Material.Filled.ArrowRight" class="mr-3"></MudIcon>
 30                                <MudText><strong>@($"{period}º Período")</strong></MudText>
 31                            </div>
 32                        </TitleContent>
 33                        <ChildContent>
 034                            <MudTable Items="@_disciplines.Where(x => x.Period == period).OrderBy(x => x.Name)" Breakpoi
 35                                <HeaderContent>
 36                                    <MudTh>Nome</MudTh>
 37                                    <MudTh>Créditos</MudTh>
 38                                    <MudTh>CH</MudTh>
 39                                    <MudTh>Situação</MudTh>
 40                                </HeaderContent>
 41                                <RowTemplate>
 42                                    <MudTd DataLabel="Nome">@context.Name</MudTd>
 43                                    <MudTd DataLabel="Créditos">@context.Credits</MudTd>
 44                                    <MudTd DataLabel="CH">@context.Workload</MudTd>
 45                                    <MudTd DataLabel="Status">@context.StudentDisciplineStatus.GetDescription()</MudTd>
 46                                </RowTemplate>
 47                            </MudTable>
 48                        </ChildContent>
 49                    </MudExpansionPanel>
 50                }
 51            </MudExpansionPanels>
 52        }
 53    </MudContainer>
 54</MudContainer>
 55
 56@inject GetStudentDisciplinesClient Client
 57
 58@code
 59{
 60    private bool _loading;
 061    private List<DisciplineOut> _disciplines = [];
 62
 63    protected override async Task OnInitializedAsync()
 64    {
 065        _loading = true;
 066        _disciplines = await Client.Get();
 067        _loading = false;
 068    }
 69}

Methods/Properties

.ctor()
OnInitializedAsync()