top of page
bottom of page
// --- App Initialization --- window.onload = () => { // Start Firebase initialization. RenderApp is called after successful authentication. window.firebase.init(renderApp).then(() => { initializeListeners(); }).catch(e => { console.error("Initialization Failed:", e); renderApp(); // Render even if Firebase fails }); }; // Expose functions globally for HTML events window.navigateTo = navigateTo; window.toggleStaffPortal = toggleStaffPortal; window.handleReferralSubmit = handleReferralSubmit; window.handleCounselingNoteSubmit = handleCounselingNoteSubmit; window.calculateTimeSheet = calculateTimeSheet; window.alertInBody = alertInBody;