Fix: init Well Visit tab on DOMContentLoaded instead of lazy tabChanged event

This commit is contained in:
Daniel Onyejesi 2026-03-22 00:10:46 -04:00
parent 383fa2b149
commit 9c476b520a

View file

@ -360,14 +360,7 @@
// ─── Wire up ───────────────────────────────────────────────────────────────
document.addEventListener('DOMContentLoaded', function () {
// Run when tab becomes visible (lazy init)
var initialized = false;
document.addEventListener('tabChanged', function (e) {
if (e.detail && e.detail.tab === 'wellvisit' && !initialized) {
initialized = true;
init();
}
});
init();
});
})();