diff --git a/dashboard.js b/dashboard.js
index 1046023..37f3d8f 100644
--- a/dashboard.js
+++ b/dashboard.js
@@ -56,6 +56,11 @@ const SECTION_META = {
target: 'doctor-zen-section',
title: 'Clinical Workspace',
subtitle: 'Document visits, prescribe, and review vitals.'
+ },
+ settings: {
+ target: 'settings-section',
+ title: 'Preferences',
+ subtitle: 'Manage your profile and clinical tool settings.'
}
};
@@ -198,12 +203,19 @@ document.addEventListener("DOMContentLoaded", () => {
// 3. Section Switching Logic
window.showSection = (sectionId) => {
- const sections = ['overview-section', 'patients-section', 'pharmacy-section', 'lab-section', 'doctor-zen-section'];
+ const sections = ['overview-section', 'patients-section', 'pharmacy-section', 'lab-section', 'doctor-zen-section', 'settings-section'];
sections.forEach(id => {
const el = document.getElementById(id);
if (el) el.classList.add('hidden');
});
+ const role = getUserRole();
+ if (sectionId === 'settings') {
+ const isDoctor = role === 'DOCTOR';
+ document.querySelector('#settings-section .doctor-only')?.classList.toggle('hidden', !isDoctor);
+ document.querySelector('#settings-section .admin-only')?.classList.toggle('hidden', isDoctor);
+ }
+
const target = resolveSectionTarget(sectionId);
const targetEl = document.getElementById(target);
if (targetEl) targetEl.classList.remove('hidden');
diff --git a/globals.css b/globals.css
index bb80bae..6fad271 100644
--- a/globals.css
+++ b/globals.css
@@ -201,3 +201,8 @@ a {
::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}
+
+/* Visibility Utilities */
+.hidden {
+ display: none !important;
+}
diff --git a/settings.html b/settings.html
index e4f1fde..8f46d08 100644
--- a/settings.html
+++ b/settings.html
@@ -29,10 +29,10 @@
⚙️ Settings
-
AD
+
AD
-
Admin
-
Settings
+
Admin
+
Settings
🚪 Logout
@@ -49,7 +49,7 @@