Online Arbitration Platform

Online Arbitration Platform

Case Dashboard

Case Name

Not Set

Case Status

Claimant

N/A

Respondent

N/A

Arbitrator

N/A

Claim Amount

$0.00

Evidence Room

Submit New Evidence

Evidence Log

Title Submitted By Description
No evidence submitted yet.

Communication Log

Log New Communication

Communication History

No communications logged yet.

Arbitrator's Decision & Award

Case Setup & Data Configuration

Note: Initializing the case will populate all other tabs with this information.

${item.message}

- ${item.from} on ${item.date}
`).join(''); }; const generatePdf = () => { const { jsPDF } = window.jspdf; const decisionContent = document.getElementById('decisionContent'); if (!decisionContent) { console.error("Decision content for PDF not found!"); return; } // Temporarily create a printable version const printVersion = document.createElement('div'); printVersion.innerHTML = `

Arbitration Final Decision & Award

${caseData.caseName || 'N/A'}

Case Summary

Claimant: ${caseData.claimant || 'N/A'}

Respondent: ${caseData.respondent || 'N/A'}

Arbitrator: ${caseData.arbitrator || 'N/A'}

Claim Amount: ${formatCurrency(caseData.claimAmount)}

Summary of Decision

${document.getElementById('decisionSummary').value.replace(/\n/g, '
') || 'Not provided.'}

Reasoning

${document.getElementById('decisionReasoning').value.replace(/\n/g, '
') || 'Not provided.'}

Final Award

Monetary Award: ${formatCurrency(document.getElementById('awardAmount').value)}

Awarded To: ${document.getElementById('awardTo').value}

Generated on: ${new Date().toLocaleDateString('en-US')}

`; document.body.appendChild(printVersion); html2canvas(printVersion, { scale: 2 }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const canvasAspectRatio = canvas.height / canvas.width; const pdfAspectRatio = pdfHeight / pdfWidth; let finalCanvasWidth, finalCanvasHeight; if (canvasAspectRatio > pdfAspectRatio) { finalCanvasHeight = pdfHeight; finalCanvasWidth = pdfHeight / canvasAspectRatio; } else { finalCanvasWidth = pdfWidth; finalCanvasHeight = pdfWidth * canvasAspectRatio; } pdf.addImage(imgData, 'PNG', 0, 0, finalCanvasWidth, finalCanvasHeight); pdf.save(`${(caseData.caseName || 'Arbitration').replace(/ /g, '_')}_Decision.pdf`); document.body.removeChild(printVersion); }).catch(err => { console.error("PDF generation failed:", err); document.body.removeChild(printVersion); }); }; // --- Event Listeners --- tabs.forEach((tab, index) => { tab.addEventListener('click', () => showTab(index)); }); nextButton.addEventListener('click', () => { if (currentTab < tabs.length - 1) showTab(currentTab + 1); }); prevButton.addEventListener('click', () => { if (currentTab > 0) showTab(currentTab - 1); }); if (initializeCaseButton) { initializeCaseButton.addEventListener('click', initializeCase); } if (evidenceForm) { evidenceForm.addEventListener('submit', addEvidence); } if (commForm) { commForm.addEventListener('submit', addCommunication); } if(downloadPdfButton) { downloadPdfButton.addEventListener('click', generatePdf); } // --- Initial State --- showTab(4); // Start on setup tab });
Scroll to Top