Dashboard Page - Appointments:

- create separate dashboard components for doctor and patient
- add appointments to dashboard components
- add code to backend for appointments retrieval
This commit is contained in:
ElenitaMLG
2024-04-30 12:48:19 +03:00
parent 1ff7f51aa6
commit 7e38d60802
17 changed files with 665 additions and 30 deletions
+33 -17
View File
@@ -1,28 +1,44 @@
@page "/dashboard/{Role}"
@using HealthcareManagerUiWebAssem.Services.User
@layout AuthLayout
@inject UserService UserService
<head>
<title>Dashboard</title>
</head>
<link rel="stylesheet" href="/bootstrap/dist/css/bootstrap.min.css"/>
<h3>login success</h3>
<h1>@displayMessage</h1>
<div class="position-relative">
<NavLink class="btn btn-primary m-2 position-absolute top-0 end-0" href="@($"/my-profile/{Role}")">My Profile</NavLink>
</div>
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.22.4/dist/bootstrap-table.min.css">
<link href="https://cdn.datatables.net/2.0.4/css/dataTables.bootstrap5.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
@code {
[Parameter] public string Role { get; set; }
private string displayMessage;
protected override void OnInitialized()
{
var userId = UserService.UserId;
displayMessage = $"Login success for {Role} with ID: {userId}";
<style>
.select,
#locale {
width: 100%;
}
.like {
margin-right: 10px;
}
.modal-backdrop.show {
display: none !important;
}
</style>
<NavLink class="btn btn-primary m-2 position-absolute top-0 end-0" href="@($"/my-profile/{Role}")">My Profile</NavLink>
@switch (Role)
{
case "doctor":
<DoctorDashboard/>
break;
case "patient":
<PatientDashboard/>
break;
default:
<p>Unknown role. Please contact support.</p>
break;
}
@code {
[Parameter] public string Role { get; set; }
}