new updates
Build Curio HMS / build-and-deploy (push) Successful in 54s Details

This commit is contained in:
Deep Koluguri 2026-05-15 15:47:49 -04:00
parent de0c19adb7
commit e693ba30f3
3 changed files with 54 additions and 18 deletions

View File

@ -172,9 +172,22 @@
} }
.patient-identity h1 { .patient-identity h1 {
font-size: 2.8rem; font-size: clamp(1.75rem, 4vw, 2.8rem);
font-family: 'Outfit', sans-serif; font-family: 'Outfit', sans-serif;
color: #0F172A; color: var(--text-main);
line-height: 1.2;
}
.patient-identity h1 small {
font-size: 0.45em;
font-weight: 500;
color: var(--text-muted);
}
.ai-nudge-box p {
color: var(--text-muted);
font-size: 0.9rem;
line-height: 1.5;
} }
.action-center { .action-center {
@ -280,6 +293,15 @@
text-align: center; text-align: center;
} }
/* Doctor role: hide reception/admin chrome */
.dashboard-body.role-doctor .dash-header {
display: none;
}
.dashboard-body.role-doctor .dashboard-main {
padding-top: 2rem;
}
/* --- Dashboard page layout & components --- */ /* --- Dashboard page layout & components --- */
.dash-header { .dash-header {
display: flex; display: flex;

View File

@ -427,6 +427,6 @@
</div> </div>
</div> </div>
<script src="dashboard.js?v=17"></script> <script src="dashboard.js?v=18"></script>
</body> </body>
</html> </html>

View File

@ -38,19 +38,17 @@ document.addEventListener("DOMContentLoaded", () => {
// Apply Role-Based Filtering // Apply Role-Based Filtering
if (userRole === 'DOCTOR') { if (userRole === 'DOCTOR') {
document.body.classList.add('role-doctor');
document.querySelectorAll('.side-nav a').forEach(link => { document.querySelectorAll('.side-nav a').forEach(link => {
const text = link.innerText; const text = link.innerText;
if (text.includes('Billing') || text.includes('Staff') || text.includes('Overview')) { if (text.includes('Billing') || text.includes('Staff') || text.includes('Overview')) {
link.style.display = 'none'; link.style.display = 'none';
} }
}); });
// Hide Admin Top Bar elements if (roleDisplay) roleDisplay.innerText = 'Dr. Sharma';
const adminElements = ['.search-box', '.top-actions', '.btn-primary']; if (emailDisplay) emailDisplay.innerText = userEmail;
adminElements.forEach(selector => {
const el = document.querySelector(selector);
if (el && !el.closest('.workspace-actions')) el.style.display = 'none';
});
showSection('zen'); showSection('zen');
} else { } else {
@ -113,7 +111,11 @@ window.showSection = (sectionId) => {
document.querySelectorAll('.side-nav a').forEach(link => { document.querySelectorAll('.side-nav a').forEach(link => {
link.classList.remove('active'); link.classList.remove('active');
if (link.innerText.toLowerCase().includes(sectionId)) link.classList.add('active'); if (sectionId === 'zen' && link.innerText.includes('Queue')) {
link.classList.add('active');
} else if (link.innerText.toLowerCase().includes(sectionId)) {
link.classList.add('active');
}
}); });
}; };
@ -211,19 +213,31 @@ window.switchPatientContext = (name, token, triage) => {
if (data.summary) document.getElementById("aiSummaryCard").classList.remove("hidden"); if (data.summary) document.getElementById("aiSummaryCard").classList.remove("hidden");
else document.getElementById("aiSummaryCard").classList.add("hidden"); else document.getElementById("aiSummaryCard").classList.add("hidden");
document.querySelector(".current-patient h1").innerHTML = `${name} <small>(32y, Female)</small>`; const patientHeading = document.querySelector(".patient-identity h1");
document.querySelector(".patient-meta").innerHTML = `<span>${token}</span> • <span>${triage}</span> • <span class="visit-timer">00:00</span>`; if (patientHeading) patientHeading.innerHTML = `${name} <small>(32y, Female)</small>`;
const metaPills = document.querySelectorAll(".patient-identity .meta-pills");
if (metaPills[1]) {
metaPills[1].innerHTML = `
<span class="pill triage">${token}</span>
<span class="pill time">${triage}</span>
`;
}
}; };
// 5. Global Helpers & Modal Handlers // 5. Global Helpers & Modal Handlers
window.openHistory = () => { window.openHistory = () => {
const name = document.querySelector(".current-patient h1").innerText.split(' (')[0]; const heading = document.querySelector(".patient-identity h1");
const name = heading ? heading.innerText.split(' (')[0] : 'Patient';
alert(`📂 Loading History for ${name}...\n\n- Visit (05/12/26): Chronic Gastritis`); alert(`📂 Loading History for ${name}...\n\n- Visit (05/12/26): Chronic Gastritis`);
}; };
window.openConsultation = () => { window.openConsultation = () => {
document.getElementById("rxDiagnosis").value = document.querySelector(".patient-meta").innerText.split(' • ')[1] || ""; const triagePills = document.querySelectorAll(".patient-identity .meta-pills .pill.time");
modal.style.display = "block"; const triage = triagePills[triagePills.length - 1];
const rxField = document.getElementById("rxDiagnosis");
if (rxField && triage) rxField.value = triage.innerText;
if (modal) modal.classList.add('open');
}; };
window.shareSummary = () => alert("📤 Summary sent to Patient's WhatsApp."); window.shareSummary = () => alert("📤 Summary sent to Patient's WhatsApp.");
@ -234,5 +248,5 @@ window.toggleSidebar = () => {
}; };
// Global Listeners // Global Listeners
if (closeModal) closeModal.onclick = () => modal.style.display = "none"; if (closeModal) closeModal.onclick = () => modal.classList.remove('open');
window.onclick = (e) => { if (e.target == modal) modal.style.display = "none"; }; window.onclick = (e) => { if (e.target == modal) modal.classList.remove('open'); };