TBP PropPilot AI
Signed Out

Sign In to TBP PropPilot AI

Authorized domain: www.thebluepapaya.com.

Buyer Leads
0 HOT priority
0
Seller Inventory
Direct Owner / Builder
0
Agent Inventory
Zero-Leakage Co-Broke
0
AI Deal Matches
Cross-Agent Engine
0
Showing all records
').includes('<script>');const checks=[{title:'1. Production Domain & Branding',detail:'Bound to '+PRODUCTION_DOMAIN+' (TBP PropPilot AI).'},{title:'2. Zero-Leakage Co-Broke Masking',detail:'Partner phone masked ('+maskedSample+') & stripped from White-Label Brochures.'},{title:'3. External Link & XSS Firewall',detail:'Malicious URI injection blocked ('+(safeUrlBlocked?'VERIFIED':'WARN')+') & HTML escaped ('+(xssEscaped?'VERIFIED':'WARN')+').'},{title:'4. Multi-Tenant Role Isolation',detail:'Active Role: '+currentSession.role+' • Isolated Tenant: '+currentSession.tenantId+'.'},{title:'5. SLA & 45-Day Lease Radar',detail:'24h/72h inactivity SLA & 45-day rental lease expiry trackers verified.'},{title:'6. 2-Way MySQL & State Integrity',detail:appState.leads.length+' Leads & '+appState.inventory.length+' Properties synced cleanly.'}];grid.innerHTML=checks.map(c=>'
'+c.title+'PASS

'+c.detail+'

').join('');panel.classList.remove('hidden');} function openLoginSwitchModal(){document.getElementById('login-switch-modal').classList.remove('hidden');} function loginAsUser(userId){const u=appState.teamUsers.find(x=>x.id===userId);if(!u)return;currentSession={isAuthenticated:true,role:u.role,viewMode:u.role==='SUPER_ADMIN'?'MASTER':'TENANT',tenantId:u.tenantId==='MASTER'?'TENANT-01':u.tenantId,email:u.email,name:u.name};closeModal('login-switch-modal');applyRoleAndTenantUiState();} function handleInlineScreenLogin(e){e.preventDefault();const email=document.getElementById('gate-email-input').value.trim().toLowerCase(),pass=document.getElementById('gate-pass-input').value.trim(),u=appState.teamUsers.find(x=>x.email.toLowerCase()===email&&x.password===pass);if(u){document.getElementById('gate-login-err').classList.add('hidden');loginAsUser(u.id);}else document.getElementById('gate-login-err').classList.remove('hidden');} function handleUnifiedEmailLogin(e){e.preventDefault();const email=document.getElementById('login-email-input').value.trim().toLowerCase(),pass=document.getElementById('login-pass-input').value.trim(),u=appState.teamUsers.find(x=>x.email.toLowerCase()===email&&x.password===pass);if(u)loginAsUser(u.id);} function logoutSession(){currentSession.isAuthenticated=false;applyRoleAndTenantUiState();} function openProvisionTenantModal(){document.getElementById('provision-tenant-modal').classList.remove('hidden');} function provisionNewClientTenant(e){e.preventDefault();const companyName=document.getElementById('new-tenant-company').value.trim(),adminName=document.getElementById('new-tenant-admin-name').value.trim(),adminEmail=document.getElementById('new-tenant-admin-email').value.trim(),days=Number(document.getElementById('new-tenant-days').value)||90,seats=Number(document.getElementById('new-tenant-seats').value)||10,tid='TENANT-'+String(appState.tenants.length+1).padStart(2,'0');appState.tenants.push({tenantId:tid,companyName,adminName,adminEmail,maxTeamSize:seats,activeDaysRemaining:days,expiryDate:daysFromTodayIso(days),roundRobinEnabled:true,roundRobinCursor:0,status:'ACTIVE'});appState.teamUsers.push({id:'USR-'+Date.now(),tenantId:tid,name:adminName,email:adminEmail,phone:'+91 98100 00000',role:'ADMIN',title:'Company Admin',password:'1234'});savePersistentState();closeModal('provision-tenant-modal');applyRoleAndTenantUiState();} function closeModal(id){document.getElementById(id)?.classList.add('hidden');} function startFpsMonitor(){let frames=0,lastTime=performance.now();const pill=document.getElementById('fps-counter-pill');function tick(now){frames++;if(now-lastTime>=500){const fps=Math.min(60,Math.round((frames*1000)/(now-lastTime)));if(pill){pill.textContent=fps+' FPS';pill.className=fps>=50?'mono px-2 py-1 rounded-lg bg-emerald-50 border border-emerald-200 text-emerald-700 text-[10px] font-bold':'mono px-2 py-1 rounded-lg bg-amber-50 border border-amber-300 text-amber-800 text-[10px] font-bold';}frames=0;lastTime=now;}requestAnimationFrame(tick);}requestAnimationFrame(tick);} window.addEventListener('resize',()=>{if(dataLayoutMode==='cards')applyFiltersAndRender();}); document.addEventListener('DOMContentLoaded',()=>{applyRoleAndTenantUiState();startFpsMonitor();lucide.createIcons();});