Office Hour Efficiency Enhancer
Session Details
Key Goals for this Session (Max 5)
Work Block Planning
Session Plan
Key Goals:
Work/Break Schedule:
Plan your session on Tab 1 first.
Interruption Logger
Logged Interruptions:
- No interruptions logged yet.
Session Review Summary
Goal Completion Status:
Interruptions During Session:
Reflection
Time: ${oheeSessionData.startTime} - ${oheeSessionData.endTime}
`; pdfHTML += `Planned Cycle: ${oheeSessionData.workDuration} min work / ${oheeSessionData.breakDuration} min break
`; pdfHTML += `Key Goals & Status
- `;
if (oheeGoals.length > 0) {
oheeGoals.forEach(goal => {
pdfHTML += `
- ${goal.text} - Status: ${goal.completed ? 'Completed' : 'Not Completed'} `; }); } else { pdfHTML += `
- No goals were set. `; } pdfHTML += `
Planned Work/Break Schedule
- `; // Add class for PDF styling
oheeSessionData.workBreakBlocks.forEach(block => {
pdfHTML += `
- ${oheeFormatTimeSimple(block.start)} - ${oheeFormatTimeSimple(block.end)}: ${block.type} `; }); pdfHTML += `
Interruptions Logged (${oheeInterruptions.length})
- `;
if (oheeInterruptions.length > 0) {
oheeInterruptions.forEach(inter => {
pdfHTML += `
- [${oheeFormatTimeSimple(inter.timestamp)}] ${inter.type} ${inter.note ? `- ${inter.note}` : ''} `; }); } else { pdfHTML += `
- No interruptions were logged. `; } pdfHTML += `
Reflection
`; pdfHTML += `What went well: ${document.getElementById('ohee-reflection-well').value || "N/A"}
`; pdfHTML += `What to improve: ${document.getElementById('ohee-reflection-improve').value || "N/A"}
`; pdfHTML += `Productivity Rating: ${document.getElementById('ohee-productivity-rating').value}/5
`; const pdfContainer = document.getElementById('ohee-report-content-for-pdf'); pdfContainer.innerHTML = pdfHTML; const opt = { margin: [0.6, 0.5, 0.6, 0.5], filename: `OfficeHour_Report_${oheeSessionData.date}.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."); }); }