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,7 +119,8 @@ class ThzController extends BaseController
$mobile = $data['mobile'];
if($client_id && $mobile){
$details = $this->thzMasterModel->ticketAutoFetchDetails($client_id,$mobile);
$details = $this->thzMasterModel->ticketAutoFetchDetails($client_id ,$mobile);
if(empty($details)){
return $this->response->setJSON((['status' => 'error', 'message' => 'No Data found']))->setStatusCode(400);
@ -128,8 +129,8 @@ class ThzController extends BaseController
$policyIds = array_column($details, 'policy_id');
$policyIds = array_filter($policyIds);
$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{
@ -145,7 +146,7 @@ class ThzController extends BaseController
$data = $this->request->getGet();
$thz_id = $data['thz_id'] ?? null;
$thz_id = $data['thz_id'] ?? null;
if($thz_id){
$result['master'] = $this->thzMasterModel
@ -168,8 +169,6 @@ class ThzController extends BaseController
}
public function ticketConversationSaveNotification($data){
}
@ -268,11 +267,9 @@ class ThzController extends BaseController
private function findAssigneeEmail($assignee_id){
$result = $this->userModel->where('id',$assignee_id)->find()->getResultArray();
$assigneeEmail = $result[0]['email'];
return $assigneeEmail;
$row = $this->userModel->where('id', $assignee_id)->get()->getRow();
$assigneeEmail = $row ? $row->email : null;
return $assigneeEmail ? $assigneeEmail : "";
}

View File

@ -95,7 +95,7 @@ class ThzMasterNotesModel extends Model
LEFT JOIN thz_master
ON thz_master.thz_id = thz_master_notes.thz_id
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";
$result = $this->db->query($notes_sql)->getResultArray();