FIX_LIVE_ISSUE
This commit is contained in:
parent
2a8e532f15
commit
21290ff2a8
@ -1997,7 +1997,8 @@ class EmployeeMultiEventServiceController extends BaseController
|
||||
$endorsement = function ($data, $file, $row) use ($insurer) {
|
||||
|
||||
$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]);
|
||||
// check if insurer configured with add one day for deletion
|
||||
// if($insurer['deletion_add_day'] == true)
|
||||
|
||||
@ -227,6 +227,7 @@ class MasterController extends AdminController
|
||||
'Date of Exit' => 'dateofexit',
|
||||
'Reason for Exit' => 'reasonforexit',
|
||||
'Status' => 'status',
|
||||
'Claim Status' => 'claimstatus',
|
||||
'Old Basic Cover SI' => 'old_basic_cover_si',
|
||||
'Old SI Premium' => 'old_si_premium',
|
||||
'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 | Api Headers and Body ".json_encode(['url' => $url, 'method' => $method, 'headers' => $headers]));
|
||||
|
||||
// Fetch file download dates
|
||||
$batchFiles = $this->db->table('batch_files f')
|
||||
@ -910,11 +911,13 @@ class VidalApiController extends BaseController
|
||||
|
||||
$fetchedCount = count($data['dependents']);
|
||||
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']);
|
||||
|
||||
}
|
||||
|
||||
// dd($allBenef );
|
||||
|
||||
// log_message('error', "VIDAL - TPA ID Pull | All Benef Data ".json_encode($allBenef));
|
||||
|
||||
//save API data as JSON for analysis
|
||||
$json = json_encode($allBenef, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
|
||||
@ -435,6 +435,14 @@ class EmployeePolicyModel extends Model
|
||||
and is_active = 1
|
||||
limit 1
|
||||
) 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
|
||||
])
|
||||
->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);
|
||||
destroyEmpUploadListDataTable();
|
||||
$('#emp_data_success').html(res.data);
|
||||
initEmpUploadListDataTable();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
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() {
|
||||
|
||||
$('#uploadForm')[0].reset();
|
||||
|
||||
@ -1,70 +1,59 @@
|
||||
<style>
|
||||
.table th,
|
||||
.table td {
|
||||
#full-width-modal-emp-list .emp-upload-list-scroll {
|
||||
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;
|
||||
}
|
||||
|
||||
table.dataTable tbody td {
|
||||
padding: 4px 4px !important;
|
||||
#full-width-modal-emp-list table.dataTable tbody td {
|
||||
padding: 4px 8px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="responsive-table-plugin">
|
||||
<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">
|
||||
<?php foreach ($thead as $header): ?>
|
||||
<th><?php echo $header; ?></th>
|
||||
<?php endforeach; ?>
|
||||
</thead>
|
||||
|
||||
<tbody class="font-12">
|
||||
<?php helper('excel_util_helper'); foreach ($tbody as $body) { if(check_row_is_empty_or_null($body)){break;} ?>
|
||||
<tr>
|
||||
<?php foreach ($body as $data){ ?>
|
||||
<td><?= esc($data) ?></td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<div class="table-responsive emp-upload-list-scroll">
|
||||
<table data-custom-table-css="table" id="tech-companies-1" class="table table-striped nowrap w-100">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<?php foreach ($thead as $header): ?>
|
||||
<th><?php echo esc($header); ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="font-12">
|
||||
<?php
|
||||
helper('excel_util_helper');
|
||||
foreach ($tbody as $body) {
|
||||
if (check_row_is_empty_or_null($body)) {
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<?php foreach ($body as $data) { ?>
|
||||
<td><?= esc($data) ?></td>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end .table-responsive -->
|
||||
|
||||
</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>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user