`;
html += ``;
if(winsNotes || challengesNotes){
html += ``;
}
reportDisplayEl.innerHTML = html;
rwpmOpenTab(null, 'rwpm-meter');
}
// PDF Download
function rwpmDownloadPDF() {
if (!rwpmSessionLog.date) { // Check if session data exists
alert("Please calculate productivity first to generate a report.");
return;
}
let pdfHTML = `
`;
pdfHTML += `
`;
pdfHTML += `
Assistant Insights & Tips:
- `;
insights.forEach(insight => html += `
- ${insight} `); html += `
Your Notes:
` if(winsNotes) html += `Key Wins/Achievements:
${winsNotes.replace(/\n/g, '
')}
Challenges Faced:
${challengesNotes.replace(/\n/g, '
')}
Remote Work Productivity Report
`; pdfHTML += `Date: ${new Date(rwpmSessionLog.date+"T00:00:00").toLocaleDateString()}
`; pdfHTML += `Productivity Meter
`; pdfHTML += `${rwpmSessionLog.levelText}
Summary of Your Day:
`; pdfHTML += `Planned Hours: ${rwpmSessionLog.hoursPlanned} | Actual Hours: ${rwpmSessionLog.hoursActual}
Tasks Planned: ${rwpmSessionLog.tasksPlanned} | Tasks Completed: ${rwpmSessionLog.tasksCompleted}
Focus Level: ${rwpmSessionLog.focusLevel}/10 | Distractions: ${rwpmSessionLog.distractions} | Accomplishment: ${rwpmSessionLog.accomplishment}/5
Assistant Insights & Tips:
- `;
rwpmSessionLog.insights.forEach(insight => pdfHTML += `
- ${insight} `); pdfHTML += `
Your Notes:
` if(rwpmSessionLog.winsNotes) pdfHTML += `Key Wins/Achievements:
${rwpmSessionLog.winsNotes.replace(/\n/g, '
')}
Challenges Faced:
${rwpmSessionLog.challengesNotes.replace(/\n/g, '
')}
