Coaching scan: expose earnedPol + next upgradeCost on at-risk entries for funded-vs-timing nudge framing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-08-19 06:13:41 -05:00
parent dae2de4248
commit 2872a30b96
+3 -1
View File
@@ -683,7 +683,9 @@ function getCoachingScan(rootId, maxItems = 15) {
if (missing > 0) atRisk.push({ id, level: lvl, levelName: levelName(lvl), qualified: q, if (missing > 0) atRisk.push({ id, level: lvl, levelName: levelName(lvl), qualified: q,
directCount: m.directCount || 0, atRiskPol: +missing.toFixed(2), fromIds: fromIds.slice(0, 6), directCount: m.directCount || 0, atRiskPol: +missing.toFixed(2), fromIds: fromIds.slice(0, 6),
need: q ? 'upgrade' : 'qualify', neededLevel: q ? minDepth + 1 : null, need: q ? 'upgrade' : 'qualify', neededLevel: q ? minDepth + 1 : null,
neededLevelName: q ? levelName(minDepth + 1) : null }); neededLevelName: q ? levelName(minDepth + 1) : null,
earnedPol: +(m.earnedPol || 0).toFixed(2),
upgradeCost: q ? +(((costs.up[m.tier === 2 ? 2 : 1] || [])[lvl - 1]) || 0).toFixed(2) : null });
if (q && lvl === 1) rollForward.push({ id, earnedPol: +(m.earnedPol || 0).toFixed(2), if (q && lvl === 1) rollForward.push({ id, earnedPol: +(m.earnedPol || 0).toFixed(2),
ascensusCost: +((costs.up[m.tier === 2 ? 2 : 1] || [])[0] || 0).toFixed(2) }); ascensusCost: +((costs.up[m.tier === 2 ? 2 : 1] || [])[0] || 0).toFixed(2) });
if ((m.directCount || 0) === 1) oneAway.push({ id, levelName: levelName(lvl) }); if ((m.directCount || 0) === 1) oneAway.push({ id, levelName: levelName(lvl) });