Legal Investigation Case Management Tool
Organize your case details, evidence, contacts, and tasks in one place.
Case Overview
Case Summary
0
Evidence Items
0
Persons of Interest
0
Incomplete Tasks
0
Overdue Tasks
Evidence Log
| ID | Description | Date Found | Custodian | Actions |
|---|
Persons of Interest
| Name | Role | Contact | Notes | Actions |
|---|
Task Management
| Task | Due Date | Assigned To | Status | Actions |
|---|
Case Report
Report generated on ${new Date().toLocaleDateString()}
`; previewHtml += 'Evidence Log
'; if (caseData.evidence.length > 0) { previewHtml += `- ${caseData.evidence.map(e => `
- #${e.id}: ${e.description} (Custodian: ${e.custodian}) `).join('')}
No evidence logged.
'; } previewHtml += 'Persons of Interest
'; if (caseData.persons.length > 0) { previewHtml += `- ${caseData.persons.map(p => `
- ${p.name} (${p.role}) `).join('')}
No persons logged.
'; } previewHtml += 'Task List
'; if (caseData.tasks.length > 0) { previewHtml += `- ${caseData.tasks.map(t => `
- ${t.task} - Due: ${t.dueDate} (Status: ${t.status}) `).join('')}
No tasks logged.
'; } document.getElementById('report-preview').innerHTML = previewHtml; }; document.getElementById('download-pdf-btn').addEventListener('click', () => { const { jsPDF } = window.jspdf; const doc = new jsPDF(); doc.setFont('helvetica', 'bold'); doc.setFontSize(18); doc.text(document.getElementById('case-name').value, 105, 20, { align: 'center' }); doc.setFontSize(12); doc.setFont('helvetica', 'normal'); doc.text(`Case Number: ${document.getElementById('case-number').value}`, 105, 27, { align: 'center' }); let yPos = 40; const addSection = (title, headers, data) => { if (yPos > 250) { doc.addPage(); yPos = 20; } doc.setFont('helvetica', 'bold'); doc.setFontSize(14); doc.text(title, 14, yPos); yPos += 8; if (data.length > 0) { doc.autoTable({ startY: yPos, head: [headers], body: data, theme: 'grid', headStyles: { fillColor: [45, 55, 72] } }); yPos = doc.autoTable.previous.finalY + 10; } else { doc.setFont('helvetica', 'normal'); doc.setFontSize(10); doc.text('No items logged in this section.', 14, yPos); yPos += 10; } }; addSection('Evidence Log', ['ID', 'Description', 'Date Found', 'Custodian'], caseData.evidence.map(e => [e.id, e.description, e.dateFound, e.custodian])); addSection('Persons of Interest', ['Name', 'Role', 'Contact', 'Notes'], caseData.persons.map(p => [p.name, p.role, p.contact, p.notes])); addSection('Task Management', ['Task', 'Due Date', 'Assigned To', 'Status'], caseData.tasks.map(t => [t.task, t.dueDate, t.assignedTo, t.status])); doc.save(`${document.getElementById('case-name').value.replace(/ /g,"_")}_Case_Report.pdf`); }); // Initial Load updateTabs(); updateDashboard(); });