From b8f737d1eee03859b5414d2066ec5379b7a24f24 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Mon, 19 Oct 2026 11:16:31 -0600 Subject: [PATCH] =?UTF-8?q?panel:=20Admin=20accounts=20show=20raw=20spend?= =?UTF-8?q?=20only=20=E2=80=94=20Status/Activated/Spend/Reset=20(30-day=20?= =?UTF-8?q?spend=20in=20Balance=20mode,=20all-time=20in=20All=20Time);=20d?= =?UTF-8?q?rop=20allowance/credits/remaining/adjust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/app/main.py b/app/main.py index 78d6b16..e4baf8b 100644 --- a/app/main.py +++ b/app/main.py @@ -276,10 +276,7 @@ PAGE_HTML = """ .range-btn.active { background: var(--green-mid); color: #fff; border-color: var(--green-mid); } .members-all-time .balance-col.allowance-only, .members-all-time .balance-col.remaining-only { display: none; } - .admins-all-time .balance-col.allowance-only, - .admins-all-time .balance-col.remaining-only { display: none; } .members-all-time .credits-col-head .mode-note::after, - .admins-all-time .credits-col-head .mode-note::after { content: " (total purchased)"; } .table-scroll { overflow-x: auto; border-radius: 12px; } .table-scroll table { min-width: 980px; } th.sortable { cursor: pointer; user-select: none; } @@ -349,12 +346,8 @@ PAGE_HTML = """ Account Status Activated - Allowance - Credits Spend - Remaining - Reset - Adjust + Reset @@ -474,7 +467,7 @@ function setMemberMode(mode) { // Header label reflects the mode $('spend-mode-label').textContent = mode === 'all' ? 'All-time spend' : 'Spend'; const adminLabel = document.getElementById('spend-mode-label-admin'); - if (adminLabel) adminLabel.textContent = mode === 'all' ? 'All-time spend' : 'Spend'; + if (adminLabel) adminLabel.textContent = mode === 'all' ? 'All-time spend' : 'Spend (30 days)'; // Balance-only columns (Allowance/Credits/Remaining/Reset) hide in all-time mode $('table-members').parentElement.classList.toggle('members-all-time', mode === 'all'); const adminTable = document.getElementById('table-admins'); @@ -554,26 +547,12 @@ function renderMembers() { adminSection.style.display = ''; $('admin-rows').innerHTML = adminsData.map(m => { const reset = m.reset_at ? m.reset_at.slice(0,10) : '—'; - const credits = m.credit_balance ?? 0; - const creditsLeft = m.credits_remaining ?? credits; - const creditsShown = memberMode === 'all' ? credits : creditsLeft; - const creditsCell = creditsShown > 0 - ? fmt(creditsShown) - : '—'; return '' + '' + esc(m.email) + (m.username ? '
' + esc(m.username) + '
' : '') + '' + 'admin' + '' + (m.activated ? 'yes' : 'pending') + '' + - '' + fmt(m.balance) + '' + - '' + creditsCell + '' + '' + fmt(memberSpend(m)) + '' + - '' + fmt(m.remaining) + '' + - '' + esc(reset) + '' + - '
' + - '' + - '' + - '' + - '
' + + '' + esc(reset) + '' + ''; }).join(''); }