Add SmartClinicManagementSystem

This commit is contained in:
2025-11-03 18:27:23 +01:00
parent f49be0c3d3
commit f65dc6ccdd
75 changed files with 4380 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
// render.js
function selectRole(role) {
setRole(role);
const token = localStorage.getItem('token');
if (role === "admin") {
if (token) {
window.location.href = `/adminDashboard/${token}`;
}
} if (role === "patient") {
window.location.href = "/pages/patientDashboard.html";
} else if (role === "doctor") {
if (token) {
window.location.href = `/doctorDashboard/${token}`;
} else if (role === "loggedPatient") {
window.location.href = "loggedPatientDashboard.html";
}
}
}
function renderContent() {
const role = getRole();
if (!role) {
window.location.href = "/"; // if no role, send to role selection page
return;
}
}