From c88bb2b2ab296ade2c7ed4a17f8850373b16350b Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 23 Nov 2017 11:05:02 +0530 Subject: [PATCH 1/4] changes in followup screen --- Apollo/assets/views/callTrackingFollowup.html | 88 ++++++++++++++++++- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/Apollo/assets/views/callTrackingFollowup.html b/Apollo/assets/views/callTrackingFollowup.html index 48080afd..1d1caf0c 100644 --- a/Apollo/assets/views/callTrackingFollowup.html +++ b/Apollo/assets/views/callTrackingFollowup.html @@ -1,3 +1,14 @@ + @@ -74,7 +89,7 @@ - +
{{followupDetails.ListName}}
Followup DateFollowup On @@ -125,6 +140,71 @@
+
+
+

Other Lead/Activities

+ +
+
+
+ + + + + +
+
+
+ + + + + + + + + @@ -164,13 +244,14 @@
-
+
  • - {{message.FollowupOn}} + {{message.FirstName}}    On   {{message.CreatedOn}}
    +

    {{message.FollowupComments}}

    @@ -185,6 +266,7 @@
+
From b3f2fc10db2a0f1622a7b18896baab622a2a55da Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 23 Nov 2017 11:06:14 +0530 Subject: [PATCH 2/4] changes in followup screen --- .../application/models/Calltracking_model.php | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index 13bca699..ce29f9b6 100644 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -276,10 +276,14 @@ class Calltracking_model extends CI_Model { public function getTrackingFollowup($trackingId=null) { - $this->db->select('InteractionId,TrackingID,FollowupOn,FollowupComments,CreatedOn'); + $this->db->select('LTF.InteractionId,LTF.TrackingID,LTF.FollowupOn,LTF.FollowupComments,DATE_FORMAT(LTF.CreatedOn, "%d-%m-%Y %h:%i %p") AS CreatedOn,ST.FirstName'); + + $this->db->from(LEAD_TRACKING_FOLLOWUP.' as LTF'); + $this->db->join(LOGIN.' as LO', 'LO.ID = LTF.CreatedBy'); + $this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID'); $this->db->where('TrackingID',$trackingId); $this->db->order_by('InteractionId','DESC'); - $trackingDetails = $this->db->get(LEAD_TRACKING_FOLLOWUP); + $trackingDetails = $this->db->get(); return $trackingDetails->result(); } @@ -356,6 +360,8 @@ class Calltracking_model extends CI_Model { $tracking_array["ListCode"]=$row->ListCode; $tracking_array["ListName"]=$row->ListName; $tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID); + $tracking_array["collectTrackedID"]=$this->getStudentTrackedID($row->MobileNumber); + $result[]=$tracking_array; @@ -375,5 +381,23 @@ class Calltracking_model extends CI_Model { } + /* + * get student tracked id + * @params mobile number + * created by kms + * */ + public function getStudentTrackedID($stuMobile=null) + { + $this->db->distinct(); + $this->db->select('LT.TrackingID,LT.LeadID,PLD.ListCode,PLD.ListName'); + $this->db->from(LEAD_DETAILS.' as LD'); + $this->db->join(LEAD_TRACKING.' as LT', 'LT.LeadID = LD.LeadID'); + $this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = LT.ActivityStatus'); + $this->db->where('LD.MobileNumber',$stuMobile); + $this->db->order_by('LT.TrackingID','ASC'); + $studeTrackID = $this->db->get(); + return $studeTrackID->result(); + } + } \ No newline at end of file From 563f1b7ba1002749005dc52a5abe86d247549497 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 23 Nov 2017 11:06:33 +0530 Subject: [PATCH 3/4] changes in followup screen --- .../controllers/Call_Tracking_Controller.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php index 8aef9223..ed4f2a27 100644 --- a/Apollo/api/application/controllers/Call_Tracking_Controller.php +++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php @@ -126,9 +126,9 @@ class Call_Tracking_Controller extends REST_Controller { { $search['requestedBy'] = $this->post('requestedBy'); $search['requestedDept'] = $this->post('requestedDept'); - $search['searchDate'] = $this->post('searchDate'); - $search['searchMobileNumber'] = $this->post('searchMobileNumber'); - $search['searchName']= $this->post('searchName'); + // $search['searchDate'] = $this->post('searchDate'); + // $search['searchMobileNumber'] = $this->post('searchMobileNumber'); + // $search['searchName']= $this->post('searchName'); $getTrackedDetails = $this->Calltracking_model->getTrackingDetails($search); if ($getTrackedDetails) @@ -154,18 +154,21 @@ class Call_Tracking_Controller extends REST_Controller { * */ public function updateFollowupDetails_post() { + $now = new DateTime(); + $now->setTimezone(new DateTimezone('Asia/Kolkata')); //store followup details for update $update_followup_details['TrackingID'] = $this->post('trackingID'); $update_followup_details['UpdatedBy'] = $this->post('updatedBy'); $update_followup_details['StatusCode'] = $this->post('status'); - $update_followup_details['UpdatedOn'] = date('Y-m-d H:i:s'); + $update_followup_details['UpdatedOn'] = $now->format('Y-m-d H:i:s'); // store followup details for insert $followup_details['TrackingID'] = $this->post('trackingID'); $followup_details['FollowupOn'] = $this->post('date'); $followup_details['CreatedBy'] = $this->post('updatedBy'); $followup_details['FollowupComments'] = $this->post('comments'); + $followup_details['CreatedOn'] = $now->format('Y-m-d H:i:s'); From 6553b460116f1dc3103e549d0bda3cea5766d450 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 23 Nov 2017 11:06:51 +0530 Subject: [PATCH 4/4] changes in followup screen --- Apollo/assets/js/controllers/callTrackingCtrl.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Apollo/assets/js/controllers/callTrackingCtrl.js b/Apollo/assets/js/controllers/callTrackingCtrl.js index 1b24eafe..b5423aa9 100644 --- a/Apollo/assets/js/controllers/callTrackingCtrl.js +++ b/Apollo/assets/js/controllers/callTrackingCtrl.js @@ -350,7 +350,6 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter", }; $rootScope.loadFollowupDetails = function (trackID) { - var load = { method: 'POST', url: apiPoint.url + 'loadFollowupDetails/', @@ -394,3 +393,5 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter", }]); + +