Admin: award Suite capacity to any member as a team bonus
Marty asked for a way to grant impressions to anybody, labelled as an admin bonus. Team Grants already did this for leaders, but only within their own organisation and only out of a level pool. adminGrant() is deliberately a different thing: it comes from no pool (the team is not a position and has no allowance), it can reach ANY registered position rather than only someone downline, and it carries a reason that survives in the ledger. Recorded with by:0 so nothing downstream mistakes it for a leader's grant — the member's own page renders those as "the team" rather than "#0". The route verifies the position exists on-chain before crediting it; a typo would otherwise sit in the ledger crediting nobody, and it would be invisible until someone went looking. Awards land on top of whatever the level already allows and expire with the month like every other allowance. The admin page lists what has been awarded this month, so bonuses stay auditable rather than vanishing once given. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,13 +23,14 @@
|
||||
if (!keys.length) { $('gGot').innerHTML = ''; return; }
|
||||
var parts = keys.map(function (k) {
|
||||
var r = received[k];
|
||||
var who = r.from.map(function (f) { return '#' + f.by; });
|
||||
// by:0 is an admin bonus from the team, not a member grant.
|
||||
var who = r.from.map(function (f) { return Number(f.by) === 0 ? 'the team' : '#' + f.by; });
|
||||
var uniq = who.filter(function (v, i) { return who.indexOf(v) === i; });
|
||||
var t = (state.status && state.status.tools[k]) || {};
|
||||
return '<div>· <b style="color:var(--text)">' + n(r.total) + ' ' + esc(t.unit || k) +
|
||||
'</b> of ' + esc((t.label || k).toLowerCase()) + ', from ' + uniq.join(', ') + '</div>';
|
||||
});
|
||||
$('gGot').innerHTML = '<div class="g-got"><b style="color:var(--teal)">Someone above you topped you up this month.</b>' +
|
||||
$('gGot').innerHTML = '<div class="g-got"><b style="color:var(--teal)">You have been topped up this month.</b>' +
|
||||
parts.join('') + '<div style="color:var(--muted);font-size:12.5px;margin-top:6px">' +
|
||||
'It is already added to your allowances — nothing to claim.</div></div>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user