Fix 'fmt is not defined' in the admin Coaching Radar (helper was function-local elsewhere)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-08-19 06:10:22 -05:00
parent a3fbd1b2a9
commit dae2de4248
+1
View File
@@ -90,6 +90,7 @@ function genBreakdownHtml(gc,rootId){
document.getElementById('orgShareForm').addEventListener('submit',e=>{e.preventDefault();loadOrgShare()}); document.getElementById('orgShareForm').addEventListener('submit',e=>{e.preventDefault();loadOrgShare()});
async function loadCoaching(){ async function loadCoaching(){
const out=document.getElementById('coachOut');if(!out)return; const out=document.getElementById('coachOut');if(!out)return;
const fmt=n=>Number(n).toLocaleString(undefined,{maximumFractionDigits:0});
out.innerHTML='<div class="empty">Scanning the org…</div>'; out.innerHTML='<div class="empty">Scanning the org…</div>';
try{ try{
const root=(document.getElementById('orgRoot')&&document.getElementById('orgRoot').value.trim())||(state&&state.config&&state.config.orgRootId)||'21'; const root=(document.getElementById('orgRoot')&&document.getElementById('orgRoot').value.trim())||(state&&state.config&&state.config.orgRootId)||'21';