@@ -773,8 +835,17 @@ for ($i = 0; $i < $batch_col_count; $i++) {
}
const dt = $table.DataTable();
+ const $wrap = $(dt.table().container());
+ bindVariationScrollHeadSync($wrap);
dt.columns.adjust().draw(false);
bindVariationSearchIcons($table);
+
+ /* Re-measure after tab/modal becomes visible — hidden tables mis-size columns */
+ setTimeout(function () {
+ if ($table.is(':visible')) {
+ dt.columns.adjust().draw(false);
+ }
+ }, 0);
}
function adjustVariationTableByTabId(tabId) {
@@ -814,7 +885,10 @@ for ($i = 0; $i < $batch_col_count; $i++) {
$button.prop('disabled', true);
}
} else if (activeId === 'need-to-review-tab') {
- $button.text('Proceed - Need to Review');
+ $button.text(tpaNeedToReviewProceedButtonText);
+ if (!tpaNeedToReviewProceedEnabled) {
+ $button.prop('disabled', true);
+ }
} else if (activeId === 'not-in-tpa-tab') {
$button.addClass('d-none');
} else {
@@ -829,12 +903,32 @@ for ($i = 0; $i < $batch_col_count; $i++) {
const activeId = $(e.target).attr('id');
updateTPAProceedButton(activeId);
adjustVariationTableByTabId(activeId);
+ setTimeout(function () {
+ const tabToTableMap = {
+ 'not-in-nhance-tab': '#not_in_nhance_table',
+ 'not-in-tpa-tab': '#not_in_tpa_table',
+ 'need-to-review-tab': '#need_to_review_table'
+ };
+ const sel = tabToTableMap[activeId];
+ const $t = sel ? $(sel) : $();
+ if ($.fn.DataTable.isDataTable($t)) {
+ $t.DataTable().columns.adjust().draw(false);
+ }
+ }, 50);
});
$('#tpa_variation_modal').on('shown.bs.modal', function () {
showTPAVariationTabByLinkId('not-in-nhance-tab');
updateTPAProceedButton('not-in-nhance-tab');
adjustVariationTableByTabId('not-in-nhance-tab');
+ setTimeout(function () {
+ ['#not_in_nhance_table', '#not_in_tpa_table', '#need_to_review_table'].forEach(function (sel) {
+ const $t = $(sel);
+ if ($.fn.DataTable.isDataTable($t) && $t.is(':visible')) {
+ $t.DataTable().columns.adjust().draw(false);
+ }
+ });
+ }, 50);
});
$('#tpa_variation_modal').on('hidden.bs.modal', function () {
@@ -1155,6 +1249,10 @@ for ($i = 0; $i < $batch_col_count; $i++) {
} else if (activeId === 'not-in-tpa-tab') {
proceedNotInTPA();
} else if (activeId === 'need-to-review-tab') {
+ if (!tpaNeedToReviewProceedEnabled) {
+ toastr.warning('No mismatched records to proceed.', 'WARNING');
+ return;
+ }
proceedNeedToReview();
} else {
toastr.warning('Unknown tab selected.', 'WARNING');
diff --git a/app/Views/claim_files_upload.php b/app/Views/claim_files_upload.php
index 6ea03e37..c444773d 100644
--- a/app/Views/claim_files_upload.php
+++ b/app/Views/claim_files_upload.php
@@ -103,6 +103,11 @@
File List
+