Open mura1717 opened 13 hours ago
let allAssociatedReportsSelected = false;
document.querySelectorAll('.caseRecord').forEach(record => { const caseId = record.dataset.caseId; const associatedReports = document.querySelectorAll(.caseReport[data-case-id="${caseId}"]);
.caseReport[data-case-id="${caseId}"]
// Check if all associated reports for this record are selected const allReportsChecked = Array.from(associatedReports).every(report => report.checked); if (allReportsChecked) { allAssociatedReportsSelected = true; }
});
All case reports selected or single exist
let allAssociatedReportsSelected = false;
document.querySelectorAll('.caseRecord').forEach(record => { const caseId = record.dataset.caseId; const associatedReports = document.querySelectorAll(
.caseReport[data-case-id="${caseId}"]
);});