| | | 1 | | @inject Services.ConferenceService conferenceService |
| | | 2 | | |
| | | 3 | | <div class="row"> |
| | | 4 | | <div class="col-12"> |
| | | 5 | | <div class="card"> |
| | | 6 | | <div class="card-header"> |
| | 0 | 7 | | <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> |
| | 0 | 29 | | @if (info != null) |
| | 0 | 30 | | { |
| | 0 | 31 | | @foreach (var seat in info.Seats) |
| | 0 | 32 | | { |
| | | 33 | | <ManageCommiteeSeatsTableRow Seat="seat" |
| | | 34 | | Countries="info.Countries" |
| | | 35 | | Delegations="info.Delegations" /> |
| | 0 | 36 | | } |
| | 0 | 37 | | } |
| | | 38 | | </tbody> |
| | | 39 | | </table> |
| | | 40 | | </div> |
| | | 41 | | </div> |
| | | 42 | | <div class="card-footer"> |
| | 0 | 43 | | <button class="btn btn-primary" @onclick="() => createSeatModal?.Show()">Sitz hinzufügen</button> |
| | | 44 | | </div> |
| | | 45 | | </div> |
| | | 46 | | </div> |
| | | 47 | | </div> |
| | | 48 | | |
| | 0 | 49 | | @if (info != null) |
| | 0 | 50 | | { |
| | | 51 | | <CreateCommitteeSeatModal CommitteeId="@CommitteeId" |
| | | 52 | | CommitteeName="@info.CommitteeName" |
| | | 53 | | Countries="@info.Countries" |
| | | 54 | | Delegations="@info.Delegations" |
| | 0 | 55 | | @ref="createSeatModal" |
| | | 56 | | SeatCreated="LoadData"/> |
| | | 57 | | |
| | 0 | 58 | | } |
| | | 59 | | |
| | | 60 | | @code { |
| | 0 | 61 | | [Parameter] public string CommitteeId { get; set; } |
| | | 62 | | |
| | 0 | 63 | | [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() |
| | 0 | 70 | | { |
| | 0 | 71 | | await base.OnParametersSetAsync(); |
| | 0 | 72 | | await LoadData(); |
| | 0 | 73 | | } |
| | | 74 | | |
| | | 75 | | public async Task LoadData() |
| | 0 | 76 | | { |
| | 0 | 77 | | var claim = (await authStateTask)?.User; |
| | 0 | 78 | | if (claim != null && !string.IsNullOrEmpty(CommitteeId)) |
| | 0 | 79 | | { |
| | 0 | 80 | | this.info = await conferenceService.GetCommitteeSeatsInfo(CommitteeId, claim); |
| | 0 | 81 | | await this.InvokeAsync(this.StateHasChanged); |
| | 0 | 82 | | } |
| | 0 | 83 | | } |
| | | 84 | | |
| | | 85 | | } |