diff --git a/curio/dashboard.js b/curio/dashboard.js
index 1046023..37f3d8f 100644
--- a/curio/dashboard.js
+++ b/curio/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');