Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
vadivelJ96 2025-08-19 17:31:50 +05:30
commit ef11ed776e

View File

@ -110,14 +110,17 @@ class ThzController extends BaseController
->where('thz_master.thz_id', $thz_id) ->where('thz_master.thz_id', $thz_id)
->findAll(); ->findAll();
if(!empty($result['master'])){
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id); $notes = $this->thzMasterNotesModel->ticketConversationList($thz_id);
$result['notes'] = !empty($notes) ? $notes : []; $result['notes'] = !empty($notes) ? $notes : [];
}else{
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
}
}else{ }else{
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404); return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
} }
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(400); return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
} }