MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / setView

Function setView

deployments/desktop/static/reports.js:98–109  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

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();

Callers 2

showReportsViewFunction · 0.70
jumpToReportFunction · 0.70

Calls 1

byIdFunction · 0.85

Tested by

no test coverage detected