From 9334fa50cb6167e00f68cdefecf370144d3dff69 Mon Sep 17 00:00:00 2001 From: ElenitaMLG Date: Mon, 8 Apr 2024 03:46:05 +0300 Subject: [PATCH] UI, landingPage, login, register, reset password, dashboard page --- .gitignore | Bin 126 -> 556 bytes .../HealthcareManagerUI.sln | 11 +- .../Components/Layout/AuthLayout.razor | 2 +- .../Components/Pages/AlertMessage.razor | 12 ++ .../Components/Pages/ChooseRolePage.razor | 15 +++ .../Components/Pages/DashboardPage.razor | 9 ++ .../Components/Pages/LoginPage.razor | 61 ++++++--- .../Components/Pages/RegisterPage.razor | 84 ++++++++++++ .../Components/Pages/ResetPasswordPage.razor | 75 +++++++++++ .../HealthcareManagerUI.csproj | 4 +- .../Models/BaseResponse.cs | 10 ++ .../Models/PacientRegisterModel.cs | 8 ++ .../Models/UserRegisterModel.cs | 9 ++ .../HealthcareManagerUI/Program.cs | 9 +- .../Authentication/AuthenticationService.cs | 125 +++++++++++++++++- .../Authentication/IAuthenticationService.cs | 13 +- .../Services/Http/HttpService.cs | 18 ++- .../HealthcareManagerUI/appsettings.json | 3 +- .../wwwroot/AuthLayout.css | 40 +++++- .../HealthcareManagerUI/wwwroot/LoginPage.css | 1 - 20 files changed, 468 insertions(+), 41 deletions(-) create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/AlertMessage.razor create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/DashboardPage.razor create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/RegisterPage.razor create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/ResetPasswordPage.razor create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Models/BaseResponse.cs create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Models/PacientRegisterModel.cs create mode 100644 frontend/HealthcareManagerUI/HealthcareManagerUI/Models/UserRegisterModel.cs diff --git a/.gitignore b/.gitignore index 09b158ab100dcda963039e3e4ccae6eb1b1c7bf8..95925a79bdce85261740d6ee4130b0d220eda3a6 100644 GIT binary patch literal 556 zcmaiwNe+TQ5JlhG#H+v=h%0tnfk6|{0KwMdtDi7+K#Fuy)#+b<==y$cbTrgBuBrtg z8KrI^XHIOiv$6bpLZKpNn*dpIV8RDND=Vq@`~&C(j?+^IvNK delta 5 McmZ3(Qa7Ov00xNyJpcdz diff --git a/frontend/HealthcareManagerUI/HealthcareManagerUI.sln b/frontend/HealthcareManagerUI/HealthcareManagerUI.sln index 0a6a25a..335ce5c 100644 --- a/frontend/HealthcareManagerUI/HealthcareManagerUI.sln +++ b/frontend/HealthcareManagerUI/HealthcareManagerUI.sln @@ -1,6 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HealthcareManagerUI", "HealthcareManagerUI\HealthcareManagerUI.csproj", "{641DCB44-0CC9-43D0-AE58-5A722261F1E1}" +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34616.47 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthcareManagerUI", "HealthcareManagerUI\HealthcareManagerUI.csproj", "{641DCB44-0CC9-43D0-AE58-5A722261F1E1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,4 +16,10 @@ Global {641DCB44-0CC9-43D0-AE58-5A722261F1E1}.Release|Any CPU.ActiveCfg = Release|Any CPU {641DCB44-0CC9-43D0-AE58-5A722261F1E1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {55598450-70ED-4D22-913B-0C99AB8F3F7D} + EndGlobalSection EndGlobal diff --git a/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Layout/AuthLayout.razor b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Layout/AuthLayout.razor index 3ae314e..0e02478 100644 --- a/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Layout/AuthLayout.razor +++ b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Layout/AuthLayout.razor @@ -5,7 +5,7 @@ - +
diff --git a/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/AlertMessage.razor b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/AlertMessage.razor new file mode 100644 index 0000000..32bdaeb --- /dev/null +++ b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/AlertMessage.razor @@ -0,0 +1,12 @@ +@if (!string.IsNullOrEmpty(ErrorMessage)) +{ + +} + +@code { + [Parameter] + public string ErrorMessage { get; set; } +} diff --git a/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor new file mode 100644 index 0000000..7a1af3f --- /dev/null +++ b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor @@ -0,0 +1,15 @@ +@page "/" +@using HealthcareManagerUI.Components.Layout +@layout AuthLayout + + Choose Role + + +
+

Welcome to Healthcare Manager

+

Please select your role:

+
+ I'm a Doctor + I'm a Patient +
+
diff --git a/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/DashboardPage.razor b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/DashboardPage.razor new file mode 100644 index 0000000..5dee81c --- /dev/null +++ b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/DashboardPage.razor @@ -0,0 +1,9 @@ +@page "/dashboard" + + Dashboard + +

Dashboard

+

login success

+@code { + +} diff --git a/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/LoginPage.razor b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/LoginPage.razor index 8deb0c4..6897c05 100644 --- a/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/LoginPage.razor +++ b/frontend/HealthcareManagerUI/HealthcareManagerUI/Components/Pages/LoginPage.razor @@ -1,54 +1,77 @@ -@page "/" +@page "/login/{role}" @using HealthcareManagerUI.Models @using HealthcareManagerUI.Services.Authentication @using HealthcareManagerUI.Components.Layout @layout AuthLayout -@inject AuthenticationService AuthenticationService +@inject IAuthenticationService AuthenticationService +@inject NavigationManager NavigationManager Login + - + + - +