diff --git a/app/Controllers/EnquiryController.php b/app/Controllers/EnquiryController.php index bfd55ee..f34abc5 100644 --- a/app/Controllers/EnquiryController.php +++ b/app/Controllers/EnquiryController.php @@ -68,7 +68,11 @@ class EnquiryController extends ResourceController } //Get enquiry details - $enquiry = $this->enquiryModel->where('id', $enquiry_id)->where('is_active', 1)->first(); + $enquiry = $this->enquiryModel->select('partner_enquiry.*, I.name as insurer_name ') + ->join('insurers I', 'I.id = partner_enquiry.insurer_id', 'left') + ->where('id', $enquiry_id) + ->where('is_active', 1) + ->first(); if (!$enquiry) { return $this->respond(['status' => 'failed','code' => 404,'data' => 'Enquiry not found'], 200); diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index a06f7f2..95f2f75 100644 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -113,7 +113,7 @@ class MasterController extends ResourceController public function getStaffMaster() { - $data = $this->StaffModel->select('id,name')->where('is_active',1)->where('riole_id',2)->findAll(); + $data = $this->StaffModel->select('id,name')->where('is_active',1)->where('role_id',2)->findAll(); if (!$data) { return $this->failNotFound('No data found');