add tracking view in studentdetails

This commit is contained in:
gayathri1990 2018-10-15 13:25:14 +05:30
parent 1ca4ee5b4a
commit 82763ba35b
6 changed files with 58 additions and 32 deletions

View File

@ -37,27 +37,23 @@ class Student_model extends CI_Model {
}
public function get_student_tracking_details($universityid,$courseid,$MobileNumber,$loginBranch)
{
$this->db->select ('LTF.FollowupOn,LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,LT.Flag,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName,LTF.FollowupComments');
$this->db->from(LEAD_TRACKING_FOLLOWUP.' as LTF');
$this->db->join(LEAD_TRACKING.' as LT','LT.TrackingID=LTF.TrackingID');
$this->db->join(LEAD_DETAILS.' as LD', 'LT.LeadID = LD.LeadID');
$this->db->join(LOGIN.' as LO', 'LO.ID = LT.AssignedTo');
$this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID');
$this->db->join(ACTIVITY.' as AV', 'AV.ActivityID = LT.ActivityStatus');
$this->db->join(PICK_LIST_DETAILS.' as PLD1', 'PLD1.ListCode = LT.StatusCode');
$this->db->join(UNIVERSITY.' as UM','UM.UniversityName=LT.University');
$this->db->join(COURSE.' as CM','CM.CourseName=LT.Course');
$this->db->where('LD.MobileNumber',$MobileNumber);
$this->db->where('PLD1.BranchCode',$loginBranch);
$this->db->where('UM.UniversityID',$universityid);
$this->db->where('CM.CourseID',$courseid);
//$this->db->group by('LD.LeadID');
$this->db->group_by('LD.LeadID');
$trackingDetails=$this->db->get()->result_array();
$result =$trackingDetails;
return $result;
}
$sql="SELECT LTF.FollowupOn,LD.LeadID,LTF.InteractionId, LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry, LT.TrackingID, LT.ActivityStatus,LT.AssignedTo, LT.StatusCode, LT.University, LT.Course, LT.AlternateMobile, LT.Address,LT.Flag, ST.StaffID, ST.Firstname, PLD1.ListCode as statusListCode, PLD1.ListName as statusListName, AV.ActivityID ,AV.ActivityName, LTF.FollowupComments
FROM T_Lead_Tracking_Followup as LTF
JOIN T_Lead_Tracking as LT ON LT.TrackingID=LTF.TrackingID
JOIN T_Lead_Details as LD ON LT.LeadID = LD.LeadID
JOIN T_Login as LO ON LO.ID = LT.AssignedTo
JOIN T_StaffDetails as ST ON ST.StaffID = LO.StaffID
JOIN T_ActivityMaster as AV ON AV.ActivityID = LT.ActivityStatus
JOIN T_PickListDetails as PLD1 ON PLD1.ListCode = LT.StatusCode
JOIN T_UniversityMaster as UM ON UM.UniversityName=LT.University
JOIN T_CourseMaster as CM ON CM.CourseName=LT.Course
WHERE LD.MobileNumber = '".$MobileNumber."' AND PLD1.BranchCode= '".$loginBranch."' AND UM.UniversityID = '".$universityid."' AND CM.CourseID = '".$courseid."' AND LTF.InteractionId in (select max(InteractionId) from T_Lead_Tracking_Followup GROUP BY TrackingID)";
$b=$this->db->query($sql);
$trackingDetails = $b->result();
$result =$trackingDetails;
return $result;
}
// get student list based on login user
public function get_student_list($loginUserId, $loginUserBranchId, $loginUserType, $getSearchData,$batchcode) {
if ($loginUserType == SUPER_ADMIN) {

View File

@ -1660,6 +1660,21 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
};
$rootScope.loadFollowupDetails = function (trackID) {
if(trackID==null || trackID=='')
{
$scope.value = $rootScope.trackingid;
$scope.showprev = false;
$scope.shownext = false;
console.log($scope.value);
}
else
{
$scope.value = trackID;
$scope.showprev = true;
$scope.shownext =true;
console.log($scope.value);
}
var load = {
method: 'POST',
url: apiPoint.url + 'loadFollowupDetails/',
@ -1667,7 +1682,7 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
'Content-Type': 'application/json'
},
data: {
trackingID: trackID,
trackingID: $scope.value,
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
@ -1810,9 +1825,10 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
} else {
swal("Failed!", response.data.message, "error");
}
});
localStorage.removeItem('trackID');
}
/*
@ -1836,6 +1852,11 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
* created by kms
* */
$scope.cancel = function () {
$scope.valvo = $rootScope.trackingid;
if($scope.valvo!='')
{
$state.go('app.call.tracking');
}
if(JSON.parse(localStorage.getItem('searchObj')).callFrom=='details'){
$state.go('app.call.tracking');
}

View File

@ -1926,7 +1926,7 @@ $scope.allcourselist ='';
$scope.courseEditLoading = true;
$scope.courselist = true;
}
$scope.setEditTrackingId = function (uniqe_id,courseid,universityid,MobileNumber) {
$scope.setEditTrackingId = function (uniqe_id,courseid,universityid,MobileNumber) {
$scope.list = false;
@ -1940,7 +1940,13 @@ $scope.allcourselist ='';
$scope.trackingdetails = true;
}
$scope.TrackingDetails = function (s) {
$rootScope.trackingid=s.TrackingID;
$state.go('app.call.trackingFollowup');
}
$scope.cancelnotification = function()
@ -2159,7 +2165,7 @@ $scope.allcourselist ='';
}
});
}
$scope.getStudentTrackingDetails = function (courseid,universityid,MobileNumber)
$scope.getStudentTrackingDetails = function (courseid,universityid,MobileNumber)
{
$scope.trackingEditLoading = true;
@ -2196,6 +2202,7 @@ $scope.allcourselist ='';
});
}
$scope.stuCourseEditDetailsObj = {};
$scope.onSlecetUnivEdit = function (univid, coursid) {

View File

@ -32,11 +32,11 @@
<paneltool class="panel-tools" tool-collapse="tool-collapse" tool-refresh="load1" tool-dismiss="tool-dismiss"></paneltool>
</div>
<div class="col-md-6 text-right">
<button type="submit" tabindex="1" class="btn btn-sm btn-azure" ng-click="previous(followupDetails.TrackingID);">
<div class="col-md-6 text-right">
<button type="submit" tabindex="1" class="btn btn-sm btn-azure" ng-show="showprev" ng-click="previous(followupDetails.TrackingID);">
Previous
</button>
<button type="submit" tabindex="2" class="btn btn-sm btn-azure" ng-click="next(followupDetails.TrackingID);">
<button type="submit" tabindex="2" class="btn btn-sm btn-azure" ng-show="shownext" ng-click="next(followupDetails.TrackingID);">
Next
</button>
<button type="submit" tabindex="3" class="btn btn-sm btn-warning" ng-click="cancel();">

View File

@ -15,10 +15,12 @@
</legend>
<!--list of course details : start-->
<div>
<table class="table">
<table class="table table-hover" >
<thead>
<tr>
<th> ID </th>
<th ng-click="sort('TrackingID')"> ID
<span class="glyphicon sort-icon" ng-show="sortKey=='TrackingID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>Followup</th>
<th> Name </th>
<th>Mobile </th>
@ -32,7 +34,7 @@
</thead>
<tbody >
<tr ng-repeat="s in trackingDetails">
<td>{{s.TrackingID}}
<td><a tooltip="Click To View" class="text-orange" ng-click="TrackingDetails(s);">{{s.TrackingID}}</a></td>
<td>{{s.FollowupOn}}</td>
<td>{{s.LeadName}}</td>
<td>{{s.MobileNumber}}</td>

View File

@ -278,7 +278,7 @@
<i class="ti-user" tooltip="Personal Details" id="personalDetailButton" ng-click="setEditId(p.Student_Course_id, p.StudentID);"></i>
<!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">-->
<i class="ti-write" tooltip="Course Details" ng-click="setEditCourseId(p.Student_Course_id, p.StudentID);"></i>
<i class="ti-timer" tooltip="Tracking Details" ng-click="setEditTrackingId(p.Student_Course_id,p.CourseID,p.UniversityID, p.MobileNumber);"></i>
<i class="ti-location-pin " tooltip="Tracking Details" ng-click="setEditTrackingId(p.Student_Course_id,p.CourseID,p.UniversityID, p.MobileNumber);"></i>
<i class="fa fa-envelope-o" tooltip="Sent Message/Email Details" ng-click="setmessageId(p);"></i>
</td>