< Summary

Class:MUNity.BlazorServer.Components.Conference.ManageCommitteeSeatsComponent
Assembly:MUNity.BlazorServer
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNity.BlazorServer\Components\Conference\ManageCommitteeSeatsComponent.razor
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:85
Line coverage:0% (0 of 26)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)
Covered methods:0
Total methods:5
Method coverage:0% (0 of 5)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
get_CommitteeId()100%10%
get_authStateTask()100%10%
OnParametersSetAsync()100%10%
LoadData()0%60%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNity.BlazorServer\Components\Conference\ManageCommitteeSeatsComponent.razor

#LineLine coverage
 1@inject Services.ConferenceService conferenceService
 2
 3<div class="row">
 4    <div class="col-12">
 5        <div class="card">
 6            <div class="card-header">
 07                <h3 class="card-title">Sitze in @info.CommitteeName</h3>
 8            </div>
 9            <div class="card-body">
 10                <p>Diese Tabelle zeigt einen Teil der DelegationWishesen an, indem es die Sitze des Gremiums: GREMIUMNAM
 11                <p><b>Rollenname</b> ist der angezeigte Name einer Rolle zum Beispiel: Abgeordnete*r Deutschlands. Es ka
 12                <p><b>Staat</b> gibt den Staat an, mit welchen diese Rolle identifiziert werden soll. Eine Rolle muss ni
 13                <p><b>Delegation</b> Die DelegationWishes ist eine Gruppe, welche sich dieser Sitz zugehörig fühlt. Eine
 14                <p><b>Subtype</b> Subtypes Kategorisieren den Sitz weiter. Diese dient vorallem um zwischen Delegierten,
 15
 16                <div class="table-responsive">
 17                    <table class="table mb-0">
 18                        <thead>
 19                            <tr>
 20                                <th>#</th>
 21                                <th>Rollenname</th>
 22                                <th>Staat</th>
 23                                <th>Delegation</th>
 24                                <th>Subtype</th>
 25                                <th>Teilnehmende</th>
 26                            </tr>
 27                        </thead>
 28                        <tbody>
 029                            @if (info != null)
 030                            {
 031                                @foreach (var seat in info.Seats)
 032                                {
 33                                    <ManageCommiteeSeatsTableRow Seat="seat"
 34                                                                 Countries="info.Countries"
 35                                                                 Delegations="info.Delegations" />
 036                                }
 037                            }
 38                        </tbody>
 39                    </table>
 40                </div>
 41            </div>
 42            <div class="card-footer">
 043                <button class="btn btn-primary" @onclick="() => createSeatModal?.Show()">Sitz hinzufügen</button>
 44            </div>
 45        </div>
 46    </div>
 47</div>
 48
 049@if (info != null)
 050{
 51    <CreateCommitteeSeatModal CommitteeId="@CommitteeId"
 52                              CommitteeName="@info.CommitteeName"
 53                              Countries="@info.Countries"
 54                              Delegations="@info.Delegations"
 055                              @ref="createSeatModal"
 56                              SeatCreated="LoadData"/>
 57
 058}
 59
 60@code {
 061    [Parameter] public string CommitteeId { get; set; }
 62
 063    [CascadingParameter] public Task<AuthenticationState> authStateTask { get; set; }
 64
 65    private MUNity.Schema.Conference.CommitteeSeatsInfo info;
 66
 67    CreateCommitteeSeatModal createSeatModal;
 68
 69    protected override async Task OnParametersSetAsync()
 070    {
 071        await base.OnParametersSetAsync();
 072        await LoadData();
 073    }
 74
 75    public async Task LoadData()
 076    {
 077        var claim = (await authStateTask)?.User;
 078        if (claim != null && !string.IsNullOrEmpty(CommitteeId))
 079        {
 080            this.info = await conferenceService.GetCommitteeSeatsInfo(CommitteeId, claim);
 081            await this.InvokeAsync(this.StateHasChanged);
 082        }
 083    }
 84
 85}