Public Records Act Exemption Log

Public Records Act Exemption Log

Public Records Act Exemption Log

Document and track exemptions cited for formal Public Records Requests (based on US state law, e.g., CA Government Code).

Request & Exemption Tracking

This log summarizes all record requests, showing the exemption cited and the current status. Use the filters below to refine the list, and update the status directly within the table.

ID / Date Subject / Description Exemption Cited Status Notes

Generated on ${pra_formatDate(new Date().toISOString().split('T')[0])} (Showing current filtered view)

ID / Date Subject / Description Exemption Cited Status Notes
`; // Render data into the clone's content area const contentTableBody = pra_pdfRenderClone.querySelector('#pra-pdf-log-table-body'); pra_renderDashboard(contentTableBody, true); } /** * Generates and downloads a PDF of the log */ async function pra_downloadPDF() { if (pra_data.log.length === 0) { alert("The log is empty. Please add entries before downloading."); return; } if (typeof jspdf === 'undefined' || typeof html2canvas === 'undefined') { console.error("PRA Tool Error: jsPDF or html2canvas library not loaded."); alert("Error: PDF libraries failed to load. Please check console."); return; } pra_renderPdfClone(); // Create and populate the clone const { jsPDF } = window.jspdf; try { const canvas = await html2canvas(pra_pdfRenderClone, { scale: 1.5, useCORS: true }); const imgData = canvas.toDataURL('image/png'); const imgProps = pdf.getImageProperties(imgData); const pdf = new jsPDF({ orientation: 'l', unit: 'pt', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const margin = 40; const contentWidth = pdfWidth - (margin * 2); const contentHeight = (contentWidth * imgProps.height) / imgProps.width; let heightLeft = contentHeight; let position = 0; pdf.addImage(imgData, 'PNG', margin, position + margin, contentWidth, contentHeight); heightLeft -= (pdfHeight - margin * 2); while (heightLeft > 0) { position -= (pdfHeight - margin * 2); pdf.addPage(); pdf.addImage(imgData, 'PNG', margin, position + margin, contentWidth, contentHeight); heightLeft -= (pdfHeight - margin * 2); } pdf.save('PRA_Exemption_Log.pdf'); } catch (error) { console.error("PRA Tool Error: PDF generation failed.", error); alert("An error occurred while generating the PDF. Please try again."); } } // --- EVENT LISTENERS --- // Tab link clicks pra_tabLinks.forEach((link, index) => { link.addEventListener('click', () => pra_switchTab(index)); }); // Next/Prev button clicks if (pra_prevButton) { pra_prevButton.addEventListener('click', () => { if (pra_currentTab > 0) pra_switchTab(pra_currentTab - 1); }); } if (pra_nextButton) { pra_nextButton.addEventListener('click', () => { if (pra_currentTab === pra_tabLinks.length - 1) { pra_updateDataFromConfig(); pra_switchTab(0); } else { if (pra_currentTab < pra_tabLinks.length - 1) pra_switchTab(pra_currentTab + 1); } }); } // PDF download if (pra_downloadPdfButton) { pra_downloadPdfButton.addEventListener('click', pra_downloadPDF); } // --- Dashboard Filters --- if (pra_filterExemption) { pra_filterExemption.addEventListener('change', pra_updateFilters); } if (pra_search) { pra_search.addEventListener('input', pra_updateFilters); } // --- Config Tab Listeners --- if (pra_addLogButton) { pra_addLogButton.addEventListener('click', () => { pra_logContainer.appendChild(pra_createLogInput()); }); } if (pra_configTab) { // Handle remove pra_configTab.addEventListener('click', (e) => { const removeButton = e.target.closest('.pra-remove-item'); if (removeButton) { const entryDiv = removeButton.closest('.border[data-id]'); const idToRemove = parseInt(entryDiv.getAttribute('data-id')); pra_data.log = pra_data.log.filter(s => s.id !== idToRemove); entryDiv.remove(); if(pra_logContainer.children.length === 0){ pra_logContainer.appendChild(pra_createLogInput()); } } }); } // --- INITIALIZATION --- pra_initSampleData(); pra_renderConfig(); pra_populateFilterOptions(); pra_renderDashboard(); // Set initial tab state pra_tabPanes.forEach((pane, index) => { pane.classList.toggle('hidden', index !== 0); pane.classList.toggle('pra-active', index === 0); }); pra_tabLinks.forEach((link, index) => { TAB_CLASSES.active.forEach(cls => link.classList.remove(cls)); TAB_CLASSES.inactive.forEach(cls => link.classList.remove(cls)); if (index === 0) { TAB_CLASSES.active.forEach(cls => link.classList.add(cls)); } else { TAB_CLASSES.inactive.forEach(cls => link.classList.add(cls)); } }); });
Scroll to Top