| | 1 | | @namespace Syki.Front.Pages.Teacher |
| | 2 | |
|
| | 3 | | @page "/teacher/classes/{id:guid}" |
| | 4 | | @attribute [Authorize(Roles = "Teacher")] |
| | 5 | |
|
| | 6 | | <SykiPageTitle Title="Turma" /> |
| | 7 | |
|
| | 8 | | <MudContainer Class="my-4 px-4"> |
| | 9 | | <MudCard Class="px-2 my-4"> |
| | 10 | | <MudCardContent> |
| 0 | 11 | | @if (_loading) |
| | 12 | | { |
| | 13 | | <MudSkeleton Animation="Animation.Wave" /> |
| | 14 | | } |
| | 15 | | else |
| | 16 | | { |
| | 17 | | <MudGrid Class="align-center"> |
| | 18 | | <MudItem xs="12" sm="9" md="9" lg="9"> |
| | 19 | | <MudText Typo="Typo.h5" Style="font-weight: bold">@_class.Discipline</MudText> |
| | 20 | | </MudItem> |
| | 21 | | <MudItem xs="12" sm="3" md="3" lg="3" Class="d-flex justify-end"> |
| | 22 | | <MudTabs Elevation="0" Rounded="true" Outlined="true" @bind-ActivePanelIndex="@_index" MinimumTabWid |
| | 23 | | <MudTabPanel Text="Frequência" ID='"panel_0"'></MudTabPanel> |
| | 24 | | <MudTabPanel Text="Notas" ID='"panel_1"'></MudTabPanel> |
| | 25 | | </MudTabs> |
| | 26 | | </MudItem> |
| | 27 | | </MudGrid> |
| | 28 | | } |
| | 29 | | </MudCardContent> |
| | 30 | | </MudCard> |
| | 31 | |
|
| 0 | 32 | | @if (_index == 0) |
| | 33 | | { |
| | 34 | | <TeacherClassFrequencyTab ClassId="@Id" /> |
| | 35 | | } |
| | 36 | | else |
| | 37 | | { |
| | 38 | | <TeacherClassNotesTab ClassId="@Id" /> |
| | 39 | | } |
| | 40 | | </MudContainer> |
| | 41 | |
|
| | 42 | | @inject GetTeacherClassClient GetTeacherClassClient |
| | 43 | |
|
| | 44 | | @code |
| | 45 | | { |
| | 46 | | [Parameter] |
| 0 | 47 | | public Guid Id { get; set; } |
| | 48 | |
|
| | 49 | | private int _index; |
| | 50 | | private bool _loading; |
| 0 | 51 | | private TeacherClassOut _class = new(); |
| | 52 | |
|
| | 53 | | protected override async Task OnInitializedAsync() |
| | 54 | | { |
| 0 | 55 | | _loading = true; |
| 0 | 56 | | _class = await GetTeacherClassClient.Get(Id); |
| 0 | 57 | | _loading = false; |
| 0 | 58 | | } |
| | 59 | | } |