card: read the portal's all-time spend, the number the dashboard shows too
ci/woodpecker/push/woodpecker Pipeline was successful

Kept the panel's own 'co-op's own share' line — that is the operator-account
breakdown only this app can see. The headline figure is now the shared one.
This commit is contained in:
inference-admin committed 2026-11-13 21:44:14 +00:00
1 parent 0a115d5838
commit 825eff7053
1 file changed
+4 -2
+4 -2
View File
@@ -676,7 +676,9 @@ async function load() {
const d = await r.json();
$('tot-members').textContent = d.totals.members;
$('tot-spend-cycle').textContent = fmt(d.totals.total_spend);
$('tot-spend-all').textContent = fmt(d.totals.total_all_time_spend ?? d.totals.total_spend);
// One number, the portal's own all-time spend (the shared helper behind the
// money payload and the member dashboard's card).
$('tot-spend-all').textContent = fmt(d.totals.spend_all_time ?? d.totals.total_all_time_spend ?? d.totals.total_spend);
// Break out the co-op's OWN (operator) portion of each total. These totals
// span members AND the co-op's own accounts, so the share is spelled out
// rather than left for the reader to guess.
@@ -696,7 +698,7 @@ async function load() {
$('tot-members').textContent = newShape ? (t.members ?? membersData.length) : ((t.members ?? allRows.length) - guestsData.length);
$('tot-guests').textContent = guestsData.length;
$('tot-spend-cycle').textContent = fmt((t.total_spend ?? 0) - (newShape ? 0 : gSpend));
$('tot-spend-all').textContent = fmt((t.total_all_time_spend ?? t.total_spend ?? 0) - (newShape ? 0 : gAll));
$('tot-spend-all').textContent = fmt(t.spend_all_time ?? ((t.total_all_time_spend ?? t.total_spend ?? 0) - (newShape ? 0 : gAll)));
adminsData = d.admins || [];
agentsData = d.agents || [];
if (currentView === 'members') renderMembers();