| | 1 | | @page "/c/managecommittees/{Id}" |
| | 2 | | @inject Services.ConferenceService conferenceService |
| | 3 | |
|
| 0 | 4 | | @if (info != null) |
| 0 | 5 | | { |
| | 6 | | <BreadcrumbComponent Source="@info" PageName="Gremien" /> |
| 0 | 7 | | } |
| | 8 | |
|
| | 9 | | <h1 class="page-header">Gremien Bearbeiten</h1> |
| | 10 | |
|
| 0 | 11 | | @if (info != null) |
| 0 | 12 | | { |
| | 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> |
| 0 | 31 | | @if (info.Committees != null && info.Committees.Count > 0) |
| 0 | 32 | | { |
| 0 | 33 | | @foreach (var committee in info.Committees) |
| 0 | 34 | | { |
| | 35 | | <tr> |
| 0 | 36 | | <td>@committee.CommitteeId</td> |
| 0 | 37 | | <td>@committee.CommitteeName</td> |
| 0 | 38 | | <td>@committee.CommitteeShort</td> |
| 0 | 39 | | <td>@committee.ParentCommitteeName</td> |
| 0 | 40 | | <td>@committee.SeatCount <button class="btn btn-primary btn-sm" @onclick="() |
| | 41 | | <td><a href="#">Gremium löschen</a></td> |
| | 42 | | </tr> |
| 0 | 43 | | } |
| 0 | 44 | | } |
| | 45 | |
|
| | 46 | | </tbody> |
| | 47 | | </table> |
| | 48 | | </div> |
| | 49 | |
|
| | 50 | | </div> |
| | 51 | |
|
| | 52 | | <div class="card-footer"> |
| 0 | 53 | | <button class="btn btn-primary" @onclick="() => createModal.Show()">Neues Gremium hinzufügen</button |
| | 54 | | </div> |
| | 55 | | </div> |
| | 56 | | </div> |
| | 57 | | </div> |
| | 58 | |
|
| 0 | 59 | | @if (!string.IsNullOrEmpty(selectedCommitteeId)) |
| 0 | 60 | | { |
| | 61 | | <MUNity.BlazorServer.Components.Conference.ManageCommitteeSeatsComponent CommitteeId="@selectedCommitteeId" |
| 0 | 62 | | @ref="committeeSeatsRef"/> |
| | 63 | |
|
| 0 | 64 | | } |
| | 65 | |
|
| | 66 | | <MUNity.BlazorServer.Components.Conference.CreateCommitteeModal ConferenceId="@Id" |
| | 67 | | Committees="@info.Committees" |
| 0 | 68 | | RolesChanged="() => ReloadData()" |
| 0 | 69 | | @ref="createModal" /> |
| 0 | 70 | | } |
| | 71 | |
|
| | 72 | |
|
| | 73 | |
|
| | 74 | | @code { |
| 0 | 75 | | [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() |
| 0 | 86 | | { |
| 0 | 87 | | base.OnInitialized(); |
| 0 | 88 | | this.info = conferenceService.GetManageInfo(Id); |
| 0 | 89 | | } |
| | 90 | |
|
| | 91 | | private void ReloadData() |
| 0 | 92 | | { |
| 0 | 93 | | this.info = conferenceService.GetManageInfo(Id); |
| 0 | 94 | | this.InvokeAsync(StateHasChanged); |
| 0 | 95 | | } |
| | 96 | | } |