From 001259b5bb6817529878701ded5acf684a14e6be Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Thu, 19 Mar 2020 17:13:55 +0530 Subject: [PATCH] SAPLES PD SATELIITE SEPARATED --- api/application/config/routes.php | 1 + .../controllers/Sales_PD_Controller.php | 24 ++++++++++++++++--- .../helpers/push_notification_helper.php | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/api/application/config/routes.php b/api/application/config/routes.php index f9c182f0..55f73f7e 100644 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -271,4 +271,5 @@ $route['getSalesPDSectionData'] = 'Sales_PD_Controller/getSalesPDSectionData'; $route['testAPISalesPD'] = 'Sales_PD_Controller/testAPISalesPD'; $route['salesPDMisReport'] = 'Sales_PD_Controller/salesPDMisReport'; $route['filterSalesPDList']='Sales_PD_Controller/filterSalesPDList'; +$route['generateSatelliteImg']='Sales_PD_Controller/generateSatelliteImg'; diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 4253e4e9..e8a33915 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -461,10 +461,11 @@ class Sales_PD_Controller extends REST_Controller { if($records['img_name'] == 'selfie_with_person_met') { //$location = $records['location']; - $update_fields = array('geo_location' => $records['location']); - $this->Sales_PD_Model->updateRecords($update_fields,SALES_PD_DATA,array('sales_pd_id' => $records['fk_sales_pd_id'])); + //$update_fields = array('geo_location' => $records['location']); + //$this->Sales_PD_Model->updateRecords($update_fields,SALES_PD_DATA,array('sales_pd_id' => $records['fk_sales_pd_id'])); - satellite_image::getSatelliteImage($records['fk_sales_pd_id'],2); + + //satellite_image::getSatelliteImage($records['fk_sales_pd_id'],2); //disable previous selfie img $update_fields2 = array('isactive' => 0); @@ -939,6 +940,23 @@ public function filterSalesPDList_post() { $this->response($data,REST_Controller::HTTP_OK); } } + + + public function generateSatelliteImg_post() + { + + $input_data = $this->post(); + + $id = $this->Sales_PD_Model->updateRecords($input_data,SALES_PD_DATA,array('sales_pd_id' => $input_data['sales_pd_id'])); + satellite_image::getSatelliteImage($input_data['sales_pd_id'],2); + + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $id; + $this->response($data,REST_Controller::HTTP_OK); + + + } } \ No newline at end of file diff --git a/api/application/helpers/push_notification_helper.php b/api/application/helpers/push_notification_helper.php index 6b0f5653..48c5c78d 100644 --- a/api/application/helpers/push_notification_helper.php +++ b/api/application/helpers/push_notification_helper.php @@ -44,7 +44,7 @@ class PUSH_NOTIFICATION ( 'message'=> $msg, 'body'=> $msg, - 'title'=> $msg, + //'title'=> $msg, 'subtitle'=> $msg, 'tickerText'=> $msg, 'vibrate'=>1,