Meeting Conflict Detection Tool

Meeting Conflict Detection Tool

Add New Meeting

Entered Meetings

  • No meetings added yet.

Input meetings on the first tab and click "Detect Conflicts & View Report".

`; } reportHTML += `

Non-Conflicting Meetings

`; const nonConflictingMeetings = mcdtMeetings.filter(m => !meetingsInvolvedInConflict.has(m.id)); if (nonConflictingMeetings.length > 0) { reportHTML += `
    `; nonConflictingMeetings.sort((a,b) => a.startDateTime - b.startDateTime).forEach(m => { reportHTML += `
  • ${mcdtFormatMeetingForDisplay(m)}
  • `; }); reportHTML += `
`; } else if (conflictGroups.length > 0 && meetingsInvolvedInConflict.size === mcdtMeetings.length) { // All meetings are in some conflict reportHTML += `

All entered meetings are involved in conflicts.

`; } else if (conflictGroups.length === 0 && mcdtMeetings.length > 0) { // This case is handled by "No conflicts detected" above. } else { reportHTML += `

No meetings to list or all were involved in conflicts.

`; } reportHTML += `
`; document.getElementById('mcdt-conflict-report-display').innerHTML = reportHTML; mcdtOpenTab(null, 'mcdt-report'); mcdtUpdateNavButtons(); } // PDF Download function mcdtDownloadPDF() { const reportDisplayElement = document.getElementById('mcdt-conflict-report-display'); if (!reportDisplayElement || reportDisplayElement.innerHTML.includes("Input meetings on the first tab")) { alert("Please detect conflicts first before downloading the report."); return; } let pdfHTML = `

Meeting Conflict Report

`; pdfHTML += `

All Entered Meetings (${mcdtMeetings.length})

`; if (mcdtMeetings.length > 0) { pdfHTML += ``; const sortedAllMeetings = [...mcdtMeetings].sort((a,b) => a.startDateTime - b.startDateTime); sortedAllMeetings.forEach(m => { pdfHTML += ``; }); pdfHTML += `
NameDateStart TimeEnd Time
${m.name}${m.date}${m.startTime}${m.endTime}
`; } else { pdfHTML += "

No meetings were entered.

"; } // Add the generated conflict report (which contains conflict groups and non-conflicting sections) pdfHTML += reportDisplayElement.innerHTML; const pdfContainer = document.getElementById('mcdt-report-content-for-pdf'); if(!pdfContainer) return; pdfContainer.innerHTML = pdfHTML; const opt = { margin: [0.5, 0.4, 0.5, 0.4], filename: 'Meeting_Conflict_Report.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true, logging: false }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }, pagebreak: { mode: ['avoid-all', 'css', 'legacy'] } }; html2pdf().from(pdfContainer).set(opt).save().then(() => { pdfContainer.innerHTML = ''; }).catch(err => { console.error("Error generating PDF:", err); pdfContainer.innerHTML = ''; alert("An error occurred while generating the PDF. Check console for details."); }); }
Scroll to Top