Work Agenda Prioritizer

Work Agenda Prioritizer

Add Agenda Item/Task

Current Agenda Items

  • No items added yet.

Prioritization Strategy

Prioritized Work Agenda

  1. Input items and click "Prioritize My Agenda" on the first tab.

${strategyAppliedInfo}

`; // Add All Input Items Table pdfHTML += `

All Input Agenda Items (${wapAgendaItems.length})

`; if (wapAgendaItems.length > 0) { pdfHTML += ``; // Use original, unsorted list for this section or a consistently sorted one like by name const sortedInputItems = [...wapAgendaItems].sort((a,b) => a.name.localeCompare(b.name)); sortedInputItems.forEach(item => { let dueDateDisplay = item.dueDate ? new Date(item.dueDate + "T00:00:00").toLocaleDateString() : "N/A"; pdfHTML += ``; }); pdfHTML += `
NameImportanceUrgencyDue DateEffort
${item.name}${item.importance}${item.urgency}${dueDateDisplay}${item.effort}
`; } else { pdfHTML += "

No items were entered.

"; } // Add Prioritized List pdfHTML += `

Prioritized List

    ${prioritizedListElement.innerHTML}
`; const pdfContainer = document.getElementById('wap-report-content-for-pdf'); if(!pdfContainer) return; pdfContainer.innerHTML = pdfHTML; // Apply specific PDF list item styles for priority colors correctly pdfContainer.querySelectorAll('.wap-prioritized-list li').forEach(li => { if (li.classList.contains('prio-High')) { li.style.borderLeftColor = 'var(--priority-high-text)'; li.style.backgroundColor = 'var(--priority-high-bg)'; } else if (li.classList.contains('prio-Medium')) { li.style.borderLeftColor = 'var(--priority-medium-text)'; li.style.backgroundColor = 'var(--priority-medium-bg)'; } else if (li.classList.contains('prio-Low')) { li.style.borderLeftColor = 'var(--priority-low-text)'; li.style.backgroundColor = 'var(--priority-low-bg)'; } }); const opt = { margin: [0.6, 0.5, 0.6, 0.5], filename: 'Prioritized_Work_Agenda.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