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(''); }