Show downline count and downline POL on matrix positions

Each tree node now carries a rollup of its subtree — members below and
their combined earned POL — shown as a footer line on pyramid cards and
inline in the list view.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-08-13 14:28:21 -05:00
parent 110b9c9dfe
commit c69ef6c1f6
3 changed files with 110 additions and 100 deletions
+6
View File
@@ -387,6 +387,12 @@ function getMatrixTree() {
};
n.left = node(m.l, depth + 1);
n.right = node(m.r, depth + 1);
// downline rollup: members below this position and the POL they earned
n.downCount = 0; n.downPol = 0;
for (const c of [n.left, n.right]) if (c && !c.missing) {
n.downCount += 1 + (c.downCount || 0);
n.downPol = +(n.downPol + (c.earnedPol || 0) + (c.downPol || 0)).toFixed(2);
}
return n;
}
const root = node(1, 0);