Render admin matrix as a drill-down pyramid with open slots

Matrix View now defaults to a generation-by-generation pyramid (root + 3
generations of position cards, empty placements shown as dashed open
slots). Clicking a position re-roots the pyramid there; a breadcrumb
navigates back up. The collapsible list stays behind a toggle. Tree
payload now carries explicit left/right children so an only-child lands
on the correct side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-08-13 10:36:36 -05:00
parent 7c41499312
commit 1e2b03c795
4 changed files with 72 additions and 16 deletions
+2 -2
View File
@@ -332,8 +332,8 @@ function getMatrixTree() {
id, tier: m.tier, tierName: tierName(m.tier), level: m.level, levelName: levelName(m.level),
directCount: m.directCount || 0, earnedPol: m.earnedPol || 0, referrerId: m.referrerId, joinedAt: m.joinedAt
};
const l = node(m.l, depth + 1), r = node(m.r, depth + 1);
if (l || r) n.children = [l, r].filter(Boolean);
n.left = node(m.l, depth + 1);
n.right = node(m.r, depth + 1);
return n;
}
const root = node(1, 0);