Merge branch 'master' of https://bitbucket.org/venbainformationtechnology/apollodec
This commit is contained in:
commit
cae1beaa2c
@ -56,7 +56,9 @@ class Call_Tracking_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
$requestedBy = $this->post('requestedBy');
|
$requestedBy = $this->post('requestedBy');
|
||||||
$mobileNumber = $this->post('mobileNumber');
|
$mobileNumber = $this->post('mobileNumber');
|
||||||
$getLeadDetails = $this->Calltracking_model->getLeadDetails($requestedBy,$mobileNumber);
|
$branchID = $this->post('branchID');
|
||||||
|
$loginType = $this->post('userType');
|
||||||
|
$getLeadDetails = $this->Calltracking_model->getLeadDetails($requestedBy,$mobileNumber,$branchID,$loginType);
|
||||||
|
|
||||||
if ($getLeadDetails)
|
if ($getLeadDetails)
|
||||||
{
|
{
|
||||||
@ -139,7 +141,7 @@ class Call_Tracking_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
$search['requestedBy'] = $this->post('requestedBy');
|
$search['requestedBy'] = $this->post('requestedBy');
|
||||||
$search['requestedDept'] = $this->post('requestedDept');
|
$search['requestedDept'] = $this->post('requestedDept');
|
||||||
$search['branchID'] = $this->post('branchId');
|
// $search['branchID'] = $this->post('branchId');
|
||||||
$search['searchDate'] = $this->post('searchDate');
|
$search['searchDate'] = $this->post('searchDate');
|
||||||
$search['CreatedBranch'] = $this->post('branchId');
|
$search['CreatedBranch'] = $this->post('branchId');
|
||||||
// $search['searchMobileNumber'] = $this->post('searchMobileNumber');
|
// $search['searchMobileNumber'] = $this->post('searchMobileNumber');
|
||||||
@ -176,6 +178,7 @@ class Call_Tracking_Controller extends REST_Controller {
|
|||||||
$update_followup_details['TrackingID'] = $this->post('trackingID');
|
$update_followup_details['TrackingID'] = $this->post('trackingID');
|
||||||
$update_followup_details['UpdatedBy'] = $this->post('updatedBy');
|
$update_followup_details['UpdatedBy'] = $this->post('updatedBy');
|
||||||
$update_followup_details['StatusCode'] = $this->post('status');
|
$update_followup_details['StatusCode'] = $this->post('status');
|
||||||
|
$update_followup_details['AssignedTo'] = $this->post('assignedTo');
|
||||||
$update_followup_details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
|
$update_followup_details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
// store followup details for insert
|
// store followup details for insert
|
||||||
@ -217,6 +220,8 @@ class Call_Tracking_Controller extends REST_Controller {
|
|||||||
$get_details['TrackingID'] = $this->post('trackingID');
|
$get_details['TrackingID'] = $this->post('trackingID');
|
||||||
$get_details['UpdatedBy'] = $this->post('updatedBy');
|
$get_details['UpdatedBy'] = $this->post('updatedBy');
|
||||||
$get_details['CreatedBranch'] = $this->post('branchId');
|
$get_details['CreatedBranch'] = $this->post('branchId');
|
||||||
|
$get_details['requestedDept'] = $this->post('requestedDept');
|
||||||
|
|
||||||
$getLoadDetails = $this->Calltracking_model->getLoadFollowupDetails($get_details);
|
$getLoadDetails = $this->Calltracking_model->getLoadFollowupDetails($get_details);
|
||||||
|
|
||||||
if ($getLoadDetails)
|
if ($getLoadDetails)
|
||||||
@ -245,6 +250,8 @@ class Call_Tracking_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
$search['requestedBy'] = $this->post('requestedBy');
|
$search['requestedBy'] = $this->post('requestedBy');
|
||||||
$search['BranchID'] = $this->post('branchId');
|
$search['BranchID'] = $this->post('branchId');
|
||||||
|
$search['requestedDept'] = $this->post('requestedDept');
|
||||||
|
|
||||||
$getdashBoardCallDetails = $this->Calltracking_model->getDashboardTrackingDetails($search);
|
$getdashBoardCallDetails = $this->Calltracking_model->getDashboardTrackingDetails($search);
|
||||||
if ($getdashBoardCallDetails)
|
if ($getdashBoardCallDetails)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class Calltracking_model extends CI_Model {
|
|||||||
* @params mobile number,requestedby
|
* @params mobile number,requestedby
|
||||||
* created by kms
|
* created by kms
|
||||||
* */
|
* */
|
||||||
public function getLeadDetails($requestedBy=null,$mobileNumber=null)
|
public function getLeadDetails($requestedBy=null,$mobileNumber=null,$branchID=null,$userType=null)
|
||||||
{
|
{
|
||||||
$this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.ActivityStatus,LT.AssignedTo,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address');
|
$this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.ActivityStatus,LT.AssignedTo,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address');
|
||||||
$this->db->from(LEAD_DETAILS.' as LD');
|
$this->db->from(LEAD_DETAILS.' as LD');
|
||||||
@ -63,7 +63,7 @@ class Calltracking_model extends CI_Model {
|
|||||||
//$result_array['universityDetails']=$this->getUniversityDetails();
|
//$result_array['universityDetails']=$this->getUniversityDetails();
|
||||||
$result_array['activityDetails']=$this->getActivityDetails();
|
$result_array['activityDetails']=$this->getActivityDetails();
|
||||||
// $result_array['statusDetails']=$this->getStatus();
|
// $result_array['statusDetails']=$this->getStatus();
|
||||||
$result_array['staffDetails']=$this->getStaff("1");
|
$result_array['staffDetails']=$this->getStaff("1",$branchID,$userType,$requestedBy);
|
||||||
return $result_array;
|
return $result_array;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -175,12 +175,19 @@ class Calltracking_model extends CI_Model {
|
|||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
|
|
||||||
public function getStaff($status=null)
|
public function getStaff($status=null,$branchID=null,$userType=null,$requestedBy)
|
||||||
{
|
{
|
||||||
$this->db->select('LO.ID,ST.StaffID,ST.Firstname');
|
$this->db->select('LO.ID,ST.StaffID,ST.Firstname');
|
||||||
$this->db->from(LOGIN.' as LO');
|
$this->db->from(LOGIN.' as LO');
|
||||||
$this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID');
|
$this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID');
|
||||||
$this->db->where('ST.IsActive',$status);
|
$this->db->where('ST.IsActive',$status);
|
||||||
|
if($userType== ADMIN){
|
||||||
|
$this->db->where('ST.BranchCode',$branchID);
|
||||||
|
$this->db->where('LO.ListCode !=',SUPER_ADMIN);
|
||||||
|
}
|
||||||
|
if($userType== EMPLOYEE){
|
||||||
|
$this->db->where('LO.ID',$requestedBy);
|
||||||
|
}
|
||||||
$staffDetails=$this->db->get();
|
$staffDetails=$this->db->get();
|
||||||
if($staffDetails){
|
if($staffDetails){
|
||||||
$result_staff = array();
|
$result_staff = array();
|
||||||
@ -264,6 +271,11 @@ class Calltracking_model extends CI_Model {
|
|||||||
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
|
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if ($search['requestedDept'] == EMPLOYEE){
|
||||||
|
|
||||||
|
$this->db->where('LT.AssignedTo', $search['requestedBy']);
|
||||||
|
|
||||||
|
}
|
||||||
if($search['searchDate']!='' OR $search['searchDate']!=null){
|
if($search['searchDate']!='' OR $search['searchDate']!=null){
|
||||||
/* if(sizeof($search['searchDate']) == '1'){
|
/* if(sizeof($search['searchDate']) == '1'){
|
||||||
$this->db->where('LTF.FollowupOn <= ', $search['searchDate'][0]);
|
$this->db->where('LTF.FollowupOn <= ', $search['searchDate'][0]);
|
||||||
@ -348,6 +360,11 @@ class Calltracking_model extends CI_Model {
|
|||||||
if($search['CreatedBranch'] !='All'){
|
if($search['CreatedBranch'] !='All'){
|
||||||
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
|
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($search['requestedDept'] == EMPLOYEE){
|
||||||
|
|
||||||
|
$this->db->where('LT.AssignedTo', $search['requestedBy']);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(($search['searchDate']!='' OR $search['searchDate']!=null) AND sizeof($search['searchDate']) == '1'){
|
if(($search['searchDate']!='' OR $search['searchDate']!=null) AND sizeof($search['searchDate']) == '1'){
|
||||||
|
|
||||||
@ -492,6 +509,11 @@ class Calltracking_model extends CI_Model {
|
|||||||
if($trackingID['CreatedBranch'] !='All'){
|
if($trackingID['CreatedBranch'] !='All'){
|
||||||
$this->db->where('LT.CreatedBranch', $trackingID['CreatedBranch']);
|
$this->db->where('LT.CreatedBranch', $trackingID['CreatedBranch']);
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($trackingID['requestedDept'] == EMPLOYEE){
|
||||||
|
|
||||||
|
$this->db->where('LT.AssignedTo', $trackingID['UpdatedBy']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$leadDet=$this->db->get();
|
$leadDet=$this->db->get();
|
||||||
@ -520,7 +542,7 @@ class Calltracking_model extends CI_Model {
|
|||||||
$tracking_array["AlternateMobile"]=$row->AlternateMobile;
|
$tracking_array["AlternateMobile"]=$row->AlternateMobile;
|
||||||
$tracking_array["Address"]=$row->Address;
|
$tracking_array["Address"]=$row->Address;
|
||||||
$tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID);
|
$tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID);
|
||||||
$tracking_array["collectTrackedID"]=$this->getStudentTrackedID($row->MobileNumber,$trackingID['CreatedBranch']);
|
$tracking_array["collectTrackedID"]=$this->getStudentTrackedID($row->MobileNumber,$trackingID['CreatedBranch'],$trackingID['requestedDept'],$trackingID['UpdatedBy']);
|
||||||
|
|
||||||
$result[]=$tracking_array;
|
$result[]=$tracking_array;
|
||||||
|
|
||||||
@ -528,6 +550,9 @@ class Calltracking_model extends CI_Model {
|
|||||||
}
|
}
|
||||||
$result_array['trackingDetails']=$result;
|
$result_array['trackingDetails']=$result;
|
||||||
$result_array['statusDetails']=$this->getStatus($activityID);
|
$result_array['statusDetails']=$this->getStatus($activityID);
|
||||||
|
$result_array['staffDetails']=$this->getStaff("1",$trackingID['CreatedBranch'],$trackingID['requestedDept'],$trackingID['UpdatedBy']);
|
||||||
|
|
||||||
|
|
||||||
$result_array['trackingDetails']=$result;
|
$result_array['trackingDetails']=$result;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -546,7 +571,7 @@ class Calltracking_model extends CI_Model {
|
|||||||
* @params mobile number
|
* @params mobile number
|
||||||
* created by kms
|
* created by kms
|
||||||
* */
|
* */
|
||||||
public function getStudentTrackedID($stuMobile=null,$branchId=null)
|
public function getStudentTrackedID($stuMobile=null,$branchId=null,$reqDept=null,$updatedBy=null)
|
||||||
{
|
{
|
||||||
$this->db->distinct();
|
$this->db->distinct();
|
||||||
$this->db->select('LT.TrackingID,LT.LeadID,AV.ActivityID,AV.ActivityName,PLD.ListName');
|
$this->db->select('LT.TrackingID,LT.LeadID,AV.ActivityID,AV.ActivityName,PLD.ListName');
|
||||||
@ -555,9 +580,15 @@ class Calltracking_model extends CI_Model {
|
|||||||
$this->db->join(ACTIVITY.' as AV', 'AV.ActivityID = LT.ActivityStatus');
|
$this->db->join(ACTIVITY.' as AV', 'AV.ActivityID = LT.ActivityStatus');
|
||||||
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = LT.StatusCode');
|
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = LT.StatusCode');
|
||||||
$this->db->where('LD.MobileNumber',$stuMobile);
|
$this->db->where('LD.MobileNumber',$stuMobile);
|
||||||
|
|
||||||
if($branchId !='All'){
|
if($branchId !='All'){
|
||||||
$this->db->where('LT.CreatedBranch', $branchId);
|
$this->db->where('LT.CreatedBranch', $branchId);
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($reqDept == EMPLOYEE){
|
||||||
|
|
||||||
|
$this->db->where('LT.AssignedTo', $updatedBy);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->order_by('LT.TrackingID','ASC');
|
$this->db->order_by('LT.TrackingID','ASC');
|
||||||
@ -634,6 +665,11 @@ class Calltracking_model extends CI_Model {
|
|||||||
if($search['BranchID'] !='All'){
|
if($search['BranchID'] !='All'){
|
||||||
$this->db->where('LT.CreatedBranch', $search['BranchID']);
|
$this->db->where('LT.CreatedBranch', $search['BranchID']);
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($search['requestedDept'] == EMPLOYEE){
|
||||||
|
|
||||||
|
$this->db->where('LT.AssignedTo', $search['requestedBy']);
|
||||||
|
|
||||||
}
|
}
|
||||||
$this->db->where('LTF.FollowupOn',$todayDate);
|
$this->db->where('LTF.FollowupOn',$todayDate);
|
||||||
$trackDetails=$this->db->get();
|
$trackDetails=$this->db->get();
|
||||||
@ -680,6 +716,11 @@ class Calltracking_model extends CI_Model {
|
|||||||
if($search['BranchID'] !='All'){
|
if($search['BranchID'] !='All'){
|
||||||
$this->db->where('LT.CreatedBranch', $search['BranchID']);
|
$this->db->where('LT.CreatedBranch', $search['BranchID']);
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($search['requestedDept'] == EMPLOYEE){
|
||||||
|
|
||||||
|
$this->db->where('LT.AssignedTo', $search['requestedBy']);
|
||||||
|
|
||||||
}
|
}
|
||||||
$this->db->like('LD.CreatedOn', $todayDate, 'after');
|
$this->db->like('LD.CreatedOn', $todayDate, 'after');
|
||||||
$trackDetails=$this->db->get();
|
$trackDetails=$this->db->get();
|
||||||
@ -727,6 +768,11 @@ class Calltracking_model extends CI_Model {
|
|||||||
if($search['BranchID'] !='All'){
|
if($search['BranchID'] !='All'){
|
||||||
$this->db->where('LT.CreatedBranch', $search['BranchID']);
|
$this->db->where('LT.CreatedBranch', $search['BranchID']);
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($search['requestedDept'] == EMPLOYEE){
|
||||||
|
|
||||||
|
$this->db->where('LT.AssignedTo', $search['requestedBy']);
|
||||||
|
|
||||||
}
|
}
|
||||||
$trackDetails=$this->db->get();
|
$trackDetails=$this->db->get();
|
||||||
|
|
||||||
|
|||||||
@ -267,7 +267,9 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
mobileNumber:mobile
|
mobileNumber:mobile,
|
||||||
|
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
|
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$http(lead).then(function (response) {
|
$http(lead).then(function (response) {
|
||||||
@ -1190,6 +1192,7 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
|||||||
trackingID: followupDetails.TrackingID,
|
trackingID: followupDetails.TrackingID,
|
||||||
date: $scope.nextFollowupDate,
|
date: $scope.nextFollowupDate,
|
||||||
status: myModel1.status,
|
status: myModel1.status,
|
||||||
|
assignedTo: myModel1.assignStaff,
|
||||||
comments: myModel1.comments,
|
comments: myModel1.comments,
|
||||||
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
@ -1219,7 +1222,9 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
|||||||
data: {
|
data: {
|
||||||
trackingID: trackID,
|
trackingID: trackID,
|
||||||
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
|
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1234,8 +1239,11 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
|||||||
$rootScope.modifyDate1 = moment();
|
$rootScope.modifyDate1 = moment();
|
||||||
$rootScope.modifyDate1.add(30, 'days');
|
$rootScope.modifyDate1.add(30, 'days');
|
||||||
$rootScope.futureDate1 = $filter('date')($scope.modifyDate1, 'dd-MM-yyyy');
|
$rootScope.futureDate1 = $filter('date')($scope.modifyDate1, 'dd-MM-yyyy');
|
||||||
$rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
// $rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||||
$rootScope.trackingStatus=response.data.statusDetails;
|
$rootScope.trackingStatus=response.data.statusDetails;
|
||||||
|
$rootScope.myModel1.assignStaff=$rootScope.followupDetails.AssignedTo;
|
||||||
|
$rootScope.staffDetails=response.data.staffDetails;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
swal("Failed!", response.data.message, "error");
|
swal("Failed!", response.data.message, "error");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,8 @@ app.controller('dashboardCtrl', ["$scope","$rootScope", "toaster", "$filter", "n
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
|
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -151,13 +151,26 @@
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Assigned To</td>
|
||||||
|
<td>
|
||||||
|
<select class="form-control" name="status" id="Box4" tabindex="1"
|
||||||
|
ng-model="myModel1.assignStaff"
|
||||||
|
ng-options="checkStaf.loginId as checkStaf.staffName for checkStaf in staffDetails"
|
||||||
|
required>
|
||||||
|
|
||||||
|
<!-- <option value="">Select Status</option>-->
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<td>Status</td>
|
||||||
<!--
|
<!--
|
||||||
<td><span class="label label-sm label-info">{{followupDetails.statusListName}}</span></td>
|
<td><span class="label label-sm label-info">{{followupDetails.statusListName}}</span></td>
|
||||||
-->
|
-->
|
||||||
<td>
|
<td>
|
||||||
<select class="form-control" name="status" id="Box3" tabindex="1"
|
<select class="form-control" name="status" id="Box3" tabindex="2"
|
||||||
ng-model="myModel1.status"
|
ng-model="myModel1.status"
|
||||||
ng-options="checkStatus.ListCode as checkStatus.ListName for checkStatus in trackingStatus"
|
ng-options="checkStatus.ListCode as checkStatus.ListName for checkStatus in trackingStatus"
|
||||||
required>
|
required>
|
||||||
|
|||||||
@ -123,7 +123,7 @@
|
|||||||
<div class="panel-scroll height-180" perfect-scrollbar wheel-propagation="false" suppress-scroll-x="true" ng-if="emptyDataLead==false">
|
<div class="panel-scroll height-180" perfect-scrollbar wheel-propagation="false" suppress-scroll-x="true" ng-if="emptyDataLead==false">
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><td colspan="5" style="background:#DD5A82;color:#fff !important">Total Entries :{{leadDetails.length}}</td></tr>
|
<tr><td colspan="6" style="background:#DD5A82;color:#fff !important">Total Entries :{{leadDetails.length}}</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Tracking ID</th>
|
<th>Tracking ID</th>
|
||||||
<th>Lead Name</th>
|
<th>Lead Name</th>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user