new updates
Build Curio HMS / build-and-deploy (push) Successful in 45s
Details
Build Curio HMS / build-and-deploy (push) Successful in 45s
Details
This commit is contained in:
parent
f948e48b28
commit
771d529a7f
|
|
@ -27,7 +27,7 @@
|
|||
<a href="#" data-section="lab"><span>🔬</span> Lab</a>
|
||||
<a href="billing.html" data-section="billing" data-external><span>💳</span> Billing & Accounts</a>
|
||||
<a href="staff.html" data-section="staff" data-external><span>👔</span> Staff & Payroll</a>
|
||||
<a href="settings.html" data-section="settings" data-external><span>⚙️</span> Settings</a>
|
||||
<a href="#" data-section="settings"><span>⚙️</span> Settings</a>
|
||||
</nav>
|
||||
<div class="user-profile">
|
||||
<div class="avatar">DS</div>
|
||||
|
|
@ -61,6 +61,56 @@
|
|||
<p id="sectionPageSubtitle"></p>
|
||||
</div>
|
||||
|
||||
<!-- Settings Section (Internal) -->
|
||||
<div id="settings-section" class="section-container hidden">
|
||||
<div class="settings-grid doctor-only">
|
||||
<div class="section-card">
|
||||
<h2>Clinical Profile</h2>
|
||||
<div class="input-group">
|
||||
<label>Full Name</label>
|
||||
<input type="text" value="Dr. Sharma">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Specialization</label>
|
||||
<input type="text" value="Cardiologist">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-card">
|
||||
<h2>Zen Scribe Preferences</h2>
|
||||
<div class="input-group">
|
||||
<label>Default Scribe Language</label>
|
||||
<select id="scribeLangPref">
|
||||
<option value="en-US">English (US)</option>
|
||||
<option value="hi-IN">Hindi</option>
|
||||
<option value="te-IN">Telugu</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Auto-Generate Clinical Summary</label>
|
||||
<select>
|
||||
<option>Enabled</option>
|
||||
<option>Disabled</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-grid admin-only hidden">
|
||||
<div class="section-card">
|
||||
<h2>Hospital Configuration</h2>
|
||||
<div class="input-group">
|
||||
<label>Consultation Fee (₹)</label>
|
||||
<input type="number" value="500">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 2rem;">
|
||||
<button class="btn-primary" onclick="alert('Settings saved!')">Save Preferences</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- DOCTOR ZEN VIEW (Clinical Focus) -->
|
||||
<div id="doctor-zen-section" class="hidden">
|
||||
<div class="zen-layout">
|
||||
|
|
|
|||
14
dashboard.js
14
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');
|
||||
|
|
|
|||
|
|
@ -201,3 +201,8 @@ a {
|
|||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Visibility Utilities */
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@
|
|||
<a href="settings.html" class="active"><span>⚙️</span> Settings</a>
|
||||
</nav>
|
||||
<div class="user-profile">
|
||||
<div class="avatar">AD</div>
|
||||
<div class="avatar" id="userAvatar">AD</div>
|
||||
<div class="info">
|
||||
<strong>Admin</strong>
|
||||
<span>Settings</span>
|
||||
<strong id="userNameDisplay">Admin</strong>
|
||||
<span id="userRoleDisplay">Settings</span>
|
||||
<a href="login.html" class="logout-btn"><span>🚪</span> Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
<section class="settings-grid">
|
||||
<section class="settings-grid admin-only">
|
||||
<div class="section-card">
|
||||
<h2>Pricing & Fees</h2>
|
||||
<div class="input-group">
|
||||
|
|
@ -94,11 +94,81 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="settings-grid doctor-only hidden">
|
||||
<div class="section-card">
|
||||
<h2>Clinical Profile</h2>
|
||||
<div class="input-group">
|
||||
<label>Full Name</label>
|
||||
<input type="text" value="Dr. Sharma">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Specialization</label>
|
||||
<input type="text" value="Cardiologist">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Consultation Fee (Personal Override)</label>
|
||||
<input type="number" value="800">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-card">
|
||||
<h2>Zen Scribe Preferences</h2>
|
||||
<div class="input-group">
|
||||
<label>Default Scribe Language</label>
|
||||
<select>
|
||||
<option value="en-US">English (US)</option>
|
||||
<option value="hi-IN">Hindi</option>
|
||||
<option value="te-IN">Telugu</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Auto-Generate Clinical Summary</label>
|
||||
<select>
|
||||
<option>Enabled</option>
|
||||
<option>Disabled</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-card">
|
||||
<h2>Digital Signature</h2>
|
||||
<div class="signature-upload" style="border: 2px dashed var(--border); padding: 2rem; text-align: center; border-radius: var(--radius-md);">
|
||||
<p>Click to upload or drag your signature image</p>
|
||||
<button class="btn-small secondary">Upload Image</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const role = localStorage.getItem('userRole') || 'OWNER';
|
||||
const name = localStorage.getItem('userName') || 'Admin';
|
||||
|
||||
// Update Profile UI
|
||||
document.getElementById('userNameDisplay').innerText = role === 'DOCTOR' ? 'Dr. Sharma' : name;
|
||||
document.getElementById('userRoleDisplay').innerText = role;
|
||||
document.getElementById('userAvatar').innerText = role === 'DOCTOR' ? 'DS' : 'AD';
|
||||
|
||||
if (role === 'DOCTOR') {
|
||||
document.querySelector('.admin-only').classList.add('hidden');
|
||||
document.querySelector('.doctor-only').classList.remove('hidden');
|
||||
document.querySelector('.header-title h1').innerText = 'Doctor Preferences';
|
||||
document.querySelector('.header-title p').innerText = 'Manage your profile and clinical tool settings.';
|
||||
|
||||
// Hide admin sidebar links
|
||||
document.querySelectorAll('.side-nav a').forEach(link => {
|
||||
const text = link.innerText.toLowerCase();
|
||||
if (text.includes('billing') || text.includes('staff') || text.includes('overview')) {
|
||||
link.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('saveSettings').onclick = () => {
|
||||
alert('Settings saved successfully! Changes will reflect in new tokens.');
|
||||
alert('Settings saved successfully!');
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Reference in New Issue