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 {
font-size: 2.8rem;
font-size: clamp(1.75rem, 4vw, 2.8rem);
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 {
@ -280,6 +293,15 @@
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 --- */
.dash-header {
display: flex;

View File

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

View File

@ -38,6 +38,8 @@ document.addEventListener("DOMContentLoaded", () => {
// Apply Role-Based Filtering
if (userRole === 'DOCTOR') {
document.body.classList.add('role-doctor');
document.querySelectorAll('.side-nav a').forEach(link => {
const text = link.innerText;
if (text.includes('Billing') || text.includes('Staff') || text.includes('Overview')) {
@ -45,12 +47,8 @@ document.addEventListener("DOMContentLoaded", () => {
}
});
// Hide Admin Top Bar elements
const adminElements = ['.search-box', '.top-actions', '.btn-primary'];
adminElements.forEach(selector => {
const el = document.querySelector(selector);
if (el && !el.closest('.workspace-actions')) el.style.display = 'none';
});
if (roleDisplay) roleDisplay.innerText = 'Dr. Sharma';
if (emailDisplay) emailDisplay.innerText = userEmail;
showSection('zen');
} else {
@ -113,7 +111,11 @@ window.showSection = (sectionId) => {
document.querySelectorAll('.side-nav a').forEach(link => {
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");
else document.getElementById("aiSummaryCard").classList.add("hidden");
document.querySelector(".current-patient h1").innerHTML = `${name} <small>(32y, Female)</small>`;
document.querySelector(".patient-meta").innerHTML = `<span>${token}</span> • <span>${triage}</span> • <span class="visit-timer">00:00</span>`;
const patientHeading = document.querySelector(".patient-identity h1");
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
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`);
};
window.openConsultation = () => {
document.getElementById("rxDiagnosis").value = document.querySelector(".patient-meta").innerText.split(' • ')[1] || "";
modal.style.display = "block";
const triagePills = document.querySelectorAll(".patient-identity .meta-pills .pill.time");
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.");
@ -234,5 +248,5 @@ window.toggleSidebar = () => {
};
// Global Listeners
if (closeModal) closeModal.onclick = () => modal.style.display = "none";
window.onclick = (e) => { if (e.target == modal) modal.style.display = "none"; };
if (closeModal) closeModal.onclick = () => modal.classList.remove('open');
window.onclick = (e) => { if (e.target == modal) modal.classList.remove('open'); };