From 5ee924ae1024b36370f5f5b86e5e84505988cc62 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Mon, 7 Dec 2020 14:00:24 +0530 Subject: [PATCH] FOR SMC IMG APP --- api/application/config/constants.php | 2 ++ .../controllers/SMC_Credit_PD_Controller.php | 10 +++++++--- api/application/helpers/authorization_helper.php | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/api/application/config/constants.php b/api/application/config/constants.php index 5fac79b5..38207d31 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -96,6 +96,8 @@ defined('ROUTE_LOGIN_A') OR define('ROUTE_LOGIN_A', 'getAuditedImages'); defined('TURN_SERVER_API') OR define('TURN_SERVER_API', 'getServerInfo'); // no errors defined('VIDEO_CHAT_ACCESS_KEY_API') OR define('VIDEO_CHAT_ACCESS_KEY_API', 'getVideoChatAccessKey'); // no errors defined('SAVEROOMINFO_API') OR define('SAVEROOMINFO_API', 'saveRoomInfo'); // no errors +defined('SAVESMCCREDITPDIMAGE_API') OR define('SAVESMCCREDITPDIMAGE_API', 'saveSMCCreditPDImage'); // no errors +defined('GETSMCPDIMGSECTIONDATA_API') OR define('GETSMCPDIMGSECTIONDATA_API', 'getSMCPDImgSectionData'); // no errors //defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN','getFullPDDetails'); // no errors /*********************AWS resources Constants*************************************************/ diff --git a/api/application/controllers/SMC_Credit_PD_Controller.php b/api/application/controllers/SMC_Credit_PD_Controller.php index e31b115b..0af38152 100644 --- a/api/application/controllers/SMC_Credit_PD_Controller.php +++ b/api/application/controllers/SMC_Credit_PD_Controller.php @@ -1345,10 +1345,14 @@ public function filterSalesPDList_post() { $rand_string = $this->post('rand_string'); $pd_id = $this->post('pd_id'); //echo $rand_string.'#'.$pd_id;die(); + if(!$pd_id) + { + $pd_id = $this->PD_Model->selectCustomRecords(array('*'),array('random_string' => $rand_string),PDTRIGGER); + $pd_id = $pd_id[0]['pd_id']; + } - //$smc_pd_master_data = $this->PD_Model->getPDMasterDetails($pd_id,$random_string); - - $sales_pd_img_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pd_id,'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS); + $where_condition_array = array('fk_smc_credit_pd_id' => $pd_id,'isactive' => 1,'img_name!=' => 'satellite'); + $sales_pd_img_data = $this->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),$where_condition_array,SMC_CREDIT_PD_DOCS); //print_r($sales_pd_img_data);die(); //sales tele pd img structure array diff --git a/api/application/helpers/authorization_helper.php b/api/application/helpers/authorization_helper.php index 1b3cf9b0..e9fd42ba 100644 --- a/api/application/helpers/authorization_helper.php +++ b/api/application/helpers/authorization_helper.php @@ -72,7 +72,7 @@ class AUTHORIZATION } - if( $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API) + if( $routingName == ROUTE_LOGIN_X || $routingName == ROUTE_LOGIN_Y || $routingName == ROUTE_LOGIN_Z || $routingName == ROUTE_LOGIN_W || $routingName == ROUTE_LOGIN_V || $routingName == ROUTE_LOGIN_A || $routingName == TURN_SERVER_API || $routingName == VIDEO_CHAT_ACCESS_KEY_API || $routingName ==SAVEROOMINFO_API || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API) { return true; }