From 6d17039660c2612bd34fbc85ca8e194baa8f689b Mon Sep 17 00:00:00 2001 From: aurelio-aot Date: Mon, 20 Apr 2026 15:05:42 -0700 Subject: [PATCH] AB#32709: Bugfix - Download All Is Not Working --- .../Components/ChefsAttachments/ChefsAttachments.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ChefsAttachments/ChefsAttachments.js b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ChefsAttachments/ChefsAttachments.js index 158501f49..e69751afb 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ChefsAttachments/ChefsAttachments.js +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ChefsAttachments/ChefsAttachments.js @@ -6,7 +6,7 @@ $(function () { .trigger('click'); }; - const downloadAll = $('#downloadAll'); + const downloadAll = $('#downloadSelected'); const dt = $('#ChefsAttachmentsTable'); let chefsDataTable; let selectedAtttachments = []; @@ -158,7 +158,7 @@ $(function () { function resetAttachmentSelectionState() { selectedAtttachments = []; $('.select-all-chefs-files').prop('checked', false); - $('.chkbox').prop('checked', false); + chefsDataTable.$('.chkbox').prop('checked', false); $(downloadAll).prop('disabled', true); $generateAISummariesButton.prop('disabled', true); } @@ -329,8 +329,8 @@ $(function () { chefsDataTable.on('select', function (e, dt, type, indexes) { if (indexes?.length) { indexes.forEach((index) => { - $('#row_' + index).prop('checked', true); - if ($('.chkbox:checked').length == $('.chkbox').length) { + $(chefsDataTable.row(index).node()).find('.chkbox').prop('checked', true); + if (chefsDataTable.$('.chkbox:checked').length == chefsDataTable.$('.chkbox').length) { $('.select-all-chefs-files').prop('checked', true); } selectAttachment(type, index, 'select_chefs_file'); @@ -341,8 +341,8 @@ $(function () { chefsDataTable.on('deselect', function (e, dt, type, indexes) { if (indexes?.length) { indexes.forEach((index) => { - $('#row_' + index).prop('checked', false); - if ($('.chkbox:checked').length != $('.chkbox').length) { + $(chefsDataTable.row(index).node()).find('.chkbox').prop('checked', false); + if (chefsDataTable.$('.chkbox:checked').length != chefsDataTable.$('.chkbox').length) { $('.select-all-chefs-files').prop('checked', false); } selectAttachment(type, index, 'deselect_chefs_file');