Government Contract Compliance Checker
Assess your readiness for U.S. federal government contracting requirements.
Enter Contract Information
$
Answer the Following Compliance Questions
Compliance Status Report
Disclaimer: This tool is for informational purposes only and does not constitute legal advice. Consult with a qualified professional for specific compliance guidance.
No non-compliant items were identified. You have marked ${compliantCount} item(s) as compliant. Please ensure all 'Not Applicable' items are correctly assessed.
`; } summaryDiv.innerHTML = summaryText; } // Download PDF functionality function downloadPdf() { const { jsPDF } = window.jspdf; const doc = new jsPDF(); const contractNumber = document.getElementById('contractNumber').value || 'N/A'; const contractingAgency = document.getElementById('contractingAgency').value || 'N/A'; const summaryTitle = document.querySelector('#report-summary h3').textContent; const summaryText = document.querySelector('#report-summary p').textContent; // Add Title and Contract Info doc.setFontSize(18); doc.text("Government Contract Compliance Report", 14, 22); doc.setFontSize(11); doc.setTextColor(100); doc.text(`Contract/Solicitation #: ${contractNumber}`, 14, 32); doc.text(`Agency: ${contractingAgency}`, 14, 38); // Add Summary doc.setFontSize(12); doc.setFont(undefined, 'bold'); doc.setTextColor(summaryTitle === 'Action Required' ? '#dc2626' : '#16a34a'); doc.text(summaryTitle, 14, 50); doc.setFont(undefined, 'normal'); doc.setTextColor(100); const splitSummary = doc.splitTextToSize(summaryText, 180); doc.text(splitSummary, 14, 56); // Use autoTable for professional-looking tables doc.autoTable({ html: '#report-table', startY: 80, theme: 'grid', headStyles: { fillColor: [241, 245, 249], textColor: [51, 65, 85] }, // Slate-100, Slate-700 styles: { cellPadding: 3, fontSize: 9 }, didParseCell: function (data) { const cellElement = data.cell.raw; if (data.column.dataKey === 'Status' && cellElement) { if (cellElement.classList.contains('status-compliant')) data.cell.styles.textColor = [22, 163, 74]; if (cellElement.classList.contains('status-non-compliant')) data.cell.styles.textColor = [220, 38, 38]; if (cellElement.classList.contains('status-na')) data.cell.styles.textColor = [100, 116, 139]; } } }); // Add footer with disclaimer const pageCount = doc.internal.getNumberOfPages(); for(let i = 1; i <= pageCount; i++) { doc.setPage(i); doc.setFontSize(8); doc.setTextColor(150); doc.text('Disclaimer: This tool is for informational purposes only and does not constitute legal advice.', 14, doc.internal.pageSize.height - 10); } doc.save('Gov_Contract_Compliance_Report.pdf'); } // --- EVENT LISTENERS --- tabs.forEach((tab, index) => tab.addEventListener('click', () => switchTab(index))); nextBtn.addEventListener('click', () => currentTab < tabs.length - 1 && switchTab(currentTab + 1)); prevBtn.addEventListener('click', () => currentTab > 0 && switchTab(currentTab - 1)); document.getElementById('downloadPdfBtn').addEventListener('click', downloadPdf); // --- INITIALIZATION --- createChecklist(); updateTabs(); });