From d29e6c94f4d22f9980505a23065ea3a8c02a3585 Mon Sep 17 00:00:00 2001 From: velz Date: Tue, 9 Oct 2018 10:45:27 +0530 Subject: [PATCH] ROLES TABLE ADDED --- api/application/config/constants.php | 5 ++++- api/application/controllers/PD_Controller.php | 18 +++++++++--------- .../models/User_Management_Model.php | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/api/application/config/constants.php b/api/application/config/constants.php index bd6e88e3..3f009668 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -86,7 +86,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto // define login route name for token verification //defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors -defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'triggerNewPD'); // no errors +defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getListOfUsers'); // no errors /*********************AWS resources Constants*************************************************/ defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic'); @@ -269,5 +269,8 @@ defined('PDAPPLICANTSLOGSID') OR define('PDAPPLICANTSLOGSID','pd_co_applicant_tr defined('PDSCHEDULE') OR define('PDSCHEDULE','t_pd_schedule'); defined('PDSCHEDULEID') OR define('PDSCHEDULEID','pd_schedule_id'); +defined('ROLES') OR define('ROLES','m_roles'); +defined('ROLESID') OR define('ROLESID','role_id'); + diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 743f19bb..bd97d8c8 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -314,15 +314,15 @@ class PD_Controller extends REST_Controller { if($pd_id != null || $pd_id != '') { - // foreach($pd_applicant_details as $pd_applicant_detail) - // { - // $pd_applicant_detail['fk_pd_id'] = $pd_id; - // $co_applicant_id = $this->PD_Model->saveRecords($pd_applicant_detail,PDAPPLICANTSDETAILS); - // if($co_applicant_id != null || $co_applicant_id != '') - // { - // $count = $count + 1; - // } - // } + foreach($pd_applicant_details as $pd_applicant_detail) + { + $pd_applicant_detail['fk_pd_id'] = $pd_id; + $co_applicant_id = $this->PD_Model->saveRecords($pd_applicant_detail,PDAPPLICANTSDETAILS); + if($co_applicant_id != null || $co_applicant_id != '') + { + $count = $count + 1; + } + } } // update into pd officer details diff --git a/api/application/models/User_Management_Model.php b/api/application/models/User_Management_Model.php index 003f5672..3588b3e0 100644 --- a/api/application/models/User_Management_Model.php +++ b/api/application/models/User_Management_Model.php @@ -19,7 +19,7 @@ class User_Management_Model extends SPARQ_Model { $this->db->from(USERPROFILE.' as USERPROFILE'); $this->db->join(ENTITY.' as ENTITY','USERPROFILE.fk_entity_id = ENTITY.entity_id and ENTITY.isactive = 1','LEFT'); $this->db->join(DESIGNATION.' as DESIGNATION','USERPROFILE.fk_designation = DESIGNATION.designation_id and DESIGNATION.isactive = 1','left'); - $this->db->join(STATE.' as STATE','USERPROFILE.fk_state = STATE.state_id and STATE.isactive = 1'); + $this->db->join(STATE.' as STATE','USERPROFILE.fk_state = STATE.state_id and STATE.isactive = 1','LEFT'); $this->db->join(CITY.' as CITY','USERPROFILE.fk_city = CITY.city_id and CITY.isactive = 1','LEFT'); $this->db->join(USERPROFILE.' as USERPROFILE1','USERPROFILE.fk_createdby = USERPROFILE1.userid and USERPROFILE1.isactive = 1','LEFT'); $this->db->join(USERPROFILE.' as USERPROFILE2','USERPROFILE.fk_updatedby = USERPROFILE2.userid and USERPROFILE2.isactive = 1','LEFT');