< Summary

Class:MUNity.BlazorServer.Pages.Conference.ManageCommitteesPage
Assembly:MUNity.BlazorServer
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNity.BlazorServer\Pages\Conference\ManageCommitteesPage.razor
Covered lines:0
Uncovered lines:33
Coverable lines:33
Total lines:96
Line coverage:0% (0 of 33)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)
Covered methods:0
Total methods:4
Method coverage:0% (0 of 4)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%120%
get_Id()100%10%
OnInitialized()100%10%
ReloadData()100%10%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNity.BlazorServer\Pages\Conference\ManageCommitteesPage.razor

#LineLine coverage
 1@page "/c/managecommittees/{Id}"
 2@inject Services.ConferenceService conferenceService
 3
 04@if (info != null)
 05{
 6    <BreadcrumbComponent Source="@info" PageName="Gremien" />
 07}
 8
 9<h1 class="page-header">Gremien Bearbeiten</h1>
 10
 011@if (info != null)
 012{
 13    <div class="row mb-15px">
 14        <div class="col-12">
 15            <div class="card">
 16                <div class="card-body">
 17
 18                    <div class="table-responsive">
 19                        <table class="table mb-0">
 20                            <thead>
 21                                <tr>
 22                                    <th>#</th>
 23                                    <th>Name</th>
 24                                    <th>Kürzel</th>
 25                                    <th>Beschlussfassendes Gremium</th>
 26                                    <th>Sitze</th>
 27                                    <th>Löschen</th>
 28                                </tr>
 29                            </thead>
 30                            <tbody>
 031                                @if (info.Committees != null && info.Committees.Count > 0)
 032                                {
 033                                    @foreach (var committee in info.Committees)
 034                                    {
 35                                        <tr>
 036                                            <td>@committee.CommitteeId</td>
 037                                            <td>@committee.CommitteeName</td>
 038                                            <td>@committee.CommitteeShort</td>
 039                                            <td>@committee.ParentCommitteeName</td>
 040                                            <td>@committee.SeatCount <button class="btn btn-primary btn-sm" @onclick="()
 41                                            <td><a href="#">Gremium löschen</a></td>
 42                                        </tr>
 043                                    }
 044                                }
 45
 46                            </tbody>
 47                        </table>
 48                    </div>
 49
 50                </div>
 51
 52                <div class="card-footer">
 053                    <button class="btn btn-primary" @onclick="() => createModal.Show()">Neues Gremium hinzufügen</button
 54                </div>
 55            </div>
 56        </div>
 57    </div>
 58
 059    @if (!string.IsNullOrEmpty(selectedCommitteeId))
 060    {
 61        <MUNity.BlazorServer.Components.Conference.ManageCommitteeSeatsComponent CommitteeId="@selectedCommitteeId"
 062                                                                                 @ref="committeeSeatsRef"/>
 63
 064    }
 65
 66    <MUNity.BlazorServer.Components.Conference.CreateCommitteeModal ConferenceId="@Id"
 67                                                                    Committees="@info.Committees"
 068                                                                    RolesChanged="() => ReloadData()"
 069                                                                    @ref="createModal" />
 070}
 71
 72
 73
 74@code {
 075    [Parameter] public string Id { get; set; }
 76
 77    private MUNity.Schema.Conference.ManageCommitteesInfo info;
 78
 79    private string selectedCommitteeId;
 80
 81    private MUNity.BlazorServer.Components.Conference.CreateCommitteeModal createModal;
 82
 83    private MUNity.BlazorServer.Components.Conference.ManageCommitteeSeatsComponent committeeSeatsRef;
 84
 85    protected override void OnInitialized()
 086    {
 087        base.OnInitialized();
 088        this.info = conferenceService.GetManageInfo(Id);
 089    }
 90
 91    private void ReloadData()
 092    {
 093        this.info = conferenceService.GetManageInfo(Id);
 094        this.InvokeAsync(StateHasChanged);
 095    }
 96}