Daily Task Summary Generator

Daily Task Summary Generator


Tasks Logged for Selected Date

Overall Daily Notes/Achievements

How to Create Effective Daily Summaries

1. Be Consistent
Try to log your tasks and write your summary at the same time each day (e.g., end of the workday). This builds a habit and ensures accuracy.
2. Focus on Accomplishments
Highlight what you completed or made significant progress on. This is motivating and useful for reporting.
3. Note Blockers or Challenges
If you faced any obstacles or tasks were blocked, mention them. This helps in problem-solving for the next day.
4. Quantify When Possible
Instead of "Worked on report," try "Completed first draft of Q2 sales report (3 hours)." Adding time spent or specific outcomes makes the summary more informative.
5. Categorize Tasks
Using categories (e.g., Project Name, Meeting, Admin) helps organize your summary and track where your time is going.
6. Keep it Concise
Summaries are meant to be brief. Use bullet points or short sentences. The "Overall Daily Notes" section can be used for more reflective thoughts.
7. Plan for Tomorrow (Optional)
While this tool focuses on summarizing the current/past day, your daily summary process might also include a quick plan for the next day's priorities.
×

Add Task

Please select a date.

'; dtsgOverallNotesInput.value = ''; dtsgSummaryDisplayAreaEl.style.display = 'none'; dtsgDownloadPdfBtn.style.display = 'none'; return; } dtsgSelectedDateDisplay.textContent = dtsgFormatDisplayDate(selectedDateKey); const dayData = dtsgDailyData[selectedDateKey] || { overallNotes: "", tasks: [] }; dtsgOverallNotesInput.value = dayData.overallNotes; dtsgRenderLoggedTasks(dayData.tasks); dtsgGenerateAndDisplaySummary(); // Also generate summary for the loaded date } function dtsgRenderLoggedTasks(tasks) { dtsgLoggedTasksListEl.innerHTML = ''; if (!tasks || tasks.length === 0) { dtsgLoggedTasksListEl.innerHTML = '

No tasks logged for this day yet.

'; return; } tasks.forEach(task => { const taskEl = document.createElement('div'); taskEl.className = 'dtsg-logged-task-item'; taskEl.innerHTML = `

${task.description}

${task.hoursSpent ? `Time: ${task.hoursSpent}h | ` : ''} Status: ${task.status} ${task.category ? ` | Category: ${task.category}` : ''}

`; dtsgLoggedTasksListEl.appendChild(taskEl); }); } // --- Modal & Task CRUD --- window.dtsgOpenTaskModal = function(taskId = null) { if (!dtsgSelectedDateInput.value) { alert("Please select a date first before adding tasks."); return; } dtsgTaskForm.reset(); dtsgTaskIdInput.value = ''; const selectedDateKey = dtsgSelectedDateInput.value; const dayData = dtsgDailyData[selectedDateKey] || { tasks: [] }; if (taskId) { const task = dayData.tasks.find(t => t.id === taskId); if (task) { dtsgModalTitleEl.textContent = 'Edit Task for ' + dtsgFormatDisplayDate(selectedDateKey); dtsgTaskIdInput.value = task.id; dtsgTaskDescriptionInput.value = task.description; dtsgTaskHoursSpentInput.value = task.hoursSpent || ''; dtsgTaskStatusInput.value = task.status; dtsgTaskCategoryInput.value = task.category || ''; } } else { dtsgModalTitleEl.textContent = 'Add Task for ' + dtsgFormatDisplayDate(selectedDateKey); } dtsgTaskModalEl.style.display = 'block'; } window.dtsgCloseModal = (modalId) => { const modal = document.getElementById(modalId); if(modal) modal.style.display = 'none'; } if(dtsgTaskForm) { dtsgTaskForm.addEventListener('submit', function(e) { e.preventDefault(); const selectedDateKey = dtsgSelectedDateInput.value; if (!selectedDateKey) { alert("Error: No date selected."); return; } if (!dtsgDailyData[selectedDateKey]) { dtsgDailyData[selectedDateKey] = { overallNotes: dtsgOverallNotesInput.value || "", tasks: [] }; } const taskId = dtsgTaskIdInput.value; const taskData = { description: dtsgTaskDescriptionInput.value.trim(), hoursSpent: parseFloat(dtsgTaskHoursSpentInput.value) || 0, status: dtsgTaskStatusInput.value, category: dtsgTaskCategoryInput.value.trim() || '' }; if (!taskData.description) { alert("Task description cannot be empty."); return; } if (taskId) { // Editing const index = dtsgDailyData[selectedDateKey].tasks.findIndex(t => t.id === taskId); if (index > -1) { dtsgDailyData[selectedDateKey].tasks[index] = { ...dtsgDailyData[selectedDateKey].tasks[index], ...taskData }; } } else { // Adding new const newTask = { id: 'dtsg-task-' + Date.now(), ...taskData }; dtsgDailyData[selectedDateKey].tasks.push(newTask); } dtsgSaveDataForCurrentDate(); // Saves tasks array implicitly by modifying dtsgDailyData dtsgRenderLoggedTasks(dtsgDailyData[selectedDateKey].tasks); dtsgGenerateAndDisplaySummary(); dtsgCloseModal('dtsgTaskModal'); }); } window.dtsgDeleteTask = function(taskId) { const selectedDateKey = dtsgSelectedDateInput.value; if (!selectedDateKey || !dtsgDailyData[selectedDateKey]) return; if (confirm('Are you sure you want to delete this task?')) { dtsgDailyData[selectedDateKey].tasks = dtsgDailyData[selectedDateKey].tasks.filter(t => t.id !== taskId); dtsgSaveDataForCurrentDate(); dtsgRenderLoggedTasks(dtsgDailyData[selectedDateKey].tasks); dtsgGenerateAndDisplaySummary(); } } // --- Summary Generation --- function dtsgGenerateAndDisplaySummary() { const selectedDateKey = dtsgSelectedDateInput.value; if (!selectedDateKey) { dtsgSummaryDisplayAreaEl.style.display = 'none'; dtsgDownloadPdfBtn.style.display = 'none'; return; } const dayData = dtsgDailyData[selectedDateKey] || { overallNotes: "", tasks: [] }; dtsgSummaryDateDisplayEl.textContent = dtsgFormatDisplayDate(selectedDateKey); let summaryHTML = `

Overall Notes:

${dayData.overallNotes.replace(/\n/g, '
') || 'No overall notes for this day.'}

`; let totalHours = 0; const tasksByStatus = { "Completed": [], "In Progress": [], "Blocked": [], "Deferred": [], "Note/Other": [] }; dayData.tasks.forEach(task => { if (tasksByStatus[task.status]) { tasksByStatus[task.status].push(task); } if (task.hoursSpent) { totalHours += parseFloat(task.hoursSpent); } }); for (const status in tasksByStatus) { if (tasksByStatus[status].length > 0) { summaryHTML += `

${status}:

    `; tasksByStatus[status].forEach(task => { summaryHTML += `
  • ${task.category ? `[${task.category}] ` : ''}${task.description}${task.hoursSpent ? ` (${task.hoursSpent}h)` : ''}
  • `; }); summaryHTML += `
`; } } if(dayData.tasks.length > 0){ summaryHTML += `

Total Hours Logged: ${totalHours.toFixed(1)}h

`; } else if (!dayData.overallNotes) { summaryHTML = "

No tasks or notes logged for this day.

"; } dtsgGeneratedSummaryContentEl.innerHTML = summaryHTML; dtsgSummaryDisplayAreaEl.style.display = 'block'; dtsgDownloadPdfBtn.style.display = (dayData.tasks.length > 0 || dayData.overallNotes) ? 'block' : 'none'; } // --- PDF Export --- if(dtsgDownloadPdfBtn) { dtsgDownloadPdfBtn.addEventListener('click', function() { const selectedDateKey = dtsgSelectedDateInput.value; if (!selectedDateKey) { alert("Please select a date to generate PDF."); return; } const dayData = dtsgDailyData[selectedDateKey] || { overallNotes: "", tasks: [] }; if (!dayData.overallNotes && dayData.tasks.length === 0) { alert("No data logged for this day to export."); return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); const primaryColor = getComputedStyle(document.documentElement).getPropertyValue('--dtsg-primary-color').trim(); const secondaryColor = getComputedStyle(document.documentElement).getPropertyValue('--dtsg-secondary-color').trim(); doc.setFontSize(18); doc.setTextColor(primaryColor); doc.text(`Daily Task Summary - ${dtsgFormatDisplayDate(selectedDateKey)}`, 14, 22); let yPos = 35; doc.setFontSize(12); doc.setTextColor(secondaryColor); doc.text("Overall Notes:", 14, yPos); yPos += 7; doc.setFontSize(10); doc.setTextColor(50); const notesLines = doc.splitTextToSize(dayData.overallNotes || "None", doc.internal.pageSize.getWidth() - 28); doc.text(notesLines, 14, yPos); yPos += notesLines.length * 5 + 5; let totalHours = 0; const tasksByStatus = { "Completed": [], "In Progress": [], "Blocked": [], "Deferred": [], "Note/Other": [] }; dayData.tasks.forEach(task => { if (tasksByStatus[task.status]) tasksByStatus[task.status].push(task); if (task.hoursSpent) totalHours += parseFloat(task.hoursSpent); }); for (const status in tasksByStatus) { if (tasksByStatus[status].length > 0) { if (yPos > 260) { doc.addPage(); yPos = 20; } doc.setFontSize(12); doc.setTextColor(secondaryColor); doc.text(`${status}:`, 14, yPos); yPos += 7; const tableColumn = ["Task Description", "Category", "Hours Spent"]; const tableRows = []; tasksByStatus[status].forEach(task => { tableRows.push([ task.description, task.category || "", task.hoursSpent ? task.hoursSpent.toFixed(1) + "h" : "" ]); }); doc.autoTable({ head: [tableColumn], body: tableRows, startY: yPos, theme: 'striped', headStyles: { fillColor: primaryColor, textColor:255 }, styles: { fontSize: 9, cellPadding: 1.5 }, didDrawPage: data => { yPos = data.cursor.y + 10; } }); yPos = doc.lastAutoTable.finalY + 10; } } if (dayData.tasks.length > 0) { if (yPos > 270) { doc.addPage(); yPos = 20; } doc.setFontSize(11); doc.setTextColor(primaryColor); doc.text(`Total Hours Logged: ${totalHours.toFixed(1)}h`, 14, yPos); } doc.save(`DailySummary_${selectedDateKey}.pdf`); }); } // --- Initialization --- document.addEventListener('DOMContentLoaded', () => { const today = new Date(2025, 4, 14); // May 14, 2025 as per context dtsgSelectedDateInput.value = dtsgFormatDateKey(today); dtsgLoadData(); // Will call dtsgUpdateUIForSelectedDate if(dtsgSelectedDateInput) { dtsgSelectedDateInput.addEventListener('change', dtsgUpdateUIForSelectedDate); } const firstTabButton = document.querySelector('#dailyTaskSummaryGeneratorTool .dtsg-tab-button'); if (firstTabButton) { firstTabButton.click(); } window.addEventListener('click', function(event) { const modal = document.getElementById('dtsgTaskModal'); if (modal && event.target == modal) { dtsgCloseModal('dtsgTaskModal'); } }); });
Scroll to Top