From 8b773966a28c4dc4e4cd45ba058887866978f43b Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Mon, 2 Nov 2026 15:44:34 +0000 Subject: [PATCH] panel: break out the co-op's own share of every top-line total The totals cards showed spend that silently mixed members and the co-op's own operator accounts. /admin/overview now returns operator_spend and operator_all_time_spend beside the totals, and each spend card names its scope ("members + co-op's own") and states the co-op's own share beneath it, so no figure has to be guessed at. --- app/main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 0e8516d..b9f0956 100644 --- a/app/main.py +++ b/app/main.py @@ -261,6 +261,7 @@ PAGE_HTML = """ .tot { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; } .tot .num { font-size: 24px; font-weight: 700; color: var(--green-deep); } .tot .lbl { font-size: 12px; color: var(--muted); } + .tot .sub { font-size: 11px; color: var(--muted); margin-top: 3px; } table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; } th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #f0ede6; font-size: 13px; } th { background: #f6f4ee; color: var(--muted); font-weight: 600; font-size: 12px; } @@ -322,8 +323,8 @@ PAGE_HTML = """
—
members
-
—
current balance used
-
—
all-time spend
+
—
current balance used — members + co-op's own
co-op's own share: —
+
—
all-time spend — members + co-op's own
co-op's own share: —
@@ -474,6 +475,11 @@ async function load() { $('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); + // 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. + $('tot-spend-cycle-own').textContent = fmt(d.totals.operator_spend ?? 0); + $('tot-spend-all-own').textContent = fmt(d.totals.operator_all_time_spend ?? 0); membersData = d.members || []; adminsData = d.admins || []; agentsData = d.agents || [];