FEAT_EMP_HISTORY_VIEW : RV
This commit is contained in:
parent
7378df0dde
commit
b878550c5d
@ -156,6 +156,8 @@ $routes->group("/employee", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->get("test-rack-rate", "EmployeeController::testRackRate");
|
||||
$routes->post("test-rack-rate", "EmployeeController::testRackRate");
|
||||
$routes->get('test_members_list', 'EmployeeController::test_members_list');
|
||||
$routes->post('get_emp_history','EmployeeController::getEmpHistory');
|
||||
|
||||
});
|
||||
|
||||
$routes->group("/master", ["filter" => "authMVC"], function ($routes) {
|
||||
|
||||
@ -25,6 +25,9 @@ use App\Models\InsurerExcelExportTemplateModel;
|
||||
use App\Models\InsurerModel;
|
||||
use App\Models\ClientDepositModel;
|
||||
use App\Models\PolicyPremium2Model;
|
||||
use App\Models\AuditHistoryModel;
|
||||
use App\Models\UserModel;
|
||||
|
||||
|
||||
|
||||
use App\Controllers\Jobs;
|
||||
@ -64,6 +67,9 @@ class EmployeeController extends AdminController
|
||||
protected $insurerModel;
|
||||
protected $cashDepositModel;
|
||||
protected $PolicyPremium2Model;
|
||||
protected $auditHistory;
|
||||
protected $userModel;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -84,6 +90,8 @@ class EmployeeController extends AdminController
|
||||
$this->insurerModel = new InsurerModel();
|
||||
$this->cashDepositModel = new ClientDepositModel();
|
||||
$this->PolicyPremium2Model = new PolicyPremium2Model();
|
||||
$this->auditHistory = new AuditHistoryModel();
|
||||
$this->userModel = new userModel();
|
||||
}
|
||||
|
||||
public function list()
|
||||
@ -2654,4 +2662,55 @@ class EmployeeController extends AdminController
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getEmpHistory(){
|
||||
|
||||
$emp_id = $this->request->getPost('emp_id');
|
||||
|
||||
$data['emp_history'] = $this->auditHistory->select('field_name,old_value,new_value,created_by,created_at')->where('pk',$emp_id)->where('table_name','employees')->orderBy('created_at', 'DESC')->findAll();
|
||||
|
||||
foreach ($data['emp_history'] as &$emp_history) {
|
||||
$emp_history['field_name'] = $this->formatFieldName($emp_history['field_name']);
|
||||
$user = $emp_history['created_by'];
|
||||
|
||||
if ($user != null && $user != '') {
|
||||
$userData = $this->userModel->select('first_name, last_name')->where('id', $user)->where('is_active', 1)->first();
|
||||
if ($userData) {
|
||||
$emp_history['created_by'] = ucwords($userData['first_name'] . ' ' . $userData['last_name']);
|
||||
} else {
|
||||
$emp_history['created_by'] = '-';
|
||||
}
|
||||
} else {
|
||||
$emp_history['created_by'] = '-';
|
||||
}
|
||||
|
||||
|
||||
$emp_history['created_at'] = date("d-m-Y H:i:s", strtotime($emp_history['created_at']));
|
||||
}
|
||||
|
||||
unset($emp_history);
|
||||
|
||||
$emp_pol_pk = $this->employeePolicyModel->select('id')->where('employee_id',$emp_id)->first()['id'];
|
||||
$data['emp_pol_history'] = $this->auditHistory->select('field_name,old_value,new_value,created_by,created_at')->where('pk',$emp_pol_pk)->where('table_name','employee_polices')->findAll();
|
||||
|
||||
return $this->respond(['status' => true, 'data' => $data],200);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function formatFieldName($unformattedString){
|
||||
|
||||
if (str_contains($unformattedString, '_')) {
|
||||
$data = str_replace('_', ' ', $unformattedString);
|
||||
}else{
|
||||
$data = $unformattedString;
|
||||
}
|
||||
|
||||
$format = ucwords($data);
|
||||
|
||||
return $format;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.dataTables_filter{
|
||||
.dataTables_filter {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@ -43,7 +43,6 @@
|
||||
background-color: #f0f0f0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
@ -114,9 +113,11 @@
|
||||
<th class="font-weight-medium">Policy status</th>
|
||||
<th class="font-weight-medium">(₹)Sum Insured</th>
|
||||
<th class="font-weight-medium">(₹)Premium</th>
|
||||
<th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">(₹)Pro Rata <br> Premium</th>
|
||||
<th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">(₹)GST</th>
|
||||
<th class="font-weight-medium" > Action </th>
|
||||
<th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">
|
||||
(₹)Pro Rata <br> Premium</th>
|
||||
<th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">(₹)GST
|
||||
</th>
|
||||
<th class="font-weight-medium"> Action </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -131,7 +132,8 @@
|
||||
|
||||
<?php if (isset($getData)) {
|
||||
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
|
||||
<td><?php echo $employee['client_short_name'] . ' - ' . $employee['client_branch_name']; ?></td>
|
||||
<td><?php echo $employee['client_short_name'] . ' - ' . $employee['client_branch_name']; ?>
|
||||
</td>
|
||||
<?php }
|
||||
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
|
||||
<td><?php echo $employee['client_branch_name']; ?></td>
|
||||
@ -142,7 +144,8 @@
|
||||
<td><?php echo $employee['relationship']; ?></td>
|
||||
<td><?php echo $employee['gender']; ?></td>
|
||||
<td><?php echo date('d/m/Y', strtotime($employee['dob'])); ?></td>
|
||||
<td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : ''; ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : ''; ?></td>
|
||||
<td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : ''; ?> -
|
||||
<?php echo isset($employee['policy_no']) ? $employee['policy_no'] : ''; ?></td>
|
||||
<td><?php echo $employee['insurer_short_name']; ?></td>
|
||||
<td><?php echo $employee['tpa_id']; ?></td>
|
||||
<td><?php echo $employee['uhid']; ?></td>
|
||||
@ -172,11 +175,15 @@
|
||||
</td>
|
||||
<td><?php echo format_indian_number($employee['basic_cover_si']); ?></td>
|
||||
<td><?php echo format_indian_number($employee['premium']); ?></td>
|
||||
<td><?php $pro_rata_total += $employee['rata_premimum']; echo format_indian_number($employee['rata_premimum']); ?></td>
|
||||
<td><?php $gst_total += $employee['gst']; echo format_indian_number($employee['gst']); ?></td>
|
||||
<td><?php $pro_rata_total += $employee['rata_premimum']; echo format_indian_number($employee['rata_premimum']); ?>
|
||||
</td>
|
||||
<td><?php $gst_total += $employee['gst']; echo format_indian_number($employee['gst']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<a href="javascript: void(0);"
|
||||
class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"
|
||||
aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
|
||||
<?php
|
||||
@ -185,17 +192,28 @@
|
||||
(in_array($employee['emp_status'], ['draft', 'enrolled', 'active']) && in_array($employee['status'], ['draft', 'enrolled', 'active']))
|
||||
) {
|
||||
?>
|
||||
<a class="dropdown-item" onclick="get_emp_master_data_for_update(this, '<?= $employee['employee_id'];?>', '<?= $employee['status'];?>')" ><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<!-- <a class="dropdown-item" onclick="get_emp_history(this, '<?= $employee['employee_id'];?>')" > <i class="mdi mdi-history mr-2 text-muted font-18 vertical-middle"></i>Employee History</a> -->
|
||||
<a class="dropdown-item"
|
||||
onclick="get_emp_master_data_for_update(this, '<?= $employee['employee_id'];?>', '<?= $employee['status'];?>')"><i
|
||||
class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item"
|
||||
onclick="get_emp_history(this, '<?= $employee['employee_id'];?>')"> <i
|
||||
class="mdi mdi-history mr-2 text-muted font-18 vertical-middle"></i>Employee
|
||||
History</a>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if(in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
|
||||
<a href="<?= base_url('download-e-card/'). $employee['rand_string'] ?>" class="dropdown-item" target="_blank"><i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View E-Card</a>
|
||||
<a href="<?= base_url('download-e-card/'). $employee['rand_string'] ?>"
|
||||
class="dropdown-item" target="_blank"><i
|
||||
class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View
|
||||
E-Card</a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($employee['relationship'] == 'Self' && in_array($employee['policy_type_id'], [2,3,4,5]) && $employee['email_corporate'] != '' && $employee['emp_status'] == 'active' && $employee['status'] == 'active' && !empty($employee['tpa_id'])) { ?>
|
||||
<a class="dropdown-item" onclick="send_mail_for_individual_employee_ecard('<?= $employee['id'];?>')" ><i class="mdi mdi-email-alert mr-2 text-muted font-18 vertical-middle"></i>Send E-Card Mail</a>
|
||||
<a class="dropdown-item"
|
||||
onclick="send_mail_for_individual_employee_ecard('<?= $employee['id'];?>')"><i
|
||||
class="mdi mdi-email-alert mr-2 text-muted font-18 vertical-middle"></i>Send
|
||||
E-Card Mail</a>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
@ -240,7 +258,8 @@
|
||||
|
||||
<!-- modal content -->
|
||||
|
||||
<div id="emp_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div id="emp_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
|
||||
style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -249,15 +268,17 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-4">
|
||||
<form role="form" class="parsley-examples" id="empForm" onsubmit="update_emp_master_data_submit_function(event, this)" enctype="multipart/form-data">
|
||||
<form role="form" class="parsley-examples" id="empForm"
|
||||
onsubmit="update_emp_master_data_submit_function(event, this)" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="employee_primary_id" id="employee_primary_id"/>
|
||||
<input type="hidden" name="employee_primary_id" id="employee_primary_id" />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="emp_code">Employee Code<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="emp_code_for_edit" placeholder="Enter Code" readonly>
|
||||
<input type="text" class="form-control" id="emp_code_for_edit" placeholder="Enter Code"
|
||||
readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-8">
|
||||
@ -278,24 +299,30 @@
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="dob">Date of Birth<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="dob" placeholder="Enter DOB" name="dob" required>
|
||||
<input type="text" class="form-control" id="dob" placeholder="Enter DOB" name="dob"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="email">Email<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="email_corporate" placeholder="Enter Email" name="email_corporate" data-parsley-trigger="change" data-parsley-type="email" onchange="validateInput(this, 'employees', 'email_corporate')" required>
|
||||
<input type="text" class="form-control" id="email_corporate" placeholder="Enter Email"
|
||||
name="email_corporate" data-parsley-trigger="change" data-parsley-type="email"
|
||||
onchange="validateInput(this, 'employees', 'email_corporate')" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="mobile">Mobile Number<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mobile" placeholder="Enter Mobile Number" name="mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" minlength="10" onchange="validateInput(this, 'employees', 'mobile')" required>
|
||||
<input type="text" class="form-control" id="mobile" placeholder="Enter Mobile Number"
|
||||
name="mobile" onkeypress="return onlyNumbers(event)" maxlength="10" minlength="10"
|
||||
onchange="validateInput(this, 'employees', 'mobile')" required>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button>
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
|
||||
id="btnSubmit">Submit</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@ -305,22 +332,22 @@
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<!-- Modal content for Emp History -->
|
||||
<div class="modal fade" id="emp_history_modal" tabindex="-1" aria-labelledby="emp_history_modal_label" aria-hidden="true">
|
||||
<div class="modal fade" id="emp_history_modal" tabindex="-1" aria-labelledby="emp_history_modal_label"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="emp_history_modal_label">Employee History</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div id = "emp_history_content"></div>
|
||||
<div id="emp_history_content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function() {
|
||||
|
||||
var dob = flatpickr("#dob", {
|
||||
dateFormat: "d/m/Y",
|
||||
@ -328,9 +355,9 @@
|
||||
yearSelector: true, // Ensures year can be selected manually
|
||||
});
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function() {
|
||||
var ticketsTable = $('#tickets-table');
|
||||
|
||||
if (ticketsTable.length) {
|
||||
@ -343,7 +370,7 @@
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Member-List',
|
||||
},{
|
||||
}, {
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
title: 'Member-List',
|
||||
@ -358,24 +385,24 @@
|
||||
} else {
|
||||
console.error("Table not found.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function get_emp_master_data_for_update(input, id){
|
||||
function get_emp_master_data_for_update(input, id) {
|
||||
|
||||
get_emp_master_data_for_update_ajax(id)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function get_emp_master_data_for_update_ajax(id){
|
||||
function get_emp_master_data_for_update_ajax(id) {
|
||||
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('util/get_emp_master_data_for_update/');?>'+id,
|
||||
url: '<?php echo base_url('util/get_emp_master_data_for_update/');?>' + id,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
|
||||
console.log('get_emp_master_data_for_update response', res)
|
||||
|
||||
@ -384,11 +411,11 @@
|
||||
|
||||
let data = res.data
|
||||
|
||||
if(res.status == true){
|
||||
if (res.status == true) {
|
||||
|
||||
if(data.relationship == 'Self'){
|
||||
if (data.relationship == 'Self') {
|
||||
$('#gender').prop('disabled', false)
|
||||
}else{
|
||||
} else {
|
||||
$('#gender').prop('disabled', true)
|
||||
}
|
||||
|
||||
@ -400,11 +427,11 @@
|
||||
$('#email_corporate').val(data.email_corporate);
|
||||
$('#mobile').val(data.mobile);
|
||||
|
||||
if(data.emp_status == "active"){
|
||||
if (data.emp_status == "active") {
|
||||
$('#name').prop('disabled', true);
|
||||
$('#gender').prop('disabled', true);
|
||||
$('#dob').prop('disabled', true);
|
||||
}else{
|
||||
} else {
|
||||
$('#name').prop('disabled', false);
|
||||
$('#gender').prop('disabled', false);
|
||||
$('#dob').prop('disabled', false);
|
||||
@ -413,7 +440,7 @@
|
||||
var myModal = new bootstrap.Modal(document.getElementById('emp_modal'));
|
||||
myModal.show();
|
||||
|
||||
}else{
|
||||
} else {
|
||||
|
||||
$('#employee_primary_id').val('');
|
||||
$('#emp_code_for_edit').val('');
|
||||
@ -430,7 +457,7 @@
|
||||
toastr.warning(res.message, 'WARNING');
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
error: function(xhr, status, error) {
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
@ -439,16 +466,16 @@
|
||||
console.error(status, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function update_emp_master_data_submit_function(event, form){
|
||||
function update_emp_master_data_submit_function(event, form) {
|
||||
|
||||
event.preventDefault(); // Prevent the default form submission
|
||||
|
||||
var isValid = $(form).parsley().validate();
|
||||
if (!isValid) {
|
||||
console.log('Form is Empty', 'Warning');
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = new FormData(form);
|
||||
@ -473,7 +500,7 @@
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
|
||||
if(response.status == true){
|
||||
if (response.status == true) {
|
||||
toastr.success(response.message, 'SUCCESS');
|
||||
|
||||
$('.close').click();
|
||||
@ -489,7 +516,7 @@
|
||||
// window.location.reload();
|
||||
fetchEmpolyeeList();
|
||||
|
||||
}else{
|
||||
} else {
|
||||
toastr.error(response.message, 'ERROR');
|
||||
}
|
||||
},
|
||||
@ -518,9 +545,9 @@
|
||||
submitButton.innerText = 'Submit';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function send_mail_for_individual_employee_ecard(id){
|
||||
function send_mail_for_individual_employee_ecard(id) {
|
||||
|
||||
Swal.fire({
|
||||
title: "Do you want to send Ecard Mail?",
|
||||
@ -537,23 +564,23 @@
|
||||
|
||||
$.ajax({
|
||||
|
||||
url: '<?php echo base_url('util/send_mail_for_individual_employee_ecard/');?>'+id,
|
||||
url: '<?php echo base_url('util/send_mail_for_individual_employee_ecard/');?>' + id,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
|
||||
console.log('send_mail_for_individual_employee_ecard response', res)
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
|
||||
if(res.status == true){
|
||||
if (res.status == true) {
|
||||
toastr.success(res.message, 'SUCCESS');
|
||||
}else{
|
||||
} else {
|
||||
toastr.error(res.message, 'ERROR');
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
error: function(xhr, status, error) {
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
@ -564,15 +591,15 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function validateInput(input, table, field){
|
||||
function validateInput(input, table, field) {
|
||||
|
||||
let value = $(input).val();
|
||||
let label = $(input).closest('.form-group').find('label').text().replace('*', '').trim();
|
||||
|
||||
let message = "Value is duplicate!";
|
||||
if(label){
|
||||
if (label) {
|
||||
message = label + " already exists!";
|
||||
}
|
||||
|
||||
@ -583,15 +610,15 @@
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function onlyNumbers(event) {
|
||||
function onlyNumbers(event) {
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
if (charcode >= 48 && charcode <= 57 || charcode == 46) return true;
|
||||
return false;
|
||||
}
|
||||
var modalInstance; // Store the modal instance globally
|
||||
}
|
||||
var modalInstance; // Store the modal instance globally
|
||||
|
||||
function showModal() {
|
||||
var myModalEl = document.getElementById('emp_history_modal');
|
||||
@ -606,7 +633,7 @@ function closeModal() {
|
||||
if (modalInstance) {
|
||||
modalInstance.hide(); // Hide the modal and its backdrop
|
||||
// Manually remove backdrop if it's still visible
|
||||
setTimeout(function () {
|
||||
setTimeout(function() {
|
||||
document.querySelector('.modal-backdrop').classList.remove('show');
|
||||
}, 150); // Wait for animation to finish
|
||||
}
|
||||
@ -614,12 +641,14 @@ function closeModal() {
|
||||
|
||||
|
||||
|
||||
function get_emp_history(input, emp_id) {
|
||||
function get_emp_history(input, emp_id) {
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
let url = '<?= base_url("employee/get_emp_history")?>';
|
||||
let requestData = { emp_id: emp_id };
|
||||
let requestData = {
|
||||
emp_id: emp_id
|
||||
};
|
||||
|
||||
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
|
||||
$('.loader').fadeOut();
|
||||
@ -696,5 +725,4 @@ function closeModal() {
|
||||
// modalInstance.hide();
|
||||
// }
|
||||
// }
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user