Add "Your pipeline" widget to member dashboards
Makes the depth-matched payment routing visible per member: walks their subtree and shows who is ONE upgrade away from paying them (member at depth D whose level equals D — their next upgrade routes to this position first), the exact amounts from the contract's cost tables (exposed via the member API), eligibility warnings (needs 2 directs / needs level X), a ready-now total, and whether it covers their own next upgrade. Members building toward their pay-you level are counted, with the takeaway line "helping your leg upgrade IS your income." Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -454,6 +454,7 @@ async function memberPublic(id) {
|
||||
out.income = inc.map(p => ({ fromId: p.fromId, pol: p.pol, ts: p.ts, desc: describeIncome(p.fromTier, p.level, p.pol) })).reverse().slice(0, 50);
|
||||
} catch (e) { out.income = []; }
|
||||
out.subtree = getSubtree(id, 99); // full leg — the dashboard drills down client-side
|
||||
if (costs) out.upgradeCosts = costs.up; // {1:[8 std], 2:[8 prem]} POL — for the pipeline widget
|
||||
// moving-link automation: the first position below (breadth-first, left→right)
|
||||
// that still needs directs is where a qualified member's effort goes next
|
||||
if (out.subtree) {
|
||||
|
||||
Reference in New Issue
Block a user