MERGE_TEST_BUG_FIXES
This commit is contained in:
commit
dda2e21629
@ -1997,7 +1997,8 @@ class EmployeeMultiEventServiceController extends BaseController
|
|||||||
$endorsement = function ($data, $file, $row) use ($insurer) {
|
$endorsement = function ($data, $file, $row) use ($insurer) {
|
||||||
|
|
||||||
$group_key = rand(100000, 999999);
|
$group_key = rand(100000, 999999);
|
||||||
$row[4] = change_date_format($row[4], 'd-M-Y', 'Y-m-d'); // date of exit from excel
|
// Multi-event sheets often send Y-m-d; standalone deletion uses d-M-Y. Auto-detect both.
|
||||||
|
$row[4] = change_date_format($row[4], null, 'Y-m-d'); // date of exit from excel
|
||||||
// Kint::dump($row[4]);
|
// Kint::dump($row[4]);
|
||||||
// check if insurer configured with add one day for deletion
|
// check if insurer configured with add one day for deletion
|
||||||
// if($insurer['deletion_add_day'] == true)
|
// if($insurer['deletion_add_day'] == true)
|
||||||
|
|||||||
@ -227,6 +227,7 @@ class MasterController extends AdminController
|
|||||||
'Date of Exit' => 'dateofexit',
|
'Date of Exit' => 'dateofexit',
|
||||||
'Reason for Exit' => 'reasonforexit',
|
'Reason for Exit' => 'reasonforexit',
|
||||||
'Status' => 'status',
|
'Status' => 'status',
|
||||||
|
'Claim Status' => 'claimstatus',
|
||||||
'Old Basic Cover SI' => 'old_basic_cover_si',
|
'Old Basic Cover SI' => 'old_basic_cover_si',
|
||||||
'Old SI Premium' => 'old_si_premium',
|
'Old SI Premium' => 'old_si_premium',
|
||||||
'New Basic Cover SI' => 'new_basic_cover_si',
|
'New Basic Cover SI' => 'new_basic_cover_si',
|
||||||
|
|||||||
@ -830,6 +830,7 @@ class VidalApiController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
log_message('error', "VIDAL - TPA ID Pull | called for policy_no: {$policyNo} , client_policy_id: {$client_policy_id}");
|
log_message('error', "VIDAL - TPA ID Pull | called for policy_no: {$policyNo} , client_policy_id: {$client_policy_id}");
|
||||||
|
log_message('error', "VIDAL - TPA ID Pull | Api Headers and Body ".json_encode(['url' => $url, 'method' => $method, 'headers' => $headers]));
|
||||||
|
|
||||||
// Fetch file download dates
|
// Fetch file download dates
|
||||||
$batchFiles = $this->db->table('batch_files f')
|
$batchFiles = $this->db->table('batch_files f')
|
||||||
@ -910,11 +911,13 @@ class VidalApiController extends BaseController
|
|||||||
|
|
||||||
$fetchedCount = count($data['dependents']);
|
$fetchedCount = count($data['dependents']);
|
||||||
log_message('error', "VIDAL - TPA ID Pull | Fetched {$fetchedCount} records ");
|
log_message('error', "VIDAL - TPA ID Pull | Fetched {$fetchedCount} records ");
|
||||||
|
// log_message('error', "VIDAL - TPA ID Pull | Response Data ".json_encode($response));
|
||||||
$allBenef = array_merge($allBenef, $data['dependents']);
|
$allBenef = array_merge($allBenef, $data['dependents']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// dd($allBenef );
|
|
||||||
|
// log_message('error', "VIDAL - TPA ID Pull | All Benef Data ".json_encode($allBenef));
|
||||||
|
|
||||||
//save API data as JSON for analysis
|
//save API data as JSON for analysis
|
||||||
$json = json_encode($allBenef, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
$json = json_encode($allBenef, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||||
|
|||||||
@ -435,6 +435,14 @@ class EmployeePolicyModel extends Model
|
|||||||
and is_active = 1
|
and is_active = 1
|
||||||
limit 1
|
limit 1
|
||||||
) as self_employee_id',
|
) as self_employee_id',
|
||||||
|
'(
|
||||||
|
select name from employees
|
||||||
|
where emp_code = emp.emp_code
|
||||||
|
and client_id = emp.client_id
|
||||||
|
and lower(relationship) = "self"
|
||||||
|
and is_active = 1
|
||||||
|
limit 1
|
||||||
|
) as self_name',
|
||||||
$ecard_download_link
|
$ecard_download_link
|
||||||
])
|
])
|
||||||
->join('employees emp', 'employee_polices.employee_id = emp.id')
|
->join('employees emp', 'employee_polices.employee_id = emp.id')
|
||||||
|
|||||||
@ -369,7 +369,9 @@ $fl_col_width_px = nhance_dt_column_widths_px($fl_header_labels, $fl_col_max_len
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('#title_header_name').html(title);
|
$('#title_header_name').html(title);
|
||||||
|
destroyEmpUploadListDataTable();
|
||||||
$('#emp_data_success').html(res.data);
|
$('#emp_data_success').html(res.data);
|
||||||
|
initEmpUploadListDataTable();
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
@ -385,6 +387,82 @@ $fl_col_width_px = nhance_dt_column_widths_px($fl_header_labels, $fl_col_max_len
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function destroyEmpUploadListDataTable() {
|
||||||
|
if ($.fn.DataTable && $.fn.DataTable.isDataTable('#tech-companies-1')) {
|
||||||
|
$('#tech-companies-1').DataTable().clear().destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initEmpUploadListDataTable() {
|
||||||
|
var $table = $('#tech-companies-1');
|
||||||
|
if (!$table.length || !$.fn.DataTable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
destroyEmpUploadListDataTable();
|
||||||
|
|
||||||
|
if (typeof nhanceListDataTableBeforeInit === 'function') {
|
||||||
|
nhanceListDataTableBeforeInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
var dtOptions = {
|
||||||
|
ordering: true,
|
||||||
|
searching: true,
|
||||||
|
paging: true,
|
||||||
|
pageLength: 10,
|
||||||
|
order: [[0, 'asc']],
|
||||||
|
autoWidth: false,
|
||||||
|
scrollX: false,
|
||||||
|
scrollY: false,
|
||||||
|
scrollCollapse: false,
|
||||||
|
sScrollX: '',
|
||||||
|
sScrollY: '',
|
||||||
|
sScrollXInner: '',
|
||||||
|
bScrollCollapse: false,
|
||||||
|
responsive: false,
|
||||||
|
language: {
|
||||||
|
paginate: {
|
||||||
|
first: 'First',
|
||||||
|
last: 'Last',
|
||||||
|
next: 'Next',
|
||||||
|
previous: 'Previous'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var empUploadTable = typeof nhanceMergeListDataTableOptions === 'function'
|
||||||
|
? $table.DataTable(nhanceMergeListDataTableOptions(dtOptions))
|
||||||
|
: $table.DataTable(dtOptions);
|
||||||
|
|
||||||
|
if (typeof nhanceListDataTableAfterInit === 'function') {
|
||||||
|
nhanceListDataTableAfterInit();
|
||||||
|
}
|
||||||
|
if (typeof nhanceListDataTableBindAdjust === 'function') {
|
||||||
|
nhanceListDataTableBindAdjust(empUploadTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modal is often still animating when HTML is injected — re-measure after shown
|
||||||
|
$('#full-width-modal-emp-list')
|
||||||
|
.off('shown.bs.modal.empUploadList')
|
||||||
|
.on('shown.bs.modal.empUploadList', function () {
|
||||||
|
if ($.fn.DataTable.isDataTable('#tech-companies-1')) {
|
||||||
|
$('#tech-companies-1').DataTable().columns.adjust();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
if ($.fn.DataTable.isDataTable('#tech-companies-1')) {
|
||||||
|
$('#tech-companies-1').DataTable().columns.adjust();
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#full-width-modal-emp-list').on('hidden.bs.modal', function () {
|
||||||
|
destroyEmpUploadListDataTable();
|
||||||
|
$('#emp_data_success').empty();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$('body').on('click', '.upload_button', function() {
|
$('body').on('click', '.upload_button', function() {
|
||||||
|
|
||||||
$('#uploadForm')[0].reset();
|
$('#uploadForm')[0].reset();
|
||||||
|
|||||||
@ -1,28 +1,53 @@
|
|||||||
<style>
|
<style>
|
||||||
.table th,
|
#full-width-modal-emp-list .emp-upload-list-scroll {
|
||||||
.table td {
|
overflow-x: auto !important;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keep a single scroll surface (header + body together); override list-page rules that hide outer overflow */
|
||||||
|
#full-width-modal-emp-list .emp-upload-list-scroll.table-responsive,
|
||||||
|
#full-width-modal-emp-list .emp-upload-list-scroll.table-responsive.nh-dt-no-outer-scroll,
|
||||||
|
#full-width-modal-emp-list .emp-upload-list-scroll.table-responsive:has(.dataTables_wrapper) {
|
||||||
|
overflow-x: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#full-width-modal-emp-list #tech-companies-1_wrapper {
|
||||||
|
overflow-x: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#full-width-modal-emp-list #tech-companies-1 {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#full-width-modal-emp-list #tech-companies-1 th,
|
||||||
|
#full-width-modal-emp-list #tech-companies-1 td {
|
||||||
|
white-space: nowrap;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.dataTable tbody td {
|
#full-width-modal-emp-list table.dataTable tbody td {
|
||||||
padding: 4px 4px !important;
|
padding: 4px 8px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<div class="table-responsive emp-upload-list-scroll">
|
||||||
<div class="responsive-table-plugin">
|
<table data-custom-table-css="table" id="tech-companies-1" class="table table-striped nowrap w-100">
|
||||||
<div class="table-rep-plugin">
|
|
||||||
<div class="table-responsive" data-pattern="priority-columns">
|
|
||||||
<table data-custom-table-css="table" id="tech-companies-1" class="table table-striped">
|
|
||||||
|
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
|
<tr>
|
||||||
<?php foreach ($thead as $header): ?>
|
<?php foreach ($thead as $header): ?>
|
||||||
<th><?php echo $header; ?></th>
|
<th><?php echo esc($header); ?></th>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody class="font-12">
|
<tbody class="font-12">
|
||||||
<?php helper('excel_util_helper'); foreach ($tbody as $body) { if(check_row_is_empty_or_null($body)){break;} ?>
|
<?php
|
||||||
|
helper('excel_util_helper');
|
||||||
|
foreach ($tbody as $body) {
|
||||||
|
if (check_row_is_empty_or_null($body)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<?php foreach ($body as $data) { ?>
|
<?php foreach ($body as $data) { ?>
|
||||||
<td><?= esc($data) ?></td>
|
<td><?= esc($data) ?></td>
|
||||||
@ -31,40 +56,4 @@ table.dataTable tbody td {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- end .table-responsive -->
|
</div>
|
||||||
|
|
||||||
</div> <!-- end .table-rep-plugin-->
|
|
||||||
</div> <!-- end .responsive-table-plugin-->
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$('#tech-companies-1').DataTable({
|
|
||||||
// Enable sorting
|
|
||||||
"ordering": true,
|
|
||||||
|
|
||||||
// Enable filtering/search
|
|
||||||
"searching": true,
|
|
||||||
|
|
||||||
// Enable pagination
|
|
||||||
"paging": true,
|
|
||||||
|
|
||||||
// Set the number of records per page
|
|
||||||
"pageLength": 10, // Adjust as needed
|
|
||||||
|
|
||||||
// Define the initial sorting order (optional)
|
|
||||||
"order": [[ 0, "asc" ]], // Sort by the first column in ascending order
|
|
||||||
|
|
||||||
// Customization for the pagination buttons (optional)
|
|
||||||
"language": {
|
|
||||||
"paginate": {
|
|
||||||
"first": "First",
|
|
||||||
"last": "Last",
|
|
||||||
"next": "Next",
|
|
||||||
"previous": "Previous"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user