FIX_error fixed

This commit is contained in:
venba-Inspriron-3558 2025-08-20 18:36:44 +05:30
parent 7e4302b3ec
commit 66e9fc6ffc
2 changed files with 9 additions and 12 deletions

View File

@ -119,6 +119,7 @@ class ThzController extends BaseController
$mobile = $data['mobile']; $mobile = $data['mobile'];
if($client_id && $mobile){ if($client_id && $mobile){
$details = $this->thzMasterModel->ticketAutoFetchDetails($client_id ,$mobile); $details = $this->thzMasterModel->ticketAutoFetchDetails($client_id ,$mobile);
if(empty($details)){ if(empty($details)){
@ -128,8 +129,8 @@ class ThzController extends BaseController
$policyIds = array_column($details, 'policy_id'); $policyIds = array_column($details, 'policy_id');
$policyIds = array_filter($policyIds); $policyIds = array_filter($policyIds);
$clientPolicy = $this->clientPolicyModel->whereIn('policy_id', $policyIds)->where('is_active', 1)->get()->getResultArray(); $clientPolicy = $this->clientPolicyModel->whereIn('policy_id', $policyIds)->where('is_active', 1)->get()->getResultArray();
$result['client'] =[]; $result['client_details'] = $details;
$result['policy_details'] = empty($clientPolicy) ? [] : $clientPolicy ;
} }
}else{ }else{
@ -168,8 +169,6 @@ class ThzController extends BaseController
} }
public function ticketConversationSaveNotification($data){ public function ticketConversationSaveNotification($data){
} }
@ -268,11 +267,9 @@ class ThzController extends BaseController
private function findAssigneeEmail($assignee_id){ private function findAssigneeEmail($assignee_id){
$result = $this->userModel->where('id',$assignee_id)->find()->getResultArray(); $row = $this->userModel->where('id', $assignee_id)->get()->getRow();
$assigneeEmail = $row ? $row->email : null;
$assigneeEmail = $result[0]['email']; return $assigneeEmail ? $assigneeEmail : "";
return $assigneeEmail;
} }

View File

@ -95,7 +95,7 @@ class ThzMasterNotesModel extends Model
LEFT JOIN thz_master LEFT JOIN thz_master
ON thz_master.thz_id = thz_master_notes.thz_id ON thz_master.thz_id = thz_master_notes.thz_id
AND LOWER(thz_master_notes.notes_by) = 'user' AND LOWER(thz_master_notes.notes_by) = 'user'
WHERE thz_master_notes.thz_id = '.(int)$thz_id.' WHERE thz_master_notes.thz_id = " . (int)$thz_id . "
ORDER BY thz_master_notes.created_at ASC"; ORDER BY thz_master_notes.created_at ASC";
$result = $this->db->query($notes_sql)->getResultArray(); $result = $this->db->query($notes_sql)->getResultArray();