Sales & CRM
Manage leads, IFAs, and grow your business
0
Total Leads
£0
Pipeline Value
0%
Conversion Rate
0
Hot Leads
0
Active IFAs
£0
Won (YTD)
New
£0
0
Contacted
£0
0
Meeting
£0
0
Proposal
£0
0
Won
£0
0
All Leads
Lead Trust Type Est. Value Source Stage Assigned To Last Activity
IFA & Introducer Partners
Firm Primary Contact Referrals Conversion Total Value Commission Rate
IFA Performance
Quick Actions
Activity Timeline
Upcoming Tasks
Activity Stats (This Week)
0
Calls
0
Emails
0
Meetings
0
Notes
📨
Introduction Letter
Initial outreach letter for new prospects
📋
IFA Partnership Agreement
Commission and referral terms contract
📖
Service Brochure
Overview of trust services and fees
💰
Fee Schedule
Detailed pricing for all services
🎁
New Client Welcome Pack
Onboarding documents for new clients
📄
Proposal Template
Customizable client proposal
`); win.document.close(); win.print(); } function copyDocument() { const content = document.getElementById('doc-content').innerText; navigator.clipboard.writeText(content).then(() => { showToast('Document copied to clipboard'); }); } // ============================================ // UTILITIES // ============================================ function showTab(tabId) { document.querySelectorAll('.tab').forEach(t => t.classList.remove('active')); document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active')); event.target.classList.add('active'); document.getElementById(`tab-${tabId}`).classList.add('active'); } function openModal(id) { document.getElementById(`modal-${id}`).classList.add('open'); // Reset form if opening fresh if (id === 'lead' && !document.getElementById('lead-id').value) { document.getElementById('lead-modal-title').textContent = 'Add New Lead'; document.getElementById('delete-lead-btn').style.display = 'none'; } if (id === 'ifa' && !document.getElementById('ifa-id').value) { document.getElementById('ifa-modal-title').textContent = 'Add IFA Partner'; document.getElementById('delete-ifa-btn').style.display = 'none'; document.getElementById('ifa-id').value = ''; document.getElementById('ifa-firm').value = ''; document.getElementById('ifa-contact').value = ''; document.getElementById('ifa-title').value = ''; document.getElementById('ifa-email').value = ''; document.getElementById('ifa-phone').value = ''; document.getElementById('ifa-location').value = ''; document.getElementById('ifa-fca').value = ''; document.getElementById('ifa-commission-initial').value = '0.30'; document.getElementById('ifa-commission-trail').value = '0.10'; document.getElementById('ifa-notes').value = ''; } if (id === 'activity') { document.getElementById('activity-date').value = new Date().toISOString().split('T')[0]; } } function closeModal(id) { document.getElementById(`modal-${id}`).classList.remove('open'); } function showToast(message, type = 'success') { const toast = document.getElementById('toast'); toast.textContent = message; toast.className = `toast show ${type}`; setTimeout(() => toast.classList.remove('show'), 3000); } function formatDate(dateStr) { const date = new Date(dateStr); const now = new Date(); const diff = Math.floor((now - date) / (1000 * 60 * 60 * 24)); if (diff === 0) return 'Today'; if (diff === 1) return 'Yesterday'; if (diff < 7) return `${diff} days ago`; return date.toLocaleDateString('en-GB', { day: 'numeric', month: 'short' }); } function isThisWeek(dateStr) { const date = new Date(dateStr); const now = new Date(); const weekAgo = new Date(now - 7 * 24 * 60 * 60 * 1000); return date >= weekAgo; } function exportData(type) { let data, filename; if (type === 'ifas') { data = loadData('ifas'); filename = 'ifa_partners.json'; } else if (type === 'commissions') { const ifas = loadData('ifas'); const leads = loadData('leads'); data = ifas.map(ifa => { const won = leads.filter(l => l.ifa === ifa.firm && l.stage === 'won'); const totalValue = won.reduce((sum, l) => sum + l.value, 0); return { firm: ifa.firm, contact: ifa.contact, referrals: leads.filter(l => l.ifa === ifa.firm).length, conversions: won.length, totalValue, initialCommission: totalValue * (ifa.commissionInitial / 100), trailCommission: totalValue * (ifa.commissionTrail / 100) }; }); filename = 'commission_report.json'; } const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); showToast('Export downloaded'); } function generateDocument(type) { showToast('Feature coming soon'); } // ============================================ // INITIALIZE // ============================================ document.addEventListener('DOMContentLoaded', () => { initializeData(); renderAll(); });
← Home