diff --git a/src/iRLeagueManager.Web/Components/DisplayUser.razor b/src/iRLeagueManager.Web/Components/DisplayUser.razor
new file mode 100644
index 00000000..1cbcf5a4
--- /dev/null
+++ b/src/iRLeagueManager.Web/Components/DisplayUser.razor
@@ -0,0 +1,33 @@
+@using iRLeagueApiCore.Common.Models.Users;
+
+
+ @if (User is null || (string.IsNullOrEmpty(User.Firstname) && string.IsNullOrEmpty(User.Firstname)))
+ {
+
+ }
+ else
+ {
+
+ @if (ShowUserName)
+ {
+
+ }
+ }
+
+
+@code {
+ [Parameter]
+ public string FallbackName { get; set; } = string.Empty;
+ [Parameter]
+ public UserModel? User { get; set; }
+ [Parameter]
+ public bool ShowUserName { get; set; } = true;
+
+ protected override void OnParametersSet()
+ {
+ if (string.IsNullOrEmpty(FallbackName) && User is not null)
+ {
+ FallbackName = User.UserName;
+ }
+ }
+}
diff --git a/src/iRLeagueManager.Web/Components/Reviews/ReviewCard.razor b/src/iRLeagueManager.Web/Components/Reviews/ReviewCard.razor
index 25e3f752..f6f6a45d 100644
--- a/src/iRLeagueManager.Web/Components/Reviews/ReviewCard.razor
+++ b/src/iRLeagueManager.Web/Components/Reviews/ReviewCard.razor
@@ -4,6 +4,7 @@
@using Blazored.Typeahead
@using iRLeagueApiCore.Common.Models
@using iRLeagueApiCore.Common.Models.Reviews
+@using iRLeagueApiCore.Common.Models.Users;
@using iRLeagueManager.Web.ViewModels
@inject NavigationManager NavigationManager
diff --git a/src/iRLeagueManager.Web/Components/Reviews/ReviewComment.razor b/src/iRLeagueManager.Web/Components/Reviews/ReviewComment.razor
index ab8aa187..8a6a1911 100644
--- a/src/iRLeagueManager.Web/Components/Reviews/ReviewComment.razor
+++ b/src/iRLeagueManager.Web/Components/Reviews/ReviewComment.razor
@@ -1,11 +1,12 @@
@inherits MvvmComponentBase
@using iRLeagueApiCore.Common.Models
@using iRLeagueApiCore.Common.Models.Reviews
+@using iRLeagueApiCore.Common.Models.Users;
@using iRLeagueManager.Web.ViewModels
-
@Bind(Comment, x => x.AuthorName)
+
@Bind(Comment, x=> x.Text)
@@ -36,6 +37,8 @@
public IModalService ModalService { get; set; } = default!;
[CascadingParameter]
public IEnumerable
InvolvedMembers { get; set; } = Array.Empty();
+ [CascadingParameter]
+ public IEnumerable LeagueUsers { get; set; } = Array.Empty();
[Parameter, EditorRequired]
public ReviewCommentViewModel Comment { get; set; } = default!;
[CascadingParameter]
@@ -101,4 +104,9 @@
await OnStateHasChanged.InvokeAsync();
}
}
+
+ private UserModel? GetUser(string userId)
+ {
+ return LeagueUsers.FirstOrDefault(x => x.UserId == userId);
+ }
}
diff --git a/src/iRLeagueManager.Web/Components/Settings/SearchUserModal.razor b/src/iRLeagueManager.Web/Components/Settings/SearchUserModal.razor
index 4124e050..3cad8af2 100644
--- a/src/iRLeagueManager.Web/Components/Settings/SearchUserModal.razor
+++ b/src/iRLeagueManager.Web/Components/Settings/SearchUserModal.razor
@@ -10,10 +10,10 @@
Debounce=500
placeholder="Type Name ...">
- @user?.UserName
+
- @user.UserName (@user.Firstname @user.Lastname)
+
+ @if (Success)
+ {
+
+ Your email has been successfully verified.
+ You can now log into your account with your username and password
+
+
+ Login
+
+ }
+ else if (Error)
+ {
+ Oops, something went wrong! Please contact the administrator if you continue having problems.
+ }
+ else
+ {
+
+ Processing email confirmation ...
+
+ }
+
+
+@code {
+ [Parameter]
+ public string UserId { get; set; } = default!;
+ [Parameter]
+ public string ConfirmationToken { get; set; } = default!;
+
+ private bool Success { get; set; } = false;
+ private bool Error { get; set; } = false;
+
+ protected override void OnParametersSet()
+ {
+ base.OnParametersSet();
+ BlazorParameterNullException.ThrowIfNull(this, UserId);
+ BlazorParameterNullException.ThrowIfNull(this, ConfirmationToken);
+ }
+
+ protected override async Task OnAfterRenderAsync(bool firstRender)
+ {
+ await base.OnAfterRenderAsync(firstRender);
+ if (firstRender == false)
+ {
+ return;
+ }
+
+ var result = await ApiService.Client
+ .Users()
+ .WithId(UserId)
+ .ConfirmEmail(ConfirmationToken)
+ .Post();
+ if (result.Success)
+ {
+ Success = true;
+ await InvokeAsync(StateHasChanged);
+ await Task.Delay(3000);
+ NavigationManager.NavigateTo("/member/login");
+ }
+ else
+ {
+ Error = true;
+ }
+ await InvokeAsync(StateHasChanged);
+ }
+}
diff --git a/src/iRLeagueManager.Web/Pages/Member/Login.razor b/src/iRLeagueManager.Web/Pages/Member/Login.razor
index 1e42645b..2b1f711b 100644
--- a/src/iRLeagueManager.Web/Pages/Member/Login.razor
+++ b/src/iRLeagueManager.Web/Pages/Member/Login.razor
@@ -2,6 +2,7 @@
@using System.ComponentModel.DataAnnotations
@using iRLeagueApiCore.Client
@using iRLeagueApiCore.Client.Http
+@using iRLeagueApiCore.Common.Responses;
@using iRLeagueManager.Web.Extensions
@inject IConfiguration configuration
@inject ITokenStore tokenStore
@@ -26,7 +27,12 @@
-