Internal Communication Optimizer

Internal Communication Optimizer

Analyze your communication patterns and refine your messages for clarity and impact.

Communication Volume by Channel

Sentiment Analysis (Last 30 Days)

Could not get feedback. Please try again.

`; } finally { analyzeBtn.disabled = false; } } // --- SETTINGS UI --- function renderChannelSettings() { const container = document.getElementById('channelSettingsContainer'); container.innerHTML = channels.map((channel, index) => `
`).join(''); container.querySelectorAll('.remove-channel-btn').forEach(btn => { btn.addEventListener('click', (e) => { channels.splice(e.target.dataset.index, 1); renderChannelSettings(); }); }); } addChannelBtn.addEventListener('click', () => { channels.push(''); renderChannelSettings(); }); // --- PDF GENERATION --- async function generatePdf() { const { jsPDF } = window.jspdf; const doc = new jsPDF(); doc.text("Communication Analysis Report", 20, 20); // In a real app, you would add charts as images and more data doc.text("This is a placeholder for the full report.", 20, 40); doc.save("Communication-Report.pdf"); } // --- TAB NAVIGATION --- function switchTab(tabIndex) { currentTabIndex = tabIndex; tabsContainer.querySelectorAll('button').forEach((btn, index) => { btn.classList.toggle('tab-active', index === tabIndex); btn.classList.toggle('tab-inactive', index !== tabIndex); }); tabContents.forEach((content, index) => { content.classList.toggle('hidden', index !== tabIndex); }); updateButtonStates(); } function updateButtonStates() { prevBtn.disabled = currentTabIndex === 0; nextBtn.disabled = currentTabIndex === tabs.length - 1; prevBtn.classList.toggle('opacity-50', prevBtn.disabled); nextBtn.classList.toggle('opacity-50', nextBtn.disabled); } // --- EVENT LISTENERS --- tabsContainer.querySelectorAll('button').forEach((btn, index) => btn.addEventListener('click', () => switchTab(index))); prevBtn.addEventListener('click', () => { if (currentTabIndex > 0) switchTab(currentTabIndex - 1); }); nextBtn.addEventListener('click', () => { if (currentTabIndex < tabs.length - 1) switchTab(currentTabIndex + 1); }); saveProfileBtn.addEventListener('click', saveUserConfig); saveChannelsBtn.addEventListener('click', saveUserConfig); downloadPdfBtn.addEventListener('click', generatePdf); analyzeBtn.addEventListener('click', analyzeMessage); // --- INITIALIZATION --- initializeFirebase(); updateButtonStates(); });
Scroll to Top