mirror of
https://github.com/Shchoholiev/shopping-assistant-web-client.git
synced 2025-04-05 00:59:38 +00:00
SA-129 Display User data in User Settings
This commit is contained in:
parent
a7be8dfa85
commit
9de4170b59
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
@using System.Text.RegularExpressions
|
@using System.Text.RegularExpressions
|
||||||
@using Microsoft.AspNetCore.Components.Forms
|
@using Microsoft.AspNetCore.Components.Forms
|
||||||
@using ShoppingAssistantWebClient.Web.Models.Input;
|
@using ShoppingAssistantWebClient.Web.Models.Input
|
||||||
|
@using Models.GlobalInstances
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
@ -25,13 +25,13 @@
|
|||||||
<form>
|
<form>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="phone">Phone</label>
|
<label for="phone">Phone</label>
|
||||||
<input type="tel" class="form-control" id="phone" placeholder="Enter new phone" pattern="\+?[0-9]{10,15}" required @onchange="ValidatePhone" data-toggle="tooltip" data-placement="top" title="Use format: +xxxxxxxx">
|
<input type="tel" class="form-control" id="phone" placeholder="Enter new phone" pattern="\+?[0-9]{10,15}" required @onchange="ValidatePhone" data-toggle="tooltip" data-placement="top" title="Use format: +xxxxxxxx" value="@phone">
|
||||||
<div class="validation-message @(isPhoneInvalid ? "active" : "")" id="phone-validation" style="color: red;">@phoneValidationMessage</div>
|
<div class="validation-message @(isPhoneInvalid ? "active" : "")" id="phone-validation" style="color: red;">@phoneValidationMessage</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">Email</label>
|
<label for="email">Email</label>
|
||||||
<input type="email" class="form-control" id="email" placeholder="Enter new email" required @onchange="ValidateEmail" data-toggle="tooltip" data-placement="top" title="Use format: example@domain.com">
|
<input type="email" class="form-control" id="email" placeholder="Enter new email" required @onchange="ValidateEmail" data-toggle="tooltip" data-placement="top" title="Use format: example@domain.com" value="@email">
|
||||||
<div class="validation-message @(isEmailInvalid ? "active" : "")" id="email-validation" style="color: red;">@emailValidationMessage</div>
|
<div class="validation-message @(isEmailInvalid ? "active" : "")" id="email-validation" style="color: red;">@emailValidationMessage</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -55,6 +55,10 @@ public partial class Settings : ComponentBase
|
|||||||
this.user = JsonConvert.DeserializeObject<User>(jsonCategoriesResponse);
|
this.user = JsonConvert.DeserializeObject<User>(jsonCategoriesResponse);
|
||||||
user.GuestId = _httpContextAccessor.HttpContext.Request.Cookies["guestId"];
|
user.GuestId = _httpContextAccessor.HttpContext.Request.Cookies["guestId"];
|
||||||
|
|
||||||
|
this.phone = user.Phone;
|
||||||
|
this.email = user.Email;
|
||||||
|
StateHasChanged();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user