CHANGE_ AccountManagerDetails attached in getEmployeeProfile API : GWM

This commit is contained in:
bitbucket 2024-05-31 09:08:40 +05:30
parent 8326b3c1f0
commit 183cbd7fff
2 changed files with 6 additions and 5 deletions

View File

@ -258,12 +258,8 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) {
$routes->get("/getEmployeeProfile", "EmployeeRestController::getEmployeeProfile/$1");
$routes->post("/editEmployeeProfile", "EmployeeRestController::editEmployeeProfile");
$routes->post("/calculatePremium", "EmployeeRestController::calculatePremium");
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
$routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {

View File

@ -94,7 +94,12 @@ class EmployeeRestController extends AdminController
->where('relationship', $relationship)
->first();
$result = $employee;
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
$AccountManagerDetails = $this->clientRMModel->select('client_rm.* , user_profiles.*')
->join('user_profiles', 'client_rm.user_id = user_profiles.id', 'left')
->where('client_rm.client_id', $client_id )
->where('client_rm.level', 3 )
->findAll();
return $this->respond(['status' => 'success','code' => 200,'data' => $result, 'AccountManagerDetails'=> isset($AccountManagerDetails[0]) ? $AccountManagerDetails[0] : null ],200);
} else {
$result = "No Match's";
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],404);