diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index e6aca562..aba83570 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -1453,7 +1453,7 @@ class EmployeeRestController extends AdminController if ($value > 0) { if($value == 1 && $key ==='either-parents-pil') { $result .= ' + Either 2 Parents or 2 Parents in law'; - }if($value == 2 && $key ==='either-parents-pil') { + }else if($value == 2 && $key ==='either-parents-pil') { $result .= ' + Any 2 of Parents and Parents in law'; }else if($value != 0 && $key ==='spouse') { $string = str_replace('-', ' ', $key); diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index ae16ad5d..b045b055 100755 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -2046,13 +2046,13 @@ public function employeesEnrollmentInsert($params) //store email and mail content via helper to send notification $emp_emails[] = sendMailNotification::sendMailNotification('member_welcome_mail', $params); - Kint::dump($emp_emails); - Kint::dump($key.'-'.count($excel_data)); + // Kint::dump($emp_emails); + // Kint::dump($key.'-'.count($excel_data)); // if mail count is 20 send bulk mail and reset emp_emails variable if (count($emp_emails) == 20 || $key == count($excel_data) ) { $job_details = new Jobs(); $r = Jobs::addJob(['job_name' => 'bulk_mail','payload' => $emp_emails]); - echo 'Mail triggered'; + // echo 'Mail triggered'; $emp_emails = []; } @@ -2065,6 +2065,7 @@ public function employeesEnrollmentInsert($params) $this->setPullNotification($this->getFileMetaDataByFileId($file_id,'success')); + return true; } diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index b313789e..d4256270 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -71,7 +71,9 @@ class RestAuthenticationController extends AdminController $mobile_number = $this->request->getJSON()->mobile_number; - $employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first(); + $employeeData = $this->employeeModel->where('mobile', $mobile_number) + ->where('relationship', 'self') + ->where('is_active', 1)->first(); if ($employeeData) { @@ -126,7 +128,9 @@ class RestAuthenticationController extends AdminController try { $mobile_number = $this->request->getJSON()->mobile_number; - $HrData = $this->hrModel->where('mobile', $mobile_number)->where('contact_type', 'client')->first(); + $HrData = $this->hrModel->where('mobile', $mobile_number) + ->where('contact_type', 'client') + ->where('is_active', 1)->first(); if ($HrData) {