Coach panel: one-tap Send-this-nudge buttons on every recommendation
Each coach card now carries a pre-written, situation-specific teach-forward message (all four recommendation kinds) sent over the existing wallet-verified Messages rails: msg-send plus the Telegram bridge. When not signed in, an inline prompt appears and the page smooth-scrolls to the Messages card. Chatbot canned answer and AI prompt synced. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@
|
||||
{k:['tier','standard','premium tier','standard tier','premium vs standard','which tier','half','smaller payment','less than expected','why is my payment'],
|
||||
a:()=>`There are two tiers. <strong>Premium</strong> is what our whole team builds at (${pol()} POL entry) — full payments. <strong>Standard</strong> costs about half and pays/earns half at every level. So if a payment ever comes in smaller than expected, it usually came from a Standard-tier position below you. Your tier is <strong>set when you join and can't be changed later</strong> (upgrading advances your level, not your tier), so always join <strong>Premium</strong> and make sure the people you bring on do too. Full breakdown: <a href="/how-pay-works">how-pay-works</a>.`},
|
||||
{k:['dashboard','my dashboard','my page','my position','my team','check my','see my','pipeline','my stats','alerts','notify me','email me','get notified','message','messages','contact my sponsor','contact my upline','contact my downline','reach my team'],
|
||||
a:()=>`Your <strong>Member Dashboard</strong> is at <a href="/my">rmcircle.team/my</a> — enter your ID to see your position, your team (with a depth summary showing members per generation), your payments, your pipeline (money forming below you), any spillover under you, and a <strong>Coach Your Team</strong> panel that tells you exactly who in your leg needs a nudge and what to say. When you're qualified, you can also <strong>upgrade your level right from your dashboard</strong> — connect the wallet that owns your position and confirm; the exact cost is read live from the contract. You can also turn on <strong>email alerts</strong> there, and use <strong>Messages</strong> — wallet-verified messaging with your upline and your team (sign in once with your wallet; no email needed; only people on your matrix lines can message you). To share, use your personal invite page: <strong>rmcircle.team/join/<your ID></strong>.`},
|
||||
a:()=>`Your <strong>Member Dashboard</strong> is at <a href="/my">rmcircle.team/my</a> — enter your ID to see your position, your team (with a depth summary showing members per generation), your payments, your pipeline (money forming below you), any spillover under you, and a <strong>Coach Your Team</strong> panel that tells you exactly who in your leg needs a nudge and what to say — each recommendation has a <strong>"Send this nudge"</strong> button that delivers a ready-written message straight to that member (sign in to Messages once with your wallet; it reaches their dashboard and their Telegram if linked). When you're qualified, you can also <strong>upgrade your level right from your dashboard</strong> — connect the wallet that owns your position and confirm; the exact cost is read live from the contract. You can also turn on <strong>email alerts</strong> there, and use <strong>Messages</strong> — wallet-verified messaging with your upline and your team (sign in once with your wallet; no email needed; only people on your matrix lines can message you). To share, use your personal invite page: <strong>rmcircle.team/join/<your ID></strong>.`},
|
||||
{k:['level','levels','upgrade','scintilla','ascensus','fabrica','culmen','apex','fastigium','vertex','corona','8 levels'],
|
||||
a:()=>`There are 8 Premium levels: <strong>Scintilla, Ascensus, Fabrica, Culmen, Apex, Fastigium, Vertex, Corona</strong>. Everyone starts at Scintilla. Upgrade as quickly as practical — ideally using earned POL — because the first two payments at each level are designed to help fund your next upgrade. Stay aware of your active downline's levels so you don't fall behind.`},
|
||||
{k:['30 positions','goal','milestone','matrix','how many people','team size'],
|
||||
|
||||
+33
-4
@@ -331,6 +331,11 @@
|
||||
|
||||
// "Coach your team" — the same triage the team admin runs, scoped to THIS
|
||||
// position's leg: who below could use a nudge, and exactly what to tell them.
|
||||
// One-tap nudges: pre-written message per coach recommendation, sent over
|
||||
// the wallet-verified Messages rails (and bridged to Telegram if linked).
|
||||
const nudgeTexts={};
|
||||
function nudgeBtn(key){return `<br><button class="btn btn-teal btn-sm coach-nudge" data-nkey="${key}" style="margin-top:7px">📨 Send this nudge</button><span class="micro coach-nudge-note" style="display:none;margin-left:8px"></span>`}
|
||||
function regNudge(id,kind,text){const key=id+':'+kind;nudgeTexts[key]={to:id,text};return nudgeBtn(key)}
|
||||
function renderCoach(d){
|
||||
const card=document.getElementById('dCoachCard'),el=document.getElementById('dCoach');
|
||||
if(!card||!el)return;
|
||||
@@ -338,13 +343,37 @@
|
||||
if(!c||!c.ready||!c.scanned||((c.rollForward||[]).length+(c.atRisk||[]).length+(c.oneAway||[]).length)===0){card.style.display='none';return;}
|
||||
const link=id=>`<a href="/my/${id}" style="color:var(--teal)">#${id}</a>`;
|
||||
const rows=[];
|
||||
(c.rollForward||[]).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">💬</div><div class="pp-body">${link(r.id)} is <strong>qualified but still Scintilla</strong> with ${fmt(r.earnedPol)} POL of entry rewards — their Ascensus upgrade (${fmt(r.ascensusCost)} POL) is already covered and catches their team's first payments. Tell them — then show them how you spotted it, so they can spot it for their two.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-8" style="color:var(--teal)">Lesson 8 — Timing Upgrades to Catches</a></span></div></div>`));
|
||||
(c.atRisk||[]).filter(r=>r.qualified&&r.level>1).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">⚠️</div><div class="pp-body">${link(r.id)} (${esc(r.levelName)}) has <strong style="color:var(--gold)">${fmt(r.atRiskPol)} POL forming</strong> below them but needs <strong>${esc(r.neededLevelName)}</strong> to catch it — worth a heads-up before it passes them.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-8" style="color:var(--teal)">Lesson 8 — Timing Upgrades to Catches</a></span></div></div>`));
|
||||
(c.atRisk||[]).filter(r=>!r.qualified).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">⏰</div><div class="pp-body">${link(r.id)} has <strong style="color:var(--gold)">${fmt(r.atRiskPol)} POL forming</strong> below but isn't qualified yet (${r.directCount}/2) — help them find their ${r.directCount===1?'last direct':'2 directs'}.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-2" style="color:var(--teal)">Lesson 2 — Your Warm List</a></span></div></div>`));
|
||||
(c.oneAway||[]).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">🎯</div><div class="pp-body">${link(r.id)} is <strong>one direct away</strong> from qualifying — introduce them to one good person and their whole position activates.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-3" style="color:var(--teal)">Lesson 3 — The Conversation</a></span></div></div>`));
|
||||
(c.rollForward||[]).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">💬</div><div class="pp-body">${link(r.id)} is <strong>qualified but still Scintilla</strong> with ${fmt(r.earnedPol)} POL of entry rewards — their Ascensus upgrade (${fmt(r.ascensusCost)} POL) is already covered and catches their team's first payments. Tell them — then show them how you spotted it, so they can spot it for their two.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-8" style="color:var(--teal)">Lesson 8 — Timing Upgrades to Catches</a></span>${regNudge(r.id,'roll',`Great news from my coaching panel: your Ascensus upgrade (~${Math.round(r.ascensusCost)} POL) is already fully covered by the ${Math.round(r.earnedPol)} POL of entry rewards you've caught. Upgrading now means your team's first payments land on YOU instead of passing by. The how and why is Lesson 8: https://rmcircle.team/training#lesson-8 — and after you upgrade, open the "Coach your team" card on YOUR dashboard and run this same check for your two. That's the whole system.`)}</div></div>`));
|
||||
(c.atRisk||[]).filter(r=>r.qualified&&r.level>1).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">⚠️</div><div class="pp-body">${link(r.id)} (${esc(r.levelName)}) has <strong style="color:var(--gold)">${fmt(r.atRiskPol)} POL forming</strong> below them but needs <strong>${esc(r.neededLevelName)}</strong> to catch it — worth a heads-up before it passes them.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-8" style="color:var(--teal)">Lesson 8 — Timing Upgrades to Catches</a></span>${regNudge(r.id,'arq',`Friendly heads-up from my coaching panel: about ${Math.round(r.atRiskPol)} POL is forming below you, but it needs ${r.neededLevelName} to catch when it arrives — you have time to get ahead of it. How the timing works is Lesson 8: https://rmcircle.team/training#lesson-8. Your own dashboard (https://rmcircle.team/my/${r.id}) shows the same numbers on the pipeline panel — and show your two how to read theirs!`)}</div></div>`));
|
||||
(c.atRisk||[]).filter(r=>!r.qualified).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">⏰</div><div class="pp-body">${link(r.id)} has <strong style="color:var(--gold)">${fmt(r.atRiskPol)} POL forming</strong> below but isn't qualified yet (${r.directCount}/2) — help them find their ${r.directCount===1?'last direct':'2 directs'}.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-2" style="color:var(--teal)">Lesson 2 — Your Warm List</a></span>${regNudge(r.id,'arn',`Money is already forming below you (about ${Math.round(r.atRiskPol)} POL) — it just can't land until you're qualified (you're at ${r.directCount}/2 directs). You're ${r.directCount===1?'one good conversation':'two good conversations'} away. Lesson 2 makes the warm list painless: https://rmcircle.team/training#lesson-2 — and I'm happy to help you work it. Reply here anytime.`)}</div></div>`));
|
||||
(c.oneAway||[]).forEach(r=>rows.push(`<div class="pp-row" style="padding:9px 12px"><div class="pp-icon">🎯</div><div class="pp-body">${link(r.id)} is <strong>one direct away</strong> from qualifying — introduce them to one good person and their whole position activates.<br><span class="micro">📚 The Method play: send them <a href="/training#lesson-3" style="color:var(--teal)">Lesson 3 — The Conversation</a></span>${regNudge(r.id,'one',`You're ONE direct away from qualifying — one person, and your whole position activates. Lesson 3 gives you the exact conversation, word for word: https://rmcircle.team/training#lesson-3. Want to pick who to talk to first together? Reply here — I've got you.`)}</div></div>`));
|
||||
if(!rows.length){card.style.display='none';return;}
|
||||
el.innerHTML=rows.slice(0,10).join('')+`<p class="micro" style="margin:10px 0 0"><strong style="color:var(--text)">The team rule: don't just tell them — teach them to coach.</strong> Everyone on this list has this same panel on their own dashboard. When you reach out, walk them through THEIR "Coach your team" card so they run this exact play for their two. You're not just coaching two people — you're teaching two coaches. That's what builds depth that pays. And remember: every upgrade below you either pays your position directly or builds the depth that will. Not sure how to walk someone through their dashboard? <a href="/training" style="color:var(--teal)">Video 7 in the training</a> is the full tour — send it.</p>`;
|
||||
card.style.display='';
|
||||
if(!el.__nudgeBound){
|
||||
el.__nudgeBound=true;
|
||||
el.addEventListener('click',async ev=>{
|
||||
const btn=ev.target.closest&&ev.target.closest('button.coach-nudge');
|
||||
if(!btn)return;
|
||||
const rec=nudgeTexts[btn.dataset.nkey];if(!rec)return;
|
||||
const note=btn.nextElementSibling;
|
||||
const say=(t,color)=>{if(note){note.style.display='';note.style.color=color||'var(--muted)';note.textContent=t;}};
|
||||
btn.disabled=true;const old=btn.textContent;btn.textContent='Sending…';
|
||||
try{
|
||||
const me=await fetch('/api/public/msg-me');
|
||||
if(me.status===401){
|
||||
btn.textContent=old;btn.disabled=false;
|
||||
say('Sign in to Messages first (one free wallet signature) — then tap again.','var(--gold)');
|
||||
const mc=document.getElementById('dMsg');if(mc&&mc.scrollIntoView)mc.scrollIntoView({behavior:'smooth',block:'center'});
|
||||
return;
|
||||
}
|
||||
const r=await fetch('/api/public/msg-send',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({toId:rec.to,body:rec.text})});
|
||||
const dd=await r.json().catch(()=>({}));
|
||||
if(r.ok&&!dd.error){btn.textContent='Sent ✓';say('Delivered to their dashboard — and straight to their Telegram if they’ve linked it.');}
|
||||
else{btn.textContent=old;btn.disabled=false;say(dd.error||'Could not send — try again.','var(--danger)');}
|
||||
}catch(e){btn.textContent=old;btn.disabled=false;say('Network hiccup — try again.','var(--danger)');}
|
||||
});
|
||||
}
|
||||
}
|
||||
// "My Next Step" — the single clearest action + the level ladder + a funded
|
||||
// badge (server tells us funded true/false; it never sends the raw balance).
|
||||
|
||||
Reference in New Issue
Block a user