From 38f744b9ae3b25f7ac7597ec8fd6f9e0df0b10c2 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Thu, 5 May 2022 15:30:29 +0530 Subject: [PATCH] getSalesPDReportforCETApp : ps --- api/application/config/config.php | 3 --- api/application/config/constants.php | 7 +++++++ api/application/config/routes.php | 6 +++++- .../controllers/Sales_PD_Controller.php | 17 ++++++++++++++++- .../helpers/authorization_helper.php | 2 +- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/api/application/config/config.php b/api/application/config/config.php index 2ebaf461..a585bce3 100644 --- a/api/application/config/config.php +++ b/api/application/config/config.php @@ -417,13 +417,10 @@ $config['cookie_httponly'] = FALSE; | Determines whether to standardize newline characters in input data, | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. | -<<<<<<< HEAD | This is particularly useful for portability between UNIX-based OSes, | (usually \n) and Windows (\r\n). -======= | WARNING: This feature is DEPRECATED and currently available only | for backwards compatibility purposes! ->>>>>>> e76217041ddcae80f11b50b44a7d409b6722ad40 | */ $config['standardize_newlines'] = FALSE; diff --git a/api/application/config/constants.php b/api/application/config/constants.php index 2a4a222a..b9046e0e 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -95,6 +95,7 @@ defined('ROUTE_LOGIN_W') OR define('ROUTE_LOGIN_W', 'saveSalesPDImage'); defined('ROUTE_LOGIN_V') OR define('ROUTE_LOGIN_V', 'generateSatelliteImg'); // no errors defined('ROUTE_LOGIN_U') OR define('ROUTE_LOGIN_U', 'generateOTP'); defined('ROUTE_LOGIN_T') OR define('ROUTE_LOGIN_T', 'verifyOTP'); +defined('ROUTE_LOGIN_B') OR define('ROUTE_LOGIN_B', 'getSalesPDReportforCETApp'); defined('ROUTE_LOGIN_A') OR define('ROUTE_LOGIN_A', 'getAuditedImages'); // no errors 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 @@ -211,6 +212,12 @@ defined('FIA_REJECTED') OR define('FIA_REJECTED','FIA_REJECTED'); /*******************Define Constants for Table Names and Primarykeys**************************/ defined('PDTEAM_CTY_PRODUCT_CS_COMBINATIONS') OR define('PDTEAM_CTY_PRODUCT_CS_COMBINATIONS','PDTEAM_CTY_PRODUCT_CS_COMBINATIONS'); +/*******************Define Constants for Google Events For VC**************************/ +define('GOOGLE_CLIENT_ID', '286363508265-0d7308vsvbosi26qnoj0ka2odj0e2h7j.apps.googleusercontent.com'); +define('GOOGLE_CLIENT_SECRET', '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'); +define('GOOGLE_OAUTH_SCOPE', 'https://www.googleapis.com/auth/calendar'); +define('REDIRECT_URI', 'https://demo.pdgenie.com/pd/#/home'); +$googleOauthURL = 'https://accounts.google.com/o/oauth2/auth?scope=' . urlencode(GOOGLE_OAUTH_SCOPE) . '&redirect_uri=' . REDIRECT_URI . '&response_type=code&client_id=' . GOOGLE_CLIENT_ID . '&access_type=online'; /*******************Define Constants for Table Names and Primarykeys**************************/ defined('INDUSTRYCLASSIFICATION') OR define('INDUSTRYCLASSIFICATION','m_industry_classification');// #### NOT USED diff --git a/api/application/config/routes.php b/api/application/config/routes.php index 57a70717..eeeee154 100755 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -361,4 +361,8 @@ $route['getListPDOfficersForNotification'] = 'PD_Controller/getListPDOfficersFor $route['sendNotificationToOfficers'] = 'PD_Controller/sendNotificationToOfficers'; $route['getMasterForDataDump'] = 'Request_DataDump_Controller/getMasterForDataDump'; -$route['getRequestForDataDump'] = 'Request_DataDump_Controller/getRequestForDataDump'; \ No newline at end of file +$route['getRequestForDataDump'] = 'Request_DataDump_Controller/getRequestForDataDump'; + +$route['GC_addEvent'] = 'GC_Event_Controller/addEvent'; +$route['GC_eventList'] = 'GC_Event_Controller/eventList'; +$route['getSalesPDReportforCETApp'] = 'Sales_PD_Controller/getSalesPDReportforCETApp'; \ No newline at end of file diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 5861f0ca..d0af91e1 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -1338,7 +1338,22 @@ public function filterSalesPDList_post() { } } - + public function getSalesPDReportforCETApp_get(){ + log_message('ERROR','## SalesPDReportforCETApp Fns Entered'); + $get = $this->get('sales_pd_id'); + if(!empty($get)){ + $data['report'] = $this->prepareSalesPDReport($get); + log_message('ERROR',"Report Generated for CET App"); + $statusMsg = 'Report Generated'; + }else{ + log_message('ERROR','Report Not Available for CET App'); + $statusMsg = 'Report Not Available.'; + } + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['msg'] = $statusMsg; + $this->response($data,REST_Controller::HTTP_OK); + } //test purpose public function testSaleSection_get(){ diff --git a/api/application/helpers/authorization_helper.php b/api/application/helpers/authorization_helper.php index fddb2e3e..63988167 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 || $routingName ==SAVESMCCREDITPDIMAGE_API || $routingName ==GETSMCPDIMGSECTIONDATA_API || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U) + 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 || $routingName == ROUTE_LOGIN_T || $routingName == ROUTE_LOGIN_U || $routingName == ROUTE_LOGIN_B) { return true; }