| | 1 | | @using MUNity.Database.Models.Conference |
| | 2 | | @using MUNity.Base |
| | 3 | |
|
| 0 | 4 | | @if (User != null) |
| 0 | 5 | | { |
| | 6 | |
|
| | 7 | | <tr> |
| | 8 | | <td class="field"> |
| 0 | 9 | | @((User.CanWrite) ? "Autor " : null) |
| 0 | 10 | | @((User.User.IsShadowUser) ? "zu Munity eingeladen " : null) |
| 0 | 11 | | @((User.Status == DelegationApplicationUserEntryStatuses.Invited && !User.User.IsShadowUser) ? "Eingeladen " |
| 0 | 12 | | @((User.Status == DelegationApplicationUserEntryStatuses.RequestJoining) ? "Möchte beitreten " : null) |
| | 13 | | </td> |
| | 14 | | <td> |
| 0 | 15 | | @((User.User.IsShadowUser) ? (User.User.Email) : $"{User.User.Forename} {User.User.Lastname}") |
| 0 | 16 | | <a href="javascript:;" @onclick="() => RemoveUser.InvokeAsync(this.User)" class="text-decoration-none text-d |
| | 17 | | </td> |
| | 18 | | </tr> |
| 0 | 19 | | } |
| | 20 | | else |
| 0 | 21 | | { |
| | 22 | | <div class="widget-list-item"> |
| | 23 | | ERROR LOADING A USER |
| | 24 | | </div> |
| | 25 | | <tr> |
| | 26 | | <td colspan="2">ERROR LOADING USER</td> |
| | 27 | | </tr> |
| 0 | 28 | | } |
| | 29 | |
|
| | 30 | |
|
| | 31 | | @code { |
| 0 | 32 | | [CascadingParameter] public Task<AuthenticationState> AuthStateTask { get; set; } |
| | 33 | |
|
| 0 | 34 | | [Parameter] public DelegationApplicationUserEntry User { get; set; } |
| | 35 | |
|
| 0 | 36 | | [Parameter] public EventCallback<DelegationApplicationUserEntry> RemoveUser { get; set; } |
| | 37 | |
|
| 0 | 38 | | private bool showDrowdown = false; |
| | 39 | |
|
| | 40 | | private bool? isMe; |
| | 41 | |
|
| 0 | 42 | | private string dropDownStyle = ""; |
| | 43 | |
|
| | 44 | | private void ToggleMenu(MouseEventArgs args) |
| 0 | 45 | | { |
| 0 | 46 | | showDrowdown = !showDrowdown; |
| 0 | 47 | | dropDownStyle = $"position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate({args.ClientX |
| 0 | 48 | | } |
| | 49 | |
|
| | 50 | | protected override async Task OnParametersSetAsync() |
| 0 | 51 | | { |
| 0 | 52 | | await base.OnParametersSetAsync(); |
| 0 | 53 | | var claim = (await AuthStateTask)?.User; |
| 0 | 54 | | if (claim != null) |
| 0 | 55 | | { |
| 0 | 56 | | isMe = claim.Identity.Name == User.User.UserName; |
| 0 | 57 | | } |
| 0 | 58 | | } |
| | 59 | | } |