The Underworld Deal System™ Negotiator

Welcome to the Family

// 🔓 LOGIN + BETA TESTER TRACKING function unlockLogin() { const betaCode = document.getElementById('loginPassword').value.trim(); const loginError = document.getElementById('loginError'); const approvedCodes = [ "OMERTA2024", "DONACCESS", "FAMILYFIRST", "COSA2024", "CAPOENTRY", "THEOFFER", "TRIALBYFIRE", "SITDOWN2024", "LUCCHEFIRE", "THEFAMILY23", "FAMILYBUSINESS", "GAMBINO2025", "JOHNGOTTI", "MOMMAMIA25", "CAPONE32", "GENOVESE23", "JOEBANANAS", "LUCKYLUCIANO", "PAULCOSTELLONA", "THE5FAMILIES" ]; if (betaCode === "FamilyOnly") { localStorage.setItem('betaCodeUsed', 'FamilyOnly'); document.getElementById('loginScreen').classList.add('hidden'); document.getElementById('appWrapper').classList.remove('hidden'); playLoginSound(); return; } if (approvedCodes.includes(betaCode)) { localStorage.setItem('betaCodeUsed', betaCode); const usageKey = `usage_${betaCode}`; const currentCount = parseInt(localStorage.getItem(usageKey)) || 0; localStorage.setItem(usageKey, currentCount + 1); document.getElementById('loginScreen').classList.add('hidden'); document.getElementById('appWrapper').classList.remove('hidden'); playLoginSound(); } else { loginError.classList.remove('hidden'); playDeniedSound(); } } // 🔥 ADMIN DASHBOARD TOGGLE function openAdmin() { document.getElementById('adminDashboard').classList.remove('hidden'); showBetaUsageLog(); renderSavedDeals(); renderWeeklyKPIReports(); renderMonthlyKPIReports(); playAdminOpenSound(); } function closeAdmin() { document.getElementById('adminDashboard').classList.add('hidden'); } // 🧠 BETA CODE USAGE TRACKER function showBetaUsageLog() { const approvedCodes = [ "OMERTA2024", "DONACCESS", "FAMILYFIRST", "COSA2024", "CAPOENTRY", "THEOFFER", "TRIALBYFIRE", "SITDOWN2024", "LUCCHEFIRE", "THEFAMILY23", "FAMILYBUSINESS", "GAMBINO2025", "JOHNGOTTI", "MOMMAMIA25", "CAPONE32", "GENOVESE23", "JOEBANANAS", "LUCKYLUCIANO", "PAULCOSTELLONA", "THE5FAMILIES" ]; let html = "
    "; approvedCodes.forEach(code => { const count = parseInt(localStorage.getItem(`usage_${code}`)) || 0; html += `
  • ${code}: ${count} time(s)
  • `; }); html += "
"; document.getElementById('betaUsageLog').innerHTML = html; } // 📋 WEEKLY & MONTHLY KPI SNAPSHOTS function autoSaveWeeklyKPI() { const now = new Date(); const today = now.toISOString().split("T")[0]; const lastSaved = localStorage.getItem("lastWeeklyKPI") || ""; const lastDate = new Date(lastSaved); const daysPassed = Math.floor((now - lastDate) / (1000 * 60 * 60 * 24)); if (!lastSaved || daysPassed >= 7) { const report = ` ===== WEEKLY KPI REPORT (${today}) ===== ${document.getElementById('analyzedDeals')?.textContent} ${document.getElementById('savedDeals')?.textContent} ${document.getElementById('downloadedPDFs')?.textContent} Powered by The Underworld Deal System™ Negotiator. `; localStorage.setItem(`kpi_week_${today}`, report); localStorage.setItem("lastWeeklyKPI", now.toISOString()); } } function autoSaveMonthlyKPI() { const now = new Date(); const monthKey = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}`; const lastSaved = localStorage.getItem("lastMonthlyKPI") || ""; if (lastSaved !== monthKey) { const report = ` ===== MONTHLY KPI REPORT (${monthKey}) ===== ${document.getElementById('analyzedDeals')?.textContent} ${document.getElementById('savedDeals')?.textContent} ${document.getElementById('downloadedPDFs')?.textContent} Powered by The Underworld Deal System™ Negotiator. `; localStorage.setItem(`kpi_month_${monthKey}`, report); localStorage.setItem("lastMonthlyKPI", monthKey); } } // 🛠️ ADMIN DASHBOARD RENDERERS function renderSavedDeals() { const container = document.getElementById('dealHistoryContainer'); container.innerHTML = ''; const keys = Object.keys(localStorage).filter(k => k.startsWith('deal_')).sort((a, b) => b.localeCompare(a)); if (!keys.length) { container.innerHTML = "

No saved deals yet.

"; return; } keys.forEach(key => { const deal = JSON.parse(localStorage.getItem(key)); const div = document.createElement('div'); div.className = 'mb-2 p-3 bg-gray-800 rounded-lg shadow'; div.innerHTML = `

Date: ${deal.date}

Type: ${deal.dealType}

ARV: $${deal.arv}

Grade: ${deal.recommendation}

`; container.appendChild(div); }); } function renderWeeklyKPIReports() { const list = document.getElementById('weeklyKPIList'); if (!list) return; list.innerHTML = ''; const keys = Object.keys(localStorage).filter(k => k.startsWith('kpi_week_')).sort((a, b) => b.localeCompare(a)); keys.forEach(key => { const date = key.replace('kpi_week_', ''); const div = document.createElement('div'); div.className = 'p-3 bg-gray-800 rounded-lg shadow'; div.innerHTML = `

Week Of: ${date}

`; list.appendChild(div); }); } function renderMonthlyKPIReports() { const list = document.getElementById('monthlyKPIList'); if (!list) return; list.innerHTML = ''; const keys = Object.keys(localStorage).filter(k => k.startsWith('kpi_month_')).sort((a, b) => b.localeCompare(a)); keys.forEach(key => { const date = key.replace('kpi_month_', ''); const div = document.createElement('div'); div.className = 'p-3 bg-gray-800 rounded-lg shadow'; div.innerHTML = `

Month: ${date}

`; list.appendChild(div); }); } function downloadKPI(key) { const content = localStorage.getItem(key); const blob = new Blob([content], { type: 'text/plain;charset=utf-8' }); const link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = `${key}.txt`; document.body.appendChild(link); link.click(); document.body.removeChild(link); } // 📈 AUTO KPI SNAPSHOTS function autoSaveWeeklyKPI() { const now = new Date(); const today = now.toISOString().split("T")[0]; const lastSaved = localStorage.getItem("lastWeeklyKPI") || ""; const lastDate = new Date(lastSaved); const daysPassed = Math.floor((now - lastDate) / (1000 * 60 * 60 * 24)); if (!lastSaved || daysPassed >= 7) { const report = ` ===== WEEKLY KPI REPORT (${today}) ===== ${document.getElementById('analyzedDeals')?.textContent} ${document.getElementById('savedDeals')?.textContent} ${document.getElementById('downloadedPDFs')?.textContent} Powered by The Underworld Deal System™ Negotiator. `; localStorage.setItem(`kpi_week_${today}`, report); localStorage.setItem("lastWeeklyKPI", now.toISOString()); } } function autoSaveMonthlyKPI() { const now = new Date(); const monthKey = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}`; const lastSaved = localStorage.getItem("lastMonthlyKPI") || ""; if (lastSaved !== monthKey) { const report = ` ===== MONTHLY KPI REPORT (${monthKey}) ===== ${document.getElementById('analyzedDeals')?.textContent} ${document.getElementById('savedDeals')?.textContent} ${document.getElementById('downloadedPDFs')?.textContent} Powered by The Underworld Deal System™ Negotiator. `; localStorage.setItem(`kpi_month_${monthKey}`, report); localStorage.setItem("lastMonthlyKPI", monthKey); } } // 📊 RENDER KPI REPORTS + DEAL HISTORY function renderSavedDeals() { const container = document.getElementById('dealHistoryContainer'); container.innerHTML = ''; const keys = Object.keys(localStorage).filter(k => k.startsWith('deal_')).sort((a, b) => b.localeCompare(a)); if (!keys.length) { container.innerHTML = "

No saved deals yet.

"; return; } keys.forEach(key => { const deal = JSON.parse(localStorage.getItem(key)); const div = document.createElement('div'); div.className = 'mb-2 p-3 bg-gray-800 rounded-lg shadow'; div.innerHTML = `

Date: ${deal.date}

Type: ${deal.dealType}

ARV: $${deal.arv}

Grade: ${deal.recommendation}

`; container.appendChild(div); }); } function renderWeeklyKPIReports() { const list = document.getElementById('weeklyKPIList'); if (!list) return; list.innerHTML = ''; const keys = Object.keys(localStorage).filter(k => k.startsWith('kpi_week_')).sort((a, b) => b.localeCompare(a)); keys.forEach(key => { const date = key.replace('kpi_week_', ''); const div = document.createElement('div'); div.className = 'p-3 bg-gray-800 rounded-lg shadow'; div.innerHTML = `

Week Of: ${date}

`; list.appendChild(div); }); } function renderMonthlyKPIReports() { const list = document.getElementById('monthlyKPIList'); if (!list) return; list.innerHTML = ''; const keys = Object.keys(localStorage).filter(k => k.startsWith('kpi_month_')).sort((a, b) => b.localeCompare(a)); keys.forEach(key => { const date = key.replace('kpi_month_', ''); const div = document.createElement('div'); div.className = 'p-3 bg-gray-800 rounded-lg shadow'; div.innerHTML = `

Month: ${date}

`; list.appendChild(div); }); } function downloadKPI(key) { const content = localStorage.getItem(key); const blob = new Blob([content], { type: 'text/plain;charset=utf-8' }); const link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = `${key}.txt`; document.body.appendChild(link); link.click(); document.body.removeChild(link); } // 💣 FINAL GLOBAL BUTTON EXPORTS FOR SAFETY window.unlockLogin = unlockLogin; window.calculateDeal = calculateDeal; window.saveDeal = saveDeal; window.downloadPDF = downloadPDF; window.clearForm = clearForm; window.openAdmin = openAdmin; window.closeAdmin = closeAdmin; window.renderSavedDeals = renderSavedDeals; window.renderWeeklyKPIReports = renderWeeklyKPIReports; window.renderMonthlyKPIReports = renderMonthlyKPIReports; window.downloadKPI = downloadKPI;

© 2025 CJJV Real Estate Investing, LLC, The Real Estate Don® and The Underworld Deal System Negotiator™. All Rights Reserved.