Smart Meeting Duration Optimizer

Smart Meeting Duration Optimizer

Calculate the ideal meeting length based on your agenda and attendees.

Meeting Details

Optimized Meeting Plan

Your optimized meeting plan will appear here.

Configure Time Allocation Rules (in minutes)

General Timing

Time Per Agenda Item by Meeting Type

Recommended Duration for "${meetingTopic}"

${duration} minutes

Suggested Time Allocation:

    `; for (const [key, value] of Object.entries(breakdown)) { if (value > 0) { html += `
  • ${key} ${value} min
  • `; } } html += '
'; resultsContainer.innerHTML = html; downloadPdfBtn.disabled = false; } // --- CONFIGURATION MANAGEMENT --- function updateConfigInputs() { for (const key in configInputs) { configInputs[key].value = config[key]; } } function saveConfiguration() { for (const key in configInputs) { config[key] = parseInt(configInputs[key].value) || 0; } alert('Configuration saved!'); } // --- PDF GENERATION --- function generatePdf() { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-content'); const pdfTitleEl = document.getElementById('pdf-title'); if (!pdfContent || downloadPdfBtn.disabled) return; const meetingTopic = document.getElementById('meeting-topic').value || "Meeting Plan"; pdfTitleEl.textContent = `Optimized Plan for: ${meetingTopic}`; html2canvas(pdfContent, { scale: 2, useCORS: true, logging: false }) .then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const ratio = canvas.width / canvas.height; const imgHeight = (pdfWidth - 20) / ratio; pdf.addImage(imgData, 'PNG', 10, 10, pdfWidth - 20, imgHeight); pdf.save(`Meeting-Plan-${meetingTopic.replace(/ /g, '_')}.pdf`); pdfTitleEl.textContent = ''; }); } // --- EVENT LISTENERS --- function addEventListeners() { tabButtons.forEach(button => { button.addEventListener('click', () => { const tab = button.dataset.tab; tabButtons.forEach(btn => btn.classList.toggle('active', btn.dataset.tab === tab)); tabContents.forEach(content => content.classList.toggle('active', content.id.startsWith(tab))); }); }); calculateBtn.addEventListener('click', calculateDuration); saveConfigBtn.addEventListener('click', saveConfiguration); downloadPdfBtn.addEventListener('click', generatePdf); } initialize(); });
Scroll to Top