diff --git a/app/main.py b/app/main.py index cea4491..3067814 100644 --- a/app/main.py +++ b/app/main.py @@ -272,7 +272,6 @@ PAGE_HTML = """ .pill.manual { background: #f1e8da; color: #a97a4a; } .pill.org { background: #e7edf5; color: #4a6a8a; } .pill.grace { background: #fdf3e3; color: #a97a2a; } - .state-reason { color: var(--muted); font-size: 11px; margin-top: 2px; } /* Trends tab (charts). Colours come from the same vars as the rest of the panel; the SVG is inline so there is no chart library and no CDN. */ .trend-controls { display: flex; gap: 22px; flex-wrap: wrap; margin: 14px 0 0; } @@ -753,17 +752,18 @@ function renderMembers() { const reset = m.reset_at ? m.reset_at.slice(0,10) : '—'; // Membership state is computed by the PORTAL (the source of truth) and // carried on the overview row — the panel only renders it. Non-active - // states (in grace / awaiting contribution) still keep the member's access; - // the reason is shown beneath the pill. + // states (in grace / awaiting contribution) still keep the member's access. + // ONE short pill, matching the panel's pill vocabulary; no caption line. const state = m.state || (m.active ? 'active' : 'inactive'); - const stateLabel = { active: 'active', in_grace: 'in grace', + const stateLabel = { active: 'active', in_grace: 'grace', awaiting_contribution: 'awaiting', inactive: 'inactive' }[state] || state; const stateClass = state === 'active' ? 'active' : (state === 'inactive' ? 'inactive' : 'grace'); - const stateReason = m.state_reason || ''; - const statusCell = '' + - esc(stateLabel) + '' + - (stateReason && state !== 'active' - ? '
' + esc(stateReason) + '
' : ''); + const stateTitle = { active: '', in_grace: 'Payment due — access continues during grace', + awaiting_contribution: 'Awaiting contribution', + inactive: 'Membership deactivated' }[state] || ''; + const statusCell = '' + + esc(stateLabel) + ''; const act = m.activated ? 'yes' : 'pending';