| | 1 | | @page "/c/managedelegations/{Id}" |
| | 2 | | @inject Services.DelegationService delegationsService |
| | 3 | |
|
| 0 | 4 | | @if (info != null) |
| 0 | 5 | | { |
| | 6 | | <BreadcrumbComponent Source="@info" PageName="DelegationWishess" /> |
| | 7 | |
|
| 0 | 8 | | } |
| | 9 | |
|
| | 10 | | <h1 class="page-header mb-3">DelegationWishesen bearbeiten</h1> |
| | 11 | |
|
| 0 | 12 | | @if (info != null) |
| 0 | 13 | | { |
| | 14 | |
|
| | 15 | | <div class="row mb-3"> |
| | 16 | | <div class="col-12"> |
| 0 | 17 | | <button class="btn btn-primary" @onclick="() => createModal.Show()">Neue DelegationWishes erstellen</button> |
| | 18 | | </div> |
| | 19 | | </div> |
| | 20 | |
|
| | 21 | | <div class="row"> |
| 0 | 22 | | @foreach (var delegation in info.Delegations) |
| 0 | 23 | | { |
| | 24 | | <MUNity.BlazorServer.Components.Conference.ManageDelegationComponent Info="@delegation" |
| | 25 | | ConferenceId="@Id"/> |
| 0 | 26 | | } |
| | 27 | |
|
| | 28 | | </div> |
| | 29 | |
|
| 0 | 30 | | <MUNity.BlazorServer.Components.Conference.CreateDelegationModal @ref="createModal" |
| | 31 | | ConferenceId="@Id" |
| | 32 | | DelegationsChanged="RefreshData"/> |
| 0 | 33 | | } |
| | 34 | |
|
| | 35 | |
|
| | 36 | | @code { |
| 0 | 37 | | [Parameter] public string Id { get; set; } |
| | 38 | |
|
| 0 | 39 | | [CascadingParameter] public Task<AuthenticationState> AuthStateTask { get; set; } |
| | 40 | |
|
| | 41 | | private MUNity.Schema.Conference.ManageDelegationsInfo info; |
| | 42 | |
|
| | 43 | | MUNity.BlazorServer.Components.Conference.CreateDelegationModal createModal; |
| | 44 | |
|
| | 45 | | protected override async Task OnInitializedAsync() |
| 0 | 46 | | { |
| 0 | 47 | | await base.OnInitializedAsync(); |
| 0 | 48 | | await RefreshData(); |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | private async Task RefreshData() |
| 0 | 52 | | { |
| 0 | 53 | | var claim = (await AuthStateTask)?.User; |
| 0 | 54 | | if (claim != null) |
| 0 | 55 | | { |
| 0 | 56 | | info = await delegationsService.GetManageDelegationsInfo(Id, claim); |
| 0 | 57 | | } |
| 0 | 58 | | } |
| | 59 | | } |