(name)
| 96 | } |
| 97 | |
| 98 | function setView(name) { |
| 99 | const targetView = byId(name); |
| 100 | const targetNav = document.querySelector(`[data-view="${name}"]`); |
| 101 | if (!targetView || !targetNav) return; |
| 102 | document.querySelectorAll(".view").forEach((view) => view.classList.remove("active")); |
| 103 | document.querySelectorAll(".nav-item").forEach((item) => item.classList.remove("active")); |
| 104 | targetView.classList.add("active"); |
| 105 | targetNav.classList.add("active"); |
| 106 | if (byId("pageTitle")) { |
| 107 | byId("pageTitle").textContent = targetNav.textContent; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | async function showReportsView(options = {}) { |
| 112 | ensureReportsDom(); |
no test coverage detected