improvements, fixes...

This commit is contained in:
Loretta 2024-07-04 11:48:43 +02:00
parent 1d88ab484f
commit d7acc9fffe
4 changed files with 68 additions and 68 deletions

View File

@ -1,37 +1,37 @@
@using TIAMWebApp.Shared.Application.Models.PageModels;
<EditForm Model="@loginModel" OnValidSubmit="GoToNextStep">
<DataAnnotationsValidator />
<EditForm Model="@LoginModel" OnValidSubmit="GoToNextStep">
@* <DataAnnotationsValidator /> *@
<div class="form-field d-flex align-items-center">
<DxMaskedInput @bind-Value="@loginModel.Email"
Id="Email"
CssClass="cw-320"
Mask="@EmailMask"
MaskMode="MaskMode.RegEx">
<DxRegExMaskProperties MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)"
Placeholder="Placeholder"
PlaceholdersVisible="PlaceholderVisible" />
</DxMaskedInput>
<DxMaskedInput @bind-Value="@LoginModel.Email"
Id="Email"
CssClass="cw-320"
Mask="@EmailMask"
MaskMode="MaskMode.RegEx">
<DxRegExMaskProperties MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)"
Placeholder="Placeholder"
PlaceholdersVisible="PlaceholderVisible" />
</DxMaskedInput>
</div>
<ValidationMessage For="@(() => loginModel.Email)" />
<ValidationMessage For="@(() => LoginModel.Email)" />
<button class="btn btn-primary mt-3" type="submit">
<span class="@spinnerClass"></span>
Next
</button>
</button>
</EditForm>
@code {
[Parameter]
public LoginModel loginModel { get; set; }
public LoginModel LoginModel { get; set; }
//[Parameter]
//public string Email { get; set; }
@ -56,7 +56,7 @@
spinnerClass = "spinner-border spinner-border-sm";
await Task.Delay(500);
spinnerClass = "";
await LoginModelChanged.InvokeAsync(loginModel);
await LoginModelChanged.InvokeAsync(LoginModel);
await onLoginNext.InvokeAsync();
}

View File

@ -9,64 +9,63 @@
<div class="text-center m-5">
<h1>Login</h1>
<h2 style="font-size:small">Good to see you again!</h2>
</div>
</div>
<div class="container mt-3">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col-12 col-sm-6 px-5">
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
<div class="card glass inputwizardwrapper my-5">
<div class="card glass inputwizardwrapper my-5">
<div class="wrapper">
<div class="my-logo">
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
</div>
<div class="text-center mt-4 name">
@localizer["LoginTitleText"]
</div>
<form class="p-3 mt-3">
<div>
@switch (currentStep)
{
case 1:
<LoginStep1 @bind-LoginModel="_loginModel" onLoginNext="GoToNextStep" />
;
break;
case 2:
<LoginStep3 @bind-LoginModel="_loginModel" onSubmit="SubmitLogin" onPrev="GoToPreviousStep" />
;
break;
}
<div class="wrapper">
<div class="my-logo">
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
</div>
</form>
<p>@currentStep</p>
@{
if (!loggedIn)
{
<div class="text-center mt-4 name">
@localizer["LoginTitleText"]
</div>
<form class="p-3 mt-3">
<div>
@switch (_currentStep)
{
case 1:
<LoginStep1 @bind-LoginModel="_loginModel" onLoginNext="GoToNextStep" />
;
break;
<p>@localizer["LoginEmail"]: @_loginModel.Email</p>
<p>@_loginModel.Password</p>
case 2:
<LoginStep3 @bind-LoginModel="_loginModel" onSubmit="SubmitLogin" onPrev="GoToPreviousStep" />
;
break;
}
</div>
</form>
<p>@_currentStep</p>
@{
if (!_loggedIn)
{
<div>
<p>@localizer["LoginEmail"]: @_loginModel.Email</p>
<p>@_loginModel.Password</p>
</div>
}
}
}
<div class="text-center fs-6">
No account yet? <a href="register">Sign up here!</a>
<div class="text-center fs-6">
No account yet? <a href="register">Sign up here!</a>
</div>
</div>
</div>
</div>
</Animation>
</div>
<div class="col-12 col-sm-6 px-5">
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
<p>
Welcome back to Budapest Airport Transfer Services! We're delighted to have you return to our platform. Please sign in to access your account and manage your bookings effortlessly. If you're new here, feel free to create an account to unlock exclusive benefits and enjoy a seamless booking experience.
</p>
@ -76,7 +75,8 @@
</div>
@code {
LoginModel _loginModel = new LoginModel("test@tiam.hu", "test1234");
//LoginModel _loginModel = new LoginModel("test@tiam.hu", "test1234");
LoginModel _loginModel = new LoginModel("", "");
}

View File

@ -43,23 +43,23 @@ namespace TIAMSharedUI.Pages
//[Display(Name = "LoginTitleText", ResourceType = typeof(MyResources))]
public string TitleText { get; set; } = "dda,mnd,amn,a";
private int currentStep = 1;
bool loggedIn = false;
private int _currentStep = 1;
bool _loggedIn = false;
private void GoToNextStep()
{
currentStep++;
_currentStep++;
}
private void GoToPreviousStep()
{
currentStep--;
_currentStep--;
}
private async void SubmitLogin()
{
currentStep = 1;
_currentStep = 1;
BrowserConsoleLogWriter.Info("Login started: " + "Email: " + _loginModel.Email + ", Password: " + _loginModel.Password);
var response = await userDataService.AuthenticateUser(_loginModel);
//var response = await UserDataservice.TestUserApi(30);

View File

@ -66,11 +66,11 @@
private MessageGrid _messageGrid = null!;
private LoggerClient<MessageGridComponent> _logger = null!;
private LoggerClient<MessageDetailGridComponent> _logger = null!;
protected override void OnInitialized()
{
_logger = new LoggerClient<MessageGridComponent>(LogWriters.ToArray());
_logger = new LoggerClient<MessageDetailGridComponent>(LogWriters.ToArray());
}
private void CustomizeElement(GridCustomizeElementEventArgs e)