FEAT_EMP_TABLE_VIA_AJAX, FIX_MAIL_TEMPLATE_IN_CLAIMS
This commit is contained in:
parent
d537185d22
commit
491f3e0010
@ -97,7 +97,7 @@ class EmployeeController extends AdminController
|
||||
|
||||
// Convert the status field to an array if it exists in the request data
|
||||
if (isset($filterData['status']) && !empty($filterData['status'])) {
|
||||
$filterData['status'] = explode(",", $filterData['status']);
|
||||
// $filterData['status'] = explode(",", $filterData['status']);
|
||||
}else{
|
||||
$filterData['status'] = [];
|
||||
}
|
||||
@ -114,6 +114,11 @@ class EmployeeController extends AdminController
|
||||
// log_message('error',json_encode($data['employees']));
|
||||
// Set getData in $data array with the processed $filterData
|
||||
$data['getData'] = $filterData;
|
||||
|
||||
// return view('employee_list',$data);
|
||||
$html = view('employee_data_list', $data);
|
||||
return $this->respond(['status' => true, 'html' => $html], 200);
|
||||
|
||||
}
|
||||
|
||||
// dd($this->employeeModel->getLastQuery());
|
||||
|
||||
@ -135,8 +135,9 @@ table.dataTable tbody td {
|
||||
|
||||
|
||||
|
||||
<?php include('employee_data_list.php');?>
|
||||
<?php // include('employee_data_list.php');?>
|
||||
|
||||
<div id="employee_table_list"></div>
|
||||
|
||||
<!-- end row -->
|
||||
<div id="loader" class="loader" style="display:none;">SPINNER</div>
|
||||
@ -502,24 +503,29 @@ function fetchEmpolyeeList(event) {
|
||||
const queryString = objectToQueryString(queryParams);
|
||||
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
|
||||
// console.log(apiURL);
|
||||
window.location.href = apiURL;
|
||||
// window.location.href = apiURL;
|
||||
|
||||
|
||||
// var apiURL2 = $('#get-emp-list').attr('href'); // Get href attribute value
|
||||
// console.log(apiURL);
|
||||
// $.ajax({
|
||||
// url: apiURL,
|
||||
// method: 'GET',
|
||||
// data: queryParams,
|
||||
// success: function(response) {
|
||||
// // Assuming response is a JSON array
|
||||
// // displayDataTables(response);
|
||||
// console.log(response);
|
||||
// },
|
||||
// error: function(xhr, status, error) {
|
||||
// console.error('Error:', error);
|
||||
// }
|
||||
// });
|
||||
console.log(apiURL);
|
||||
$.ajax({
|
||||
url: apiURL,
|
||||
method: 'GET',
|
||||
data: queryParams,
|
||||
success: function(response) {
|
||||
if(response.status == true){
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
$('#employee_table_list').html(response.html);
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error:', error);
|
||||
toastr.error('Failed to fetch Data','Error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -191,10 +191,10 @@ table.dataTable tbody td {
|
||||
<select id="ticket_mail_customButton" class="form-control"
|
||||
style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||
<option value="">PlaceHolders</option>
|
||||
<?php foreach ($placeHolders as $value): ?>
|
||||
<?php foreach ($placeHolders as $key => $value): ?>
|
||||
<?php // if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>member_mobile
|
||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
||||
<option value="((<?php echo $value; ?>))"><?php echo $valueChange; ?>
|
||||
<option value="<?php echo $key; ?>"><?php echo $valueChange; ?></option>
|
||||
</option>
|
||||
<?php //} ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user