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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user