Casey — Crossfield Case Management

Active Pipeline

38 active cases · 4 stuck >7 days · 2 awaiting UW response
Submitted
12
avg 2.1 days in stage
In Underwriting
9
avg 14 days
Approved — Funding
8
$284k pending comm
Placed This Month
5
$112k earned
Stuck >7 Days
4
Action required
ClientPolicy #CarrierAgentFace $ StageDays in StageLast UpdateNext Action

All Cases

Loading…
ClientPolicy #CarrierAgentFace $ StageBankDaysComm EstStatus
Pipeline / All Cases /

🏛 Insurance Carrier Track
Move stage
🏦 Bank / Premium Finance Track
Move stage
💬 Activity & Updates
visible to agent · client (toggle per message)
⚡ Ask Casey — move this case forward
Casey can draft emails, chase UW, request docs, escalate stuck stages. Try:
📞 Weekly UW Call
📋 Policy details
👥 Agents & Attribution
drives commission split
📎 Pending Requirements
Responsible: Agent Carrier Bank
✅ Document Checklist

Stuck Cases — 4 require action

Cases in a stage longer than the carrier benchmark · sorted by overage
ClientCarrierStageDays in Stage BenchmarkOverageBlockerOwnerAction
📞 UW call queue — schedule a sync to resolve stuck cases
NLG New Business
Last call: 3 days ago · 2 stuck cases
Symetra BSB Desk
Last call: 1 week ago · 0 stuck
North American UW
Last call: 12 days ago · 1 stuck

Weekly UW Calls

Recurring sync with each carrier — drop the recording, Casey identifies every case mentioned and posts per-case updates automatically
📝
Paste or drop this week's UW call transcript
Text only (.txt · .docx · paste) — Casey identifies every case mentioned by name/policy #, splits per-case extracts, posts updates to each case's activity feed.
Latest call — NLG weekly UW sync · Thu Apr 24, 10:00am
⏱ 62 minutes 📋 14 cases discussed ✅ 12 updates posted ⚠ 2 actions flagged 👥 Tomer · Ethan · Maria (NLG UW) · Steve (NLG UW Mgr)
TimestampCase MentionedPolicy #Stage DiscussedExtracted UpdateAuto-Action
Weekly call archive
DateCarrierDurationCases DiscussedUpdates PostedActions FlaggedAttendees

Inbox

Case-related messages and alerts

Casey Reports

Pipeline health · velocity · agent + carrier performance · YTD 2026
Cases Opened YTD
87
+12 vs last yr
Placed YTD
61
70% placement ratio
Avg Cycle Time
42d
app → inforce
Avg UW Review
14d
NLG benchmark hit
Dropped / NTO
12
14% — flag for review
Avg time-in-stage by stage
Application
3.2d
Paramed / Labs
9.1d
Submitted
2.1d
UW Review
14.3d
Approved / Funding
10.8d
Placed / Inforce
2.5d
Stuck-stage trend (last 6 months)
NOV
DEC
JAN
FEB
MAR
APR ↑
Avg 4.3/mo · April trending up — concentrated in NLG UW Review
Placement ratio by carrier
CarrierSubmittedPlacedRatioAvg Cycle
NLG523975%38d
Symetra221673%51d
North Am13646%62d
Cycle time by agent
AgentCasesAvg CycleStuckPlaced
Tomer Yacobi3439d226
Ethan Roth2244d115
Dawn Reed1851d013
Justin Baron1358d17
Drop / NTO reasons — YTD
ReasonCount%Carriers Most AffectedAction
Client unresponsive (paramed)433%NLG, SymetraTighten 7-day rule
UW decline (medical)325%NLGPre-screen better
Bank declined PF217%Vet liquid net worth pre-app
Client changed mind217%Stronger sales call
APS never arrived18%NLGPush HIPAA earlier

Agents — team workload & attribution

Crossfield agents (writing) + back-office staff (screening / sales calls) · drives Fin comp split
Crossfield Agents
7
writing producers
Back-Office Staff
4
screening + sales calls
External Downline
19
override-only
Active This Month
9
with cases in flight
Writing Agents (Crossfield)
Manager and Broker Manager cols admin-only
AgentTierManagerBroker MgrActiveStuckPlaced YTDYTD CommCarriers
Back-office staff — Screening & Sales call attribution
StaffRoleScreening CallsSales CallsPass-Through RateBonus YTD
Caleb MendezScreening Lead42371%$10,500
Vivian NgScreening2868%$7,000
Caleb (sales) ↑
Dawn Reed ↑ writingBSB Sales1883%incl. in writing split
Agent profile · Tomer Yacobi — click any agent to drill in
T
Tomer Yacobi
Owner · Platinum · since 2018
Active Cases (14)
ClientCarrierStageDaysFace $

Attribution — Screening & Sales Calls

Edit who gets credit for each case · auto-saves to Firebase · drives commission payments
Cases to Attribute
active pipeline
Missing Screening
needs assignment
Missing Sales Call
needs assignment
Fully Attributed
ready to pay
Client Policy # Agent (Writing) Stage Target Premium 🎯 Screening Call By 📞 Sales Call By Saved
Loading cases…
💵 Pay Summary — estimated screening & sales bonuses
Screening Call Bonuses
Sales Call Credits
AgentsWriting
● Active
S
in linkedin.com/in/—
Reporting hierarchy — max 2 levels up
Bio — used on public landing page
🌐 Public landing page
👤
Carrier contracts — check each carrier this agent is appointed with · drives which carriers appear in case-creation dropdown
📊 Pipeline — active cases (0)
ClientPolicy #CarrierStageDays in StageFace $Annl PremStatus
☑ Closed cases — last 12 months (0)
ClientPolicy #CarrierOutcomeIssuedFace $Annl PremCommissionCycle
Recent activity
Compensation summary — flows to Fin
Licensing & continuing education
StateLicense #LOAIssuedRenewsCE Status

🏆 Leaderboard — YTD 2026

Click any agent to open their full profile · updates from live case data
Rank Agent Tier Cases Placed Active YTD Commissions Placement Ratio Avg Cycle Stuck Score
var DU_FIELDS = [ {id:'photo-id', label:'Photo ID', ghlKey:'Doc Photo ID'}, {id:'tax', label:'Tax Returns', ghlKey:'Doc Tax Returns'}, {id:'bank', label:'Bank Statements', ghlKey:'Doc Bank Statements'}, {id:'income', label:'Proof of Income', ghlKey:'Doc Proof of Income'}, {id:'brokerage', label:'Brokerage Statements', ghlKey:'Doc Brokerage Statements'}, {id:'networth', label:'Net Worth Statement', ghlKey:'Doc Net Worth'}, {id:'illustration',label:'Inforce Illustration', ghlKey:'Doc Inforce Illustration'}, {id:'pfapp', label:'PF Application', ghlKey:'Doc PF Application'} ]; function openDocUploadModal(){ var c = currentCase; var lbl = document.getElementById('du-case-label'); lbl.textContent = c ? 'Case: ' + (c.client||'—') + ' · ' + (c.policyNum||'—') : 'No case selected'; // pre-populate status selects from Firebase docChecklist DU_FIELDS.forEach(function(f){ var el = document.getElementById('du-'+f.id+'-status'); if(el && c && c.docChecklist && c.docChecklist[f.ghlKey] !== undefined){ el.value = c.docChecklist[f.ghlKey] ? 'Received' : ''; } var nameEl = document.getElementById('du-'+f.id+'-name'); if(nameEl) nameEl.textContent = 'No file chosen'; var fileEl = document.getElementById('du-'+f.id); if(fileEl) fileEl.value = ''; // wire file input label fileEl && fileEl.addEventListener('change', function(){ nameEl.textContent = fileEl.files[0] ? fileEl.files[0].name : 'No file chosen'; }); }); document.getElementById('du-save-msg').style.display='none'; document.getElementById('doc-upload-modal').classList.add('show'); } function closeDocUploadModal(){ document.getElementById('doc-upload-modal').classList.remove('show'); } function saveDocStatuses(){ var c = currentCase; if(!c || !c.id){ alert('No case loaded.'); return; } var updates = {}; DU_FIELDS.forEach(function(f){ var sel = document.getElementById('du-'+f.id+'-status'); if(sel && sel.value){ updates['casey_cases/'+c.id+'/docChecklist/'+f.ghlKey] = { status: sel.value, updatedAt: new Date().toISOString() }; } }); db.ref().update(updates).then(function(){ document.getElementById('du-save-msg').style.display='block'; // update local cache if(!c.docChecklist) c.docChecklist = {}; DU_FIELDS.forEach(function(f){ var sel = document.getElementById('du-'+f.id+'-status'); if(sel && sel.value) c.docChecklist[f.ghlKey] = (sel.value === 'Received'); }); setTimeout(function(){ closeDocUploadModal(); }, 1200); }).catch(function(e){ alert('Save failed: '+e.message); }); } // ── AGENT PROFILE DATA & FUNCTIONS ─────────────────────────────── var AGENT_PROFILES = {}; function initAgentProfiles(){ AGENT_PROFILES = { 'Tomer Yacobi':{ tier:'Platinum',initials:'T',color:'var(--gold)',colorText:'var(--navy)', role:'Owner · Platinum · since 2018',active:true, meta:'Agent · onboarded Jan 2018 · NPN 288I1 · CA · NV · TX', email:'[email protected]',phone:'(310) 555-0100',cell:'(310) 555-0101', calendar:'calendly.com/tomer-cf',address:'Hackensack, NJ',npn:'288I1', languages:'English · Hebrew',linkedin:'linkedin.com/in/tomeryacobi', splitLine:'Tomer 100% writing → Crossfield 25% participation', bio:'Founder and lead producer at Crossfield. Specializes in premium finance IUL, qualified plan rescue, and executive bonus structures for high-net-worth clients.', tags:['#premium-finance','#IUL','#executive-bonus','#NLG-specialist'], kpis:{active:14,placed:26,comm:631000,ratio:'76%',cycle:'39d',faceTot:'$9.2M',placedLifetime:63}, carriers:[ {name:'National Life (NLG)',badge:'NLG',cls:'cb-nlg',active:true,rate:'Yr1 rate 130%',apptd:'apptd Jan 2018',cases:14}, {name:'Symetra',badge:'Sym',cls:'cb-sym',active:true,rate:'Yr1 rate 105%',apptd:'apptd Mar 2020',cases:4}, {name:'North American',badge:'NA',cls:'cb-na',active:true,rate:'Yr1 rate 110%',apptd:'apptd Jun 2021',cases:2}, {name:'Prudential',badge:'Pru',cls:'',active:false,note:'not appointed'}, {name:'Pacific Life',badge:'PL',cls:'',active:false,inprogress:true,note:'Contracting in progress',warn:'3 of 5 forms returned'}, {name:'Lincoln Financial',badge:'LFG',cls:'',active:false,note:'not appointed'}, {name:'Mutual of Omaha',badge:'MoO',cls:'',active:false,note:'not appointed'}, {name:'F&G Life',badge:'F&G',cls:'',active:false,note:'not appointed'} ], activity:[ {date:'May 09',icon:'📋',text:'New case opened — Challa Chi · NLG IUL · $1.5M'}, {date:'May 07',icon:'📞',text:'Sales call logged — Hector Escobar · 45min · attribution: Tomer 100%'}, {date:'Apr 28',icon:'✓',text:'Placed — Sankha Nagchoudhury · $650k Pref NT · commission $18,563 (released)'}, {date:'Apr 24',icon:'📞',text:'NLG weekly UW sync — 14 cases discussed · 2 flagged'} ], comp:{split:'100% writing · 25% Crossfield participation',gross:631000,paidAgent:504800,pending:49764,chargebacks:0}, licenses:[ {state:'New Jersey',resident:true,num:'NJ-1234567',loa:'Life · A&H · Annuity',issued:'Jan 2018',renews:'Jan 2028',ce:'24/24 hrs',ceStatus:'ok'}, {state:'California',num:'CA-0K12345',loa:'Life · A&H · Annuity',issued:'Mar 2018',renews:'Mar 2027',ce:'24/24 hrs',ceStatus:'ok'}, {state:'Texas',num:'TX-2918804',loa:'Life · Annuity',issued:'Jul 2022',renews:'Jul 2026',ce:'24/24 hrs',ceStatus:'ok'} ] }, 'Surinder Pal Kaur':{ tier:'Silver',initials:'S',color:'#7C6FA0',colorText:'#fff', role:'Agent · onboarded Aug 2024',active:true, meta:'Agent · onboarded Aug 2024 · NPN 21408875 · CA · TX · AZ · NV', email:'[email protected]',phone:'(415) 555-0182',cell:'(415) 555-0193', calendar:'calendly.com/surinder-cf',address:'San Francisco, CA',npn:'21408875', languages:'English · Punjabi · Hindi',linkedin:'linkedin.com/in/surinderpalkuaur', hierBM:{name:'Dawn Reed',initials:'D',color:'var(--green)',role:'BSB Broker Mgr · Gold'}, hierMD:{name:'Poonam Dutta',initials:'P',color:'var(--blue)',role:'Managing Director'}, splitLine:'Surinder 60% → Poonam (override 10%) → Dawn (BM override 5%) → Crossfield 25%', bio:'Surinder joined Crossfield in 2024 after six years as an independent life and annuity producer in the Bay Area. Works primarily with South-Asian families on multi-generational planning — IUL, whole life, and survivorship structures.', tags:['#multigenerational','#IUL','#Punjabi-speaking','#bay-area'], kpis:{active:4,placed:5,comm:48000,ratio:'71%',cycle:'38d',faceTot:'$1.8M',placedLifetime:11}, carriers:[ {name:'National Life (NLG)',badge:'NLG',cls:'cb-nlg',active:true,rate:'Yr1 rate 115%',apptd:'apptd Aug 2024',cases:2}, {name:'Symetra',badge:'Sym',cls:'cb-sym',active:true,rate:'Yr1 rate 105%',apptd:'apptd Sep 2024',cases:1}, {name:'North American',badge:'NA',cls:'cb-na',active:true,rate:'Yr1 rate 110%',apptd:'apptd Jan 2025',cases:1}, {name:'Prudential',badge:'Pru',cls:'',active:false,note:'not appointed'}, {name:'Lincoln Financial',badge:'LFG',cls:'',active:false,note:'not appointed'}, {name:'Pacific Life',badge:'PL',cls:'',active:false,inprogress:true,note:'Contracting in progress · JIT',warn:'3 of 5 forms returned'}, {name:'Mutual of Omaha',badge:'MoO',cls:'',active:false,note:'not appointed'}, {name:'F&G Life',badge:'F&G',cls:'',active:false,note:'not appointed'} ], activeCases:[ {client:'Karandeep Singh',dob:'DOB 06/12/1978 · IUL',policy:'LS2218801',carrier:'NLG',stage:'UW Review',days:11,stuck:true,face:750000,prem:8400,status:'APS pending'}, {client:'Manpreet Gill',dob:'DOB 03/22/1985',policy:'SYM-99102',carrier:'Symetra',stage:'Underwriting',days:5,face:500000,prem:2100,status:'On track'}, {client:'Ravi Sharma',dob:'DOB 11/08/1972',policy:'NA-71238',carrier:'North Am',stage:'Medical Exam',days:3,face:300000,prem:6800,status:'ExamOne scheduled'}, {client:'Priya Anand',dob:'DOB 09/14/1990',policy:'LS2218899',carrier:'NLG',stage:'Application',days:2,face:250000,prem:3600,status:'Drafting'} ], closedCases:[ {client:'Harpreet Bains',policy:'LS2104411',carrier:'NLG',outcome:'Placed · Pref NT',issued:'Mar 18, 26',face:1000000,prem:11200,comm:12880,cycle:34}, {client:'Amrit Kaur',policy:'SYM-94402',carrier:'Symetra',outcome:'Placed · Std',issued:'Feb 28, 26',face:500000,prem:4800,comm:5040,cycle:28}, {client:'Dilip Mehta',policy:'LS2102204',carrier:'NLG',outcome:'Placed · Pref',issued:'Feb 14, 26',face:750000,prem:7200,comm:8280,cycle:41}, {client:'Simrat Chahal',policy:'NA-68812',carrier:'North Am',outcome:'Placed · Std NT',issued:'Jan 30, 26',face:400000,prem:3400,comm:3740,cycle:52}, {client:'Rajinder Brar',policy:'LS2098801',carrier:'NLG',outcome:'Placed · Std',issued:'Jan 12, 26',face:600000,prem:5400,comm:6210,cycle:38}, {client:'Navdeep Sandhu',policy:'LS2089912',carrier:'NLG',outcome:'Declined · BP',issued:'Dec 22, 25',face:500000,prem:0,comm:0,cycle:61}, {client:'Kiran Dhillon',policy:'SYM-91108',carrier:'Symetra',outcome:'Placed · Std',issued:'Nov 14, 25',face:300000,prem:2800,comm:2940,cycle:31}, {client:'Tejinder Aulakh',policy:'LS2071108',carrier:'NLG',outcome:'NTO · expired',issued:'Oct 02, 25',face:1500000,prem:0,comm:0,cycle:null} ], activity:[ {date:'May 09',icon:'📋',text:'New case opened — Priya Anand · NLG IUL · $250k'}, {date:'May 07',icon:'📞',text:'Sales call logged — Karandeep Singh · 32min · attribution: Surinder 100%'}, {date:'May 04',icon:'✓',text:'Placed — Harpreet Bains · $1.0M Pref NT · commission $12,880 (released)'}, {date:'Apr 28',icon:'🎓',text:'Completed CE — Annuity Suitability · 4hrs · CA'}, {date:'Apr 21',icon:'🏅',text:'Tier review — held at Silver · next review Aug 2026'} ], comp:{split:'60% writing · 25% Crossfield · 10% MD (Poonam) · 5% BM (Dawn)',gross:48090,paidAgent:28854,poonamOverride:4809,dawnOverride:2405,pending:22400,chargebacks:1820}, licenses:[ {state:'California',resident:true,num:'OK-4429812',loa:'Life · A&H · Annuity',issued:'Mar 2018',renews:'Mar 2027',ce:'24/24 hrs',ceStatus:'ok'}, {state:'Texas',num:'TX-2918804',loa:'Life · Annuity',issued:'Jul 2022',renews:'Jul 2026',ce:'24/24 hrs',ceStatus:'ok'}, {state:'Arizona',num:'AZ-1100278',loa:'Life',issued:'Sep 2023',renews:'Sep 2026',ce:'18/24 hrs',ceStatus:'warn'}, {state:'Nevada',num:'NV-779120',loa:'Life',issued:'Feb 2024',renews:'Feb 2026 expired',ce:'× lapse',ceStatus:'lapse'} ] } }; } function showAgentFullProfile(name){ initAgentProfiles(); var a = AGENT_PROFILES[name]; if(!a){ // Build generic profile var agRow = AGENTS_DATA.find(function(x){return x.name===name;})||{}; a = {tier:agRow.tier||'Silver',initials:name[0],color:'var(--gold)',colorText:'var(--navy)', role:agRow.tier==='Platinum'?'Owner':(agRow.tier==='Gold'?'Sr Agent':'Agent'),active:true, meta:'Agent · Crossfield Strategic Partners', email:name.split(' ')[0].toLowerCase()+'@crossfield.partners', npn:'—',languages:'English',bio:'Click Edit profile to add bio.',tags:[], kpis:{active:agRow.active||0,placed:agRow.placedYTD||0,comm:agRow.ytdComm||0,ratio:'—',cycle:'—',faceTot:'—',placedLifetime:agRow.placedYTD||0}, carriers:[ {name:'National Life (NLG)',badge:'NLG',cls:'cb-nlg',active:true,rate:'Yr1 rate 105%',apptd:'apptd 2022',cases:agRow.active||0}, {name:'Symetra',badge:'Sym',cls:'cb-sym',active:/symetra/i.test(agRow.carriers||''),rate:'Yr1 rate 100%',apptd:'apptd 2022',cases:0}, {name:'North American',badge:'NA',cls:'cb-na',active:false,note:'not appointed'}, {name:'Prudential',badge:'Pru',cls:'',active:false,note:'not appointed'} ], activity:[{date:'—',icon:'📋',text:'No recent activity logged'}], comp:{split:'60% writing · 25% Crossfield',gross:agRow.ytdComm||0,paidAgent:Math.round((agRow.ytdComm||0)*0.6),pending:0,chargebacks:0}, licenses:[{state:'California',num:'—',loa:'Life',issued:'—',renews:'—',ce:'—',ceStatus:'ok'}] }; } // Show section document.querySelectorAll('.section, .ap-wrap').forEach(function(el){el.classList.remove('on');}); document.getElementById('s-agentprofile').classList.add('on'); document.querySelectorAll('.sb-item').forEach(function(el){el.classList.remove('on');}); document.getElementById('sb-agents').classList.add('on'); document.getElementById('main').scrollTop=0; var tierCls = a.tier==='Platinum'?'tier-platinum':a.tier==='Gold'?'tier-gold':'tier-silver'; document.getElementById('ap-breadcrumb-name').textContent = name; document.getElementById('ap-name-hdr').innerHTML = esc(name)+' '+esc(a.tier)+'● Active'; document.getElementById('ap-meta').textContent = a.meta||''; document.getElementById('ap-photo').textContent = a.initials||name[0]; document.getElementById('ap-photo').style.background = a.color||'var(--gold)'; document.getElementById('ap-photo').style.color = a.colorText||'var(--navy)'; document.getElementById('ap-name-sm').textContent = name; document.getElementById('ap-role-sm').textContent = a.role||''; document.getElementById('ap-linkedin').textContent = 'in '+(a.linkedin||'linkedin.com/in/—'); document.getElementById('ap-fields').innerHTML = [ {l:'Email',v:esc(a.email||'—')}, {l:'Direct line',v:esc(a.phone||'—')}, {l:'Cell',v:esc(a.cell||'—')}, {l:'Calendar',v:''+esc(a.calendar||'—')+''}, {l:'Address',v:esc(a.address||'—')}, {l:'NPN',v:esc(a.npn||'—')}, {l:'Languages',v:esc(a.languages||'English')} ].map(function(f){return '
'+f.l+''+f.v+'
';}).join(''); var hierHTML=''; if(a.hierBM) hierHTML+='
Broker Manager
'+esc(a.hierBM.initials)+'
'+esc(a.hierBM.name)+'
'+esc(a.hierBM.role)+'
'; if(a.hierMD) hierHTML+='
Direct Manager (MD)
'+esc(a.hierMD.initials)+'
'+esc(a.hierMD.name)+'
'+esc(a.hierMD.role)+'
'; hierHTML+='
Agent · Viewing
'+esc(a.initials||name[0])+'
'+esc(name)+'
'+esc(a.tier)+' · Writing
'; document.getElementById('ap-hierarchy').innerHTML = hierHTML; document.getElementById('ap-split-line').textContent = 'Comp split flows up: '+(a.splitLine||''); document.getElementById('ap-bio').innerHTML = a.bio||''; document.getElementById('ap-tags').innerHTML = (a.tags||[]).map(function(t){return ''+esc(t)+'';}).join(''); var slug = name.toLowerCase().replace(/\s+/g,'-').replace(/[^a-z0-9-]/g,''); document.getElementById('ap-landing-info').innerHTML = '
URL slugcrossfield.partners/agents/'+slug+'
'+ '
Status● Published
'+ '
Last editedToday
'+ ''; var k=a.kpis||{}; document.getElementById('ap-kpis').innerHTML = [ {l:'Active Cases',v:k.active||0,sub:(k.faceTot||'—')+' total face'}, {l:'Placed YTD',v:k.placed||0,sub:'2026 · '+(k.placedLifetime||0)+' lifetime'}, {l:'YTD Commissions',v:'$'+Math.round((k.comm||0)/1000)+'k',sub:'CF split: $'+Math.round((k.comm||0)*0.25/1000)+'k'}, {l:'Placement Ratio',v:k.ratio||'—',sub:'vs 68% '+a.tier+' avg'}, {l:'Avg Cycle Time',v:k.cycle||'—',sub:'subm → issue'} ].map(function(kp){return '
'+kp.l+'
'+esc(String(kp.v))+'
'+kp.sub+'
';}).join(''); document.getElementById('ap-carriers').innerHTML = (a.carriers||[]).map(function(c){ var cardCls = c.active?'active':c.inprogress?'inprogress':''; return '
'+ '
'+((c.active||c.inprogress)?'✓':'')+'
'+ ''+esc(c.name)+'
'+ (c.active?'
'+esc(c.rate)+'
✓ '+esc(c.apptd)+' · '+c.cases+' case'+(c.cases!==1?'s':'')+'
':'')+ (c.inprogress?'
⚠ '+esc(c.note||'')+'
'+(c.warn?'
'+esc(c.warn)+'
':''):'') + (!c.active&&!c.inprogress?'
'+esc(c.note||'')+'
+ Start contracting →
':'') + '
'; }).join(''); var activeCases = a.activeCases || CASES.filter(function(x){return x.agent&&name.toLowerCase().includes(x.agent.toLowerCase());}); document.getElementById('ap-active-count').textContent = activeCases.length; document.getElementById('ap-pipeline-tbody').innerHTML = activeCases.map(function(c){ var days = c.days||c.daysInStage||0; var stuckStyle = (c.stuck||(days>10)) ? 'color:var(--red);font-weight:700' : ''; return ''+ '
'+esc(c.client)+'
'+esc(c.dob||'')+'
'+ ''+esc(c.policy||'—')+''+ ''+carrierBadge(c.carrier)+''+ ''+esc(c.stage||c.insStage||'—')+''+ ''+days+'d'+(c.stuck?' ⚠':'')+''+ ''+fmt$(c.face||0)+''+ ''+fmt$(c.prem||c.annual||0)+''+ ''+esc(c.status||c.nextAction||'—')+''+ ''; }).join('') || 'No active cases'; var closed = a.closedCases||[]; document.getElementById('ap-closed-count').textContent = closed.length; document.getElementById('ap-closed-tbody').innerHTML = closed.map(function(c){ var isPlaced = /placed|pref/i.test(c.outcome); var isNeg = /declined|nto|expired/i.test(c.outcome); var outColor = isPlaced?'var(--green)':isNeg?'var(--amber)':'var(--t2)'; return ''+ ''+esc(c.client)+''+ ''+esc(c.policy)+''+ ''+carrierBadge(c.carrier)+''+ ''+(isPlaced?'✓ ':isNeg?'✗ ':'')+esc(c.outcome)+''+ ''+esc(c.issued)+''+ ''+fmt$(c.face)+''+ ''+(c.prem?fmt$(c.prem):'—')+''+ ''+(c.comm?''+fmt$(c.comm)+'':'—')+''+ ''+(c.cycle?c.cycle+'d':'—')+''+ ''; }).join('') || 'No closed cases'; document.getElementById('ap-activity').innerHTML = (a.activity||[]).map(function(r){ return '
'+esc(r.date)+'
'+r.icon+'
'+r.text+'
'; }).join(''); var cp = a.comp||{}; var compRows=[{l:'Default split',v:esc(cp.split||'—')},{l:'YTD gross commission',v:''+fmtFull$(cp.gross||0)+''},{l:'YTD paid to agent (60%)',v:''+fmtFull$(cp.paidAgent||0)+''}]; if(cp.poonamOverride) compRows.push({l:'Poonam override YTD',v:fmtFull$(cp.poonamOverride)}); if(cp.dawnOverride) compRows.push({l:'Dawn BM override YTD',v:fmtFull$(cp.dawnOverride)}); compRows.push({l:'Pending (in-pipeline est.)',v:fmtFull$(cp.pending||0)}); compRows.push({l:'Chargebacks (12mo)',v:cp.chargebacks>0?'-'+fmtFull$(cp.chargebacks)+'':'$0'}); document.getElementById('ap-comp').innerHTML = compRows.map(function(r){return '
'+r.l+''+r.v+'
';}).join('')+ ''; document.getElementById('ap-licensing-tbody').innerHTML = (a.licenses||[]).map(function(lic){ var ceHtml=lic.ceStatus==='ok'?'✓ '+esc(lic.ce)+'':lic.ceStatus==='warn'?'⚠ '+esc(lic.ce)+'':''+esc(lic.ce)+''; var btnHtml=lic.ceStatus==='ok'?'':lic.ceStatus==='warn'?'':''; return ''+ ''+esc(lic.state)+(lic.resident?' (resident)':'')+''+ ''+esc(lic.num)+''+ ''+esc(lic.loa)+''+ ''+esc(lic.issued)+''+ ''+esc(lic.renews)+''+ ''+ceHtml+''+ ''+btnHtml+''+ ''; }).join(''); }