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

Function renderReportList

deployments/desktop/static/desktop.js:2927–2942  ·  view source on GitHub ↗
(reports, activeId = "")

Source from the content-addressed store, hash-verified

2925 }
2926
2927 function renderReportList(reports, activeId = "") {
2928 const target = $("reportsList");
2929 if (!reports.length) {
2930 target.className = "reports-list empty";
2931 target.textContent = ui().reports.none;
2932 return;
2933 }
2934 target.className = "reports-list";
2935 target.innerHTML = reports.map((report) => `
2936 <button class="report-row ${report.report_id === activeId ? "active" : ""} ${state.highlightedReports.has(report.report_id) ? "highlighted" : ""}" data-report-id="${escapeHtml(report.report_id)}" type="button">
2937 <h3>${escapeHtml(report.title || ui().reports.defaultTitle)}</h3>
2938 <p>${escapeHtml(report.saved_at || "")} · ${escapeHtml(report.status || ui().reports.completed)}</p>
2939 <p>${escapeHtml(report.snippet || report.report_path || "")}</p>
2940 </button>
2941 `).join("");
2942 }
2943
2944 function clearReportViewer() {
2945 state.currentReport = null;

Callers 4

applyLocaleFunction · 0.70
refreshReportsFunction · 0.70
loadReportContentFunction · 0.70

Calls 3

uiFunction · 0.85
$Function · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected