diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php index 0245de74..c62f7074 100755 --- a/Apollo/api/application/controllers/Call_Tracking_Controller.php +++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php @@ -587,6 +587,32 @@ public function getstaffCountDetails_post() /* * End of call tracking */ +public function getTrackingLeadDetails2_post() +{ + $activity = $this->post('activity'); + $requestedBy = $this->post('requestedBy'); + $mobileNumber = ''; + $branchID = $this->post('branchID'); + $loginType = $this->post('userType'); + $getLeadDetails = $this->Calltracking_model->getLeadDetails($requestedBy,$mobileNumber,$branchID,$loginType); + $getLeadDetails['statusDetails'] = $this->Calltracking_model->getStatus($activity); + if ($getLeadDetails) + { + $getLeadDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getLeadDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + +} public function updateFollowupDetails2_post() { $now = new DateTime(); diff --git a/Apollo/api/application/models/Broadcast_model.php b/Apollo/api/application/models/Broadcast_model.php index 84fa1b74..c4835ba3 100755 --- a/Apollo/api/application/models/Broadcast_model.php +++ b/Apollo/api/application/models/Broadcast_model.php @@ -127,10 +127,9 @@ class Broadcast_model extends CI_Model { public function getSMSGroupDetails($reqData ,$reqBy) { $localBranch = $reqBy['localBranchID']; - $querys = "SELECT t1.*, t2.DeliveredStatus, t2.DeliveredOn FROM T_BroadcastStatus as t1 + $querys = "SELECT t1.id, t1.MsgId, t1.MsgBody, t1.Status, t1.MobileNumber, t1.CreatedBy, t1.CreatedOn, t1.MsgGroup, t1.BranchCode, t2.DeliveredStatus, t2.DeliveredOn FROM T_BroadcastStatus as t1 LEFT JOIN T_BroadcastDeliveryCron as t2 ON t2.MsgId = t1.MsgId WHERE t1.MsgGroup = '$reqData' AND t1.BranchCode='$localBranch' ORDER BY t1.CreatedOn DESC"; - // echo $querys;exit(); $smsSendGroupDetails = $this->db->query($querys); $smsSendGroupDetailsList = $smsSendGroupDetails->result(); diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index 39f4d658..1e490135 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -1059,7 +1059,6 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col * created by kms * */ - public function getLoadFollowupDetails($trackingID) { //sprint_r($trackingID);die(); diff --git a/Apollo/assets/js/controllers/callTrackingCtrl.js b/Apollo/assets/js/controllers/callTrackingCtrl.js index 3d89d0e1..8ec746f9 100755 --- a/Apollo/assets/js/controllers/callTrackingCtrl.js +++ b/Apollo/assets/js/controllers/callTrackingCtrl.js @@ -560,6 +560,7 @@ $scope.trackingTodayno=0; $scope.data = []; + $scope.dCopy = []; if(myModel!='' && myModel!=undefined){ $scope.finalSearchArry=myModel; @@ -610,6 +611,7 @@ $scope.trackingTodayno=0; $scope.dbFollowDate = getYear+'-'+getMonth+'-'+getDay; if (($scope.currentDate) > ( $scope.dbFollowDate) && (value.statusName!='CLOSE')) { $scope.data.push(value); + $scope.dCopy.push(value); } @@ -619,6 +621,7 @@ $scope.trackingTodayno=0; angular.forEach(response.data.trackingDetails, function (value1, key1) { $scope.data.push(value1); + $scope.dCopy.push(value1); }); @@ -637,6 +640,7 @@ $scope.trackingTodayno=0; $rootScope.trackingStatus = response.data.statusDetails; $scope.data = response.data.trackingDetails; + $scope.dCopy= response.data.trackingDetails; sessionStorage.setItem('trackingList', JSON.stringify($scope.data)); } @@ -659,6 +663,7 @@ $scope.trackingTodayno=0; if (($scope.currentDate) > ($scope.dbFollowDate) && (value.statusName!='CLOSE')) { $scope.data.push(value); + $scope.dCopy.push(value); } }); sessionStorage.setItem('trackingList', JSON.stringify($scope.data)); @@ -673,6 +678,7 @@ $scope.trackingTodayno=0; $scope.branchInfo = ''; $scope.data=''; + $scope.dCopy=''; } @@ -812,33 +818,151 @@ $scope.GetstaffwiseDetails($scope.tod); } - $scope.$watch(function () { - $scope.filteredItems = $scope.$eval(" data |filter:search2| filter:search3| filter:search4| filter:search5"); - // $scope.filteredItems = $scope.$eval(" data | filter:search3 "); - // console.log($scope.filteredItems); - }); + $scope.searchableChange = function(search2,search3,search4,search5) { + $scope.search2_details = search2 != '' ? search2 : ''; + $scope.search3_activity = search3 != '' ? search3 : ''; + $scope.search4_assigned = search4 != '' ? search4 : ''; + $scope.search5_status = search5 != '' ? search5 : ''; + console.log($scope.search2_details,$scope.search3_activity,$scope.search4_assigned,$scope.search5_status); + $scope.myModel.all = false; + }; + + $scope.arrayReturn = function(search2,search3,search4,search5) { + + console.log('Initial',$scope.data); + $scope.searchedData1=[]; + $scope.selectedLeadID = []; + $scope.disable = false; + if(search2!='' && search2!=null && search2!=undefined){ + + $scope.regInteger = /^\d+$/; + if($scope.regInteger.test(search2)){ + $scope.searchText = search2; + angular.forEach($scope.data, function(item) { + if( item.MobileNumber.indexOf($scope.searchText) >= 0 ){ + $scope.searchedData1.push(item); + } + + }); + } + else{ + $scope.search2 = search2.toLowerCase(); + angular.forEach($scope.data, function(item) { + if( item.LeadName.toLowerCase().indexOf($scope.search2) >= 0 ){ + $scope.searchedData1.push(item); + } + }); + } + } + else{ + angular.forEach($scope.data,function (value,key) {$scope.searchedData1.push(value);}); + } + // console.log('Step1 output',$scope.searchedData1); + // console.log('search',search3); + $scope.searchedData2=[]; + if(search3!='' && search3!=null && search3!=undefined){ + // console.log('hai i have value',search3); + angular.forEach($scope.searchedData1, function(item) { + if( item.ActivityName.toLowerCase().indexOf(search3.toLowerCase()) >= 0 ){ + $scope.searchedData2.push(item); + } + + }); + + } + else{ + angular.forEach($scope.searchedData1,function (value,key) { + + $scope.searchedData2.push(value); + }); + + } + + // serach assigned to in array list + // console.log('Step2 output',$scope.searchedData2); + $scope.searchedData3=[]; + if(search4!='' && search4!=null && search4!=undefined){ + + angular.forEach($scope.searchedData2, function(item) { + + if(item.Firstname.toLowerCase().indexOf(search4.toLowerCase()) >= 0 ){ + $scope.searchedData3.push(item); + + } + + + }); + + } + else{ + angular.forEach($scope.searchedData2,function (value,key) { + + $scope.searchedData3.push(value); + }); + + } + // console.log('Step3 output',$scope.searchedData3); + // // search status in array list + + + $scope.searchedData4=[]; + if(search5!='' && search5!=null && search5!=undefined){ + + angular.forEach($scope.searchedData3, function(item) { + + if( item.statusName.toLowerCase().indexOf(search5.toLowerCase()) >= 0 ){ + $scope.searchedData4.push(item); + } + + }); + + } + else{ + angular.forEach($scope.searchedData3,function (value,key) { + $scope.searchedData4.push(value); + }); + + } + console.log('Step4 output',$scope.searchedData4); + $scope.disable = false; + }; + + + // $scope.$watch(function () { + // // $scope.filteredItems = $scope.$eval(" data |filter:search2 "); + // $scope.filteredItems = $scope.$eval(" data | filter:"+$scope.search3_activity); + // // console.log($scope.filteredItems); + // // console.log($scope.search3_activity); + // }); + /** * Auto Call Tracking Sriram */ $scope.selectedLeadID = []; $scope.isCheckAll = function(e){ + var val = (e.target.checked ? true : false); + + console.log('$scope.search2_details',$scope.search2_details); + console.log('$scope.search3_activity',$scope.search3_activity); + console.log('$scope.search4_assigned',$scope.search4_assigned); + console.log('$scope.search5_status',$scope.search5_status); + console.log('$scope.searchedData4',$scope.searchedData4); + $scope.arrayReturn($scope.search2_details,$scope.search3_activity,$scope.search4_assigned,$scope.search5_status); // alert(val); // return true; if(val) { // $scope.disable = false; - var len2 = $scope.data.length; - var len = $scope.filteredItems.length; - console.log("len2",len2); + // var len2 = $scope.data.length; + var len = $scope.searchedData4.length; console.log("len filter",len); - console.log($scope.filteredItems); var i = 0; for(i=0;i= 0 ){ + $scope.filteredList.push(item); + } + }); + var ActivityID = $scope.filteredList[0].ActivityID; + }else{ + var ActivityID = ''; + } + // console.log(ActivityID,'ActivityID'); $scope.controller = 'ng-controller="callTrackingCtrl"'; var lead = { method: 'POST', - url: apiPoint.url + 'getTrackingLeadDetails/', + url: apiPoint.url + 'getTrackingLeadDetails2/', headers: { 'Content-Type': 'application/json' }, @@ -912,14 +1049,29 @@ $scope.GetstaffwiseDetails($scope.tod); requestedBy: JSON.parse(sessionStorage.getItem('localObj')).localUserID, branchID:JSON.parse(sessionStorage.getItem('localObj')).localBranchID, userType:JSON.parse(sessionStorage.getItem('localObj')).localType, + activity:ActivityID } }; $http(lead).then(function (response) { - if (response.data.status==200) { - console.log('Here',response.data); - console.log('$scope.search3.ActivityName',$scope); - $rootScope.activity = response.data.activityDetails; - $rootScope.status = response.data.statusDetails; + console.log('i got the response'); + + if (response.data.status==200) { + // if($scope.search3_activity){ + // $scope.fS = $filter('filter')(response.data.activityDetails, {'activityName':$scope.search3_activity}); + // console.log($scope.fS); + // console.log($scope.fS['activityStatus']); + // }else{ + // $scope.fS = response.data.activityDetails; + // } + // var filteredList = $filter('filter')(response.data.activityDetails, function (i) { + // return (i.activityName == $scope.search3_activity); + // }); + // $scope.filteredList = []; + // if($scope.search3_activity!='' && $scope.search3_activity!=null && $scope.search3_activity!=undefined){ + // } + // console.log($scope.filteredList); + $rootScope.activity = $scope.search3_activity; + $rootScope.statusDetails = response.data.statusDetails; $rootScope.staffDetails = response.data.staffDetails; $rootScope.studentDetails = $scope.selectedLeadID; // $scope.modalopen($scope.activity); @@ -950,7 +1102,6 @@ $scope.GetstaffwiseDetails($scope.tod); } }]); - /* * lead controller * */ diff --git a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js index bc24b50d..7a7c89af 100755 --- a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js @@ -7,39 +7,38 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope", */ $scope.userType=JSON.parse(sessionStorage.getItem('localObj')).localType; $scope.isTblShow = false; -$scope.isLoader = false; -$scope.isLoaderShow = false; -$scope.isLoaderShow1 =false; -$scope.isLoaderTxt = "Loading..."; -$scope.generateButtonTxt = "GENERATE"; -$scope.generateButtonStatus = false; - $scope.currentPage = 1; - $scope.myModel = { - - "date": new Date(), - "activity": "", - "assignedTo": "", - "status": "", - "referedBy": '', - "comments":'', - "enquiryStatus":'', - - "important":false, - "branch":"", - - }; + $scope.isLoader = false; + $scope.isLoaderShow = false; + $scope.isLoaderShow1 =false; + $scope.isLoaderTxt = "Loading..."; + $scope.generateButtonTxt = "GENERATE"; + $scope.generateButtonStatus = false; + $scope.currentPage = 1; + $scope.myModel = { + + "date": new Date(), + "activity": "", + "assignedTo": "", + "status": "", + "referedBy": '', + "comments":'', + "enquiryStatus":'', + "important":false, + "branch":"", + + }; - //get current date - $scope.hideDateSearch=true; - $scope.modifyMinDate = moment(); - //$scope.minDate = $filter('date')($scope.modifyMinDate, 'MM-dd-yyyy'); - $scope.currentDate=$filter('date')(new Date(), 'dd-MM-yyyy'); - // get 30 plus date for follwup details - $scope.modifyDate = moment(); - $scope.modifyDate.add(30, 'days'); - $scope.futureDate = $filter('date')($scope.modifyDate, 'dd-MM-yyyy'); - $scope.myModel.date=$scope.currentDate; - // console.log($scope.currentDate); + //get current date + $scope.hideDateSearch=true; + $scope.modifyMinDate = moment(); + //$scope.minDate = $filter('date')($scope.modifyMinDate, 'MM-dd-yyyy'); + $scope.currentDate=$filter('date')(new Date(), 'dd-MM-yyyy'); + // get 30 plus date for follwup details + $scope.modifyDate = moment(); + $scope.modifyDate.add(30, 'days'); + $scope.futureDate = $filter('date')($scope.modifyDate, 'dd-MM-yyyy'); + $scope.myModel.date=$scope.currentDate; + // console.log($scope.currentDate); /** * End of the call tracking */ @@ -198,6 +197,7 @@ $scope.generateButtonStatus = false; }; $scope.$watch(function () { $scope.filteredItems = $scope.$eval(" markcard_data | filter: search "); + console.log('Watch',$scope.filteredItems); }); /** * Auto Call Tracking Sriram diff --git a/Apollo/assets/views/autoCalltracking2.html b/Apollo/assets/views/autoCalltracking2.html index 24a05784..0751121c 100644 --- a/Apollo/assets/views/autoCalltracking2.html +++ b/Apollo/assets/views/autoCalltracking2.html @@ -44,15 +44,14 @@ --> - +
- +
- +
- +