Show activation status (yes/pending) column
This commit is contained in:
1 parent
8785e8650c
commit
6d3f6f7c86
1 file changed
+6
-2
+6
-2
@@ -186,10 +186,10 @@ PAGE_HTML = """<!DOCTYPE html>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Member</th><th>Status</th><th>Balance</th><th>Spend</th><th>Remaining</th><th>Reset</th><th>Adjust</th>
|
||||
<th>Member</th><th>Status</th><th>Activated</th><th>Balance</th><th>Spend</th><th>Remaining</th><th>Reset</th><th>Adjust</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="rows"><tr><td colspan="7" style="color:var(--muted)">Loading…</td></tr></tbody>
|
||||
<tbody id="rows"><tr><td colspan="8" style="color:var(--muted)">Loading…</td></tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -223,9 +223,13 @@ function render(members) {
|
||||
$('rows').innerHTML = members.map(m => {
|
||||
const reset = m.reset_at ? m.reset_at.slice(0,10) : '—';
|
||||
const pill = m.active ? 'active' : 'inactive';
|
||||
const act = m.activated
|
||||
? '<span class="pill active">yes</span>'
|
||||
: '<span class="pill inactive">pending</span>';
|
||||
return '<tr>' +
|
||||
'<td>' + esc(m.email) + (m.username ? '<div style="color:var(--muted);font-size:11px">' + esc(m.username) + '</div>' : '') + '</td>' +
|
||||
'<td><span class="pill ' + pill + '">' + pill + '</span></td>' +
|
||||
'<td>' + act + '</td>' +
|
||||
'<td class="num">' + fmt(m.balance) + '</td>' +
|
||||
'<td class="num">' + fmt(m.spend) + '</td>' +
|
||||
'<td class="num">' + fmt(m.remaining) + '</td>' +
|
||||
|
||||
Reference in new issue
Block a user