diff --git a/api/application/config/constants.php b/api/application/config/constants.php index 9d58eb1e..b56a7d14 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -87,7 +87,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', '(listAllTemplates/:any)'); // no errors -defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getFormAndQuestionKeys'); // no errors +defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getListPDOfficers'); // no errors /*********************AWS resources Constants*************************************************/ defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic'); diff --git a/api/application/config/database.php b/api/application/config/database.php index 6ab0f361..99da2c96 100644 --- a/api/application/config/database.php +++ b/api/application/config/database.php @@ -70,7 +70,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | The $query_builder variables lets you determine whether or not to load | the query builder class. */ -$active_group = 'dev'; +$active_group = 'test'; $query_builder = TRUE; $db['dev'] = array( diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 52dcf387..8913b987 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -900,9 +900,11 @@ class PD_Controller extends REST_Controller { $list_of_pd_officers[$key]['mobile_no'] = $names[0]['mobile_no']; $list_of_pd_officers[$key]['count'] = 0; - $this->db->SELECT('pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name'); + $this->db->SELECT('pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name'); $this->db->FROM(PDTRIGGER.' as PDTRIGGER'); $this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1'); + $this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id AND PDTYPE.isactive = 1'); + $this->db->OR_GROUP_START(); $this->db->OR_WHERE('PDTRIGGER.pd_status',SCHEDULED); $this->db->OR_WHERE('PDTRIGGER.pd_status',INPROGRESS); @@ -998,9 +1000,10 @@ class PD_Controller extends REST_Controller { $list_of_pd_officers[$key]['mobile_no'] = $names[0]['mobile_no']; $list_of_pd_officers[$key]['count'] = 0; - $this->db->SELECT('pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name'); + $this->db->SELECT('pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name'); $this->db->FROM(PDTRIGGER.' as PDTRIGGER'); $this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1'); + $this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id AND PDTYPE.isactive = 1'); $this->db->OR_GROUP_START(); $this->db->OR_WHERE('PDTRIGGER.pd_status',SCHEDULED); $this->db->OR_WHERE('PDTRIGGER.pd_status',INPROGRESS); diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index b0e761e4..e9610f94 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -246,7 +246,7 @@ class PD_Model extends SPARQ_Model { if($log_key == 0) { - $log_string = 'PD Ctreated with '.$log['old_value'].'" status "'.'"'; + $log_string = 'PD Ctreated with '.$log['old_value'].'" status "'; $user = $log['createdby']; $time = $log['createdon']; $actual_logs[$log_key]['log'] = $log_string;