From 9de4170b5969592cf5a1272eb92f30e860e4c867 Mon Sep 17 00:00:00 2001 From: shchoholiev Date: Wed, 20 Dec 2023 04:06:56 +0000 Subject: [PATCH] SA-129 Display User data in User Settings --- ShoppingAssistantWebClient.Web/Pages/Login.razor | 4 ++-- ShoppingAssistantWebClient.Web/Pages/Settings.razor | 4 ++-- ShoppingAssistantWebClient.Web/Pages/Settings.razor.cs | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ShoppingAssistantWebClient.Web/Pages/Login.razor b/ShoppingAssistantWebClient.Web/Pages/Login.razor index 8b690a9..2e9bae7 100644 --- a/ShoppingAssistantWebClient.Web/Pages/Login.razor +++ b/ShoppingAssistantWebClient.Web/Pages/Login.razor @@ -2,8 +2,8 @@ @using System.Text.RegularExpressions @using Microsoft.AspNetCore.Components.Forms -@using ShoppingAssistantWebClient.Web.Models.Input; - +@using ShoppingAssistantWebClient.Web.Models.Input +@using Models.GlobalInstances diff --git a/ShoppingAssistantWebClient.Web/Pages/Settings.razor b/ShoppingAssistantWebClient.Web/Pages/Settings.razor index ec1275d..ecfacaa 100644 --- a/ShoppingAssistantWebClient.Web/Pages/Settings.razor +++ b/ShoppingAssistantWebClient.Web/Pages/Settings.razor @@ -25,13 +25,13 @@
- +
@phoneValidationMessage
- +
@emailValidationMessage
diff --git a/ShoppingAssistantWebClient.Web/Pages/Settings.razor.cs b/ShoppingAssistantWebClient.Web/Pages/Settings.razor.cs index 25d9c8a..d3b475d 100644 --- a/ShoppingAssistantWebClient.Web/Pages/Settings.razor.cs +++ b/ShoppingAssistantWebClient.Web/Pages/Settings.razor.cs @@ -55,6 +55,10 @@ public partial class Settings : ComponentBase this.user = JsonConvert.DeserializeObject(jsonCategoriesResponse); user.GuestId = _httpContextAccessor.HttpContext.Request.Cookies["guestId"]; + this.phone = user.Phone; + this.email = user.Email; + StateHasChanged(); + } catch(Exception ex) {