FIX_ACM_MISSING

This commit is contained in:
Srinivas-Saravanan 2025-03-13 17:18:30 +05:30
parent 985871aee2
commit 306e5328a4
2 changed files with 19 additions and 17 deletions

View File

@ -4900,20 +4900,22 @@ class ClientController extends AdminController
$memberData = [];
$dataForClientAndInsurer = [];
$acms = db_connect()->table('user_profiles')
->select('user_profiles.id, user_profiles.first_name')
->where('user_profiles.is_active', 1)
->where('user_profiles.role', 3)
->get()
->getResultArray();
// $acms = db_connect()->table('user_profiles')
// ->select('user_profiles.id, user_profiles.first_name')
// ->where('user_profiles.is_active', 1)
// ->where('user_profiles.role', 3)
// ->get()
// ->getResultArray();
if(!empty($data) && count($data) > 0){
$memberData = $this->employeeModel->getEmployeeByEmployeeCode($data['emp_code'], $data['policy_id'], $client_id);
$acms_datas = $this->employeeModel->getAcmUsingClientID($data['client_id']);
if(!empty($acms_datas)){
$acms = $acms_datas;
}
// if(!empty($acms_datas)){
// $acms = $acms_datas;
// }
}else{
$acms_datas = "";
}
@ -4930,7 +4932,7 @@ class ClientController extends AdminController
'type' => $type,
'dataForClientAndInsurer' => $dataForClientAndInsurer,
'memberData' => $memberData,
'acms' => $acms,
'acms' => $acms_datas,
], 200);
} else {
return $this->respond([
@ -4942,7 +4944,7 @@ class ClientController extends AdminController
'type' => $type,
'dataForClientAndInsurer' => $dataForClientAndInsurer,
'memberData' => $memberData,
'acms' => $acms
'acms' => $acms_datas
], 200);
}
}

View File

@ -692,14 +692,14 @@ if (!isset($view_ticket_page)) {
function appendACMS(data) {
console.log(data);
console.log("account manger data : ",data);
$('#acm_id').empty();
// $('#acm_id').append($('<option>', {
// value: '0',
// text: 'Select Account Manager'
// }));
$('#acm_id').append($('<option>', {
value: '',
text: 'Select Account Manager'
}));
$.each(data, function(index, item) {
var option = $('<option>', {