trackingdetails in studentview
This commit is contained in:
parent
a7129dfdde
commit
a2a1eb914f
@ -123,8 +123,10 @@ class Student_Controller extends REST_Controller {
|
||||
$universityid=$this->post('universityid');
|
||||
$courseid=$this->post('courseid');
|
||||
$MobileNumber = $this->post('MobileNumber');
|
||||
$loginBranch=$this->post('loginBranch');
|
||||
$trackingDetails = $this->student_model->get_student_tracking_details($universityid,$courseid,$MobileNumber,$loginBranch); // Check if the employee exist
|
||||
$loginBranch=$this->post('loginBranch');//CH001//
|
||||
$userType =$this->post('userType');
|
||||
$createdBy =$this->post('createdBy');
|
||||
$trackingDetails = $this->student_model->get_student_tracking_details($universityid,$courseid,$MobileNumber,$loginBranch,$userType,$createdBy); // Check if the employee exist
|
||||
if ($trackingDetails) {
|
||||
|
||||
$trackingDetailsData['trackingdata']=$trackingDetails;
|
||||
|
||||
@ -793,7 +793,8 @@ class Calltracking_model extends CI_Model {
|
||||
if($leadDet){
|
||||
$result_array = array();
|
||||
$result_array['followupStatus']=true;
|
||||
|
||||
$result='';
|
||||
$activityID='';
|
||||
foreach ($leadDet->result() as $row)
|
||||
{
|
||||
$activityID = $row->ActivityStatus;
|
||||
|
||||
@ -35,8 +35,9 @@ class Student_model extends CI_Model {
|
||||
$result['branch_active_status'] = $statusDetails->IsActive;
|
||||
return $result;
|
||||
}
|
||||
public function get_student_tracking_details($universityid,$courseid,$MobileNumber,$loginBranch)
|
||||
public function get_student_tracking_details($universityid,$courseid,$MobileNumber,$loginBranch,$userType,$createdBy)
|
||||
{
|
||||
|
||||
$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
|
||||
@ -47,8 +48,31 @@ class Student_model extends CI_Model {
|
||||
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)";
|
||||
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)";
|
||||
|
||||
// if($loginBranch !='All' AND $userType != EMPLOYEE){
|
||||
// $this->db->where('LT.CreatedBranch', $loginBranch);
|
||||
|
||||
// }
|
||||
if($loginBranch !='All' AND $userType != EMPLOYEE)
|
||||
{
|
||||
$sql.=" and LT.CreatedBranch = '".$loginBranch."'";
|
||||
}
|
||||
if ($userType == EMPLOYEE){
|
||||
|
||||
$sql.=" and LT.AssignedTo = '".$createdBy."' and LT.CreatedBranch='".$loginBranch."'";
|
||||
|
||||
}
|
||||
// if ($userType == EMPLOYEE){
|
||||
|
||||
// $this->db->where('LT.AssignedTo', $createdBy);
|
||||
// $this->db->where('LT.CreatedBranch', $loginBranch);
|
||||
// $this->db->where('PLD1.ListName','OPEN');
|
||||
// $this->db->order_by('LTF.FollowupOn','DESC');
|
||||
// $this->db->group_by('LT.TrackingID');
|
||||
|
||||
// }
|
||||
|
||||
$b=$this->db->query($sql);
|
||||
$trackingDetails = $b->result();
|
||||
$result =$trackingDetails;
|
||||
@ -360,7 +384,7 @@ class Student_model extends CI_Model {
|
||||
$StuStatus = $getSearchData['Status'];
|
||||
if ($StuStatus == '') {
|
||||
if ($University != '' && $Course == '' && $batchcode=='') {
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode, C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,U.UniversityID,C.CourseCode, C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -373,7 +397,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
ORDER BY S.CreatedOn";
|
||||
} else if ($University != '' && $Course != '' && $batchcode=='') {
|
||||
$subQuery = "SELECT S.* , SC.id as Student_Course_id , U.UniversityName,C.CourseCode, C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.* , SC.id as Student_Course_id , U.UniversityName,U.UniversityID,C.CourseCode, C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -389,7 +413,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
else if($University !='' && $Course == '' && $batchcode!='')
|
||||
{
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseCode,C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseCode,C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -412,7 +436,7 @@ class Student_model extends CI_Model {
|
||||
else if($University !=''&&$Course != '' && $batchcode !='')
|
||||
{
|
||||
|
||||
$subQuery = "SELECT S.* , SC.id as Student_Course_id , U.UniversityName,C.CourseCode, C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.* , SC.id as Student_Course_id , U.UniversityName,C.CourseCode,U.UniversityID, C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -435,7 +459,7 @@ class Student_model extends CI_Model {
|
||||
else
|
||||
{
|
||||
if ($University != '' && $Course == '' && $batchcode =='') {
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode, C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode, U.UniversityID,C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -450,7 +474,7 @@ class Student_model extends CI_Model {
|
||||
}
|
||||
else if ($University != '' && $Course != '' && $batchcode =='')
|
||||
{
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode, C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode,U.UniversityID, C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -469,7 +493,7 @@ class Student_model extends CI_Model {
|
||||
else if($University != '' && $Course == '' && $batchcode !='')
|
||||
{
|
||||
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName, C.CourseCode,C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseCode,C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -495,7 +519,7 @@ class Student_model extends CI_Model {
|
||||
{
|
||||
|
||||
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode, C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode,U.UniversityID, C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -520,7 +544,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
else
|
||||
{
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode, C.CourseName,C.CourseID
|
||||
$subQuery = "SELECT S.*, SC.id as Student_Course_id , U.UniversityName,C.CourseCode,U.UniversityID, C.CourseName,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -549,7 +573,7 @@ class Student_model extends CI_Model {
|
||||
} else if ($loginUserType == EMPLOYEE || $loginUserType == TRAINEE) {
|
||||
// list for staff
|
||||
if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') {
|
||||
$this->db->select("S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID");
|
||||
$this->db->select("S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID");
|
||||
$this->db->from('' . STUDENTCOURSE . ' as SC');
|
||||
$this->db->join('' . STUDENTS . ' as S', 'S.StudentID = SC.StudentID', 'LEFT');
|
||||
$this->db->join('' . UNIVERSITY . ' as U', 'SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode', 'LEFT');
|
||||
@ -573,7 +597,7 @@ class Student_model extends CI_Model {
|
||||
$StuStatus = $getSearchData['Status'];
|
||||
if ($StuStatus == '') {
|
||||
if ($University != '' && $Course == '' && $batchcode=='') {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -587,7 +611,7 @@ class Student_model extends CI_Model {
|
||||
GROUP BY SC.id
|
||||
ORDER BY S.CreatedOn";
|
||||
} else if ($University != '' && $Course != '' && $batchcode=='') {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -606,7 +630,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
else if ($University != '' && $Course == '' && $batchcode !='')
|
||||
{
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -630,7 +654,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
|
||||
else if ($University != '' && $Course != '' && $batchcode !='') {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -669,7 +693,7 @@ class Student_model extends CI_Model {
|
||||
// OR (SC.CourseID = '$Course' AND SC.UniversityID = '$University'))
|
||||
} else {
|
||||
if ($University != '' && $Course == '' && $batchcode=='') {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -685,7 +709,7 @@ class Student_model extends CI_Model {
|
||||
GROUP BY SC.id
|
||||
ORDER BY S.CreatedOn";
|
||||
} else if ($University != '' && $Course != '' && $batchcode=='') {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -705,7 +729,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
|
||||
else if ($University != '' && $Course == '' && $batchcode !='') {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -731,7 +755,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
|
||||
else if ($University != '' && $Course != '' && $batchcode!='') {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
@ -770,7 +794,7 @@ class Student_model extends CI_Model {
|
||||
|
||||
|
||||
else {
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName,C.CourseCode,C.CourseID
|
||||
$subQuery = "SELECT S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName,U.UniversityID, C.CourseName,C.CourseCode,C.CourseID
|
||||
FROM " . STUDENTCOURSE . " as SC
|
||||
LEFT JOIN " . STUDENTS . " as S ON SC.StudentID = S.StudentID
|
||||
LEFT JOIN " . UNIVERSITY . " as U ON SC.UniversityID = U.UniversityID AND SC.BranchID = U.BranchCode
|
||||
|
||||
@ -1659,14 +1659,28 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
}
|
||||
};
|
||||
$rootScope.loadFollowupDetails = function (trackID) {
|
||||
|
||||
// $scope.value = $rootScope.trackingid1;
|
||||
// console.log($scope.value+'caltracking');
|
||||
if(trackID==null || trackID=='')
|
||||
{
|
||||
|
||||
$scope.value = $rootScope.trackingid;
|
||||
$scope.showprev = false;
|
||||
$scope.shownext = false;
|
||||
console.log($scope.value);
|
||||
$scope.valuesa = $rootScope.trackingid;
|
||||
$scope.valuea = $rootScope.trackingid1;
|
||||
if($scope.valuesa == null || $scope.valuesa == ''||$scope.valuesa == undefined)
|
||||
{
|
||||
$scope.value=$scope.valuea;
|
||||
console.log($scope.value+'amn');
|
||||
$scope.showprev = false;
|
||||
$scope.shownext = false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$scope.value = $scope.valuesa;
|
||||
console.log($scope.value+'sa');
|
||||
$scope.showprev = false;
|
||||
$scope.shownext = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1691,6 +1705,7 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
}
|
||||
};
|
||||
$http(load).then(function (response) {
|
||||
|
||||
if (response.data.status==200 && response.data.followupStatus) {
|
||||
$rootScope.followupDetails=response.data.trackingDetails[0];
|
||||
$rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||
@ -1823,12 +1838,15 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
|
||||
|
||||
} else {
|
||||
alert('page not loaded');
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$scope.value='';
|
||||
localStorage.removeItem('trackID');
|
||||
$rootScope.trackingid='';
|
||||
$rootScope.trackingid1='';
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1852,8 +1870,10 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
* created by kms
|
||||
* */
|
||||
$scope.cancel = function () {
|
||||
$scope.valvo = $rootScope.trackingid;
|
||||
if($scope.valvo!='')
|
||||
$scope.val1 = $rootScope.trackingid;
|
||||
$scope.val2 = $rootScope.trackingid1;
|
||||
|
||||
if($scope.val1==''|| $scope.val2)
|
||||
{
|
||||
$state.go('app.call.tracking');
|
||||
}
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert) {
|
||||
app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$localStorage" , "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $localStorage, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert) {
|
||||
$scope.userType=JSON.parse(localStorage.getItem('localObj')).localType;
|
||||
/**
|
||||
* student details capture
|
||||
* by : kdk
|
||||
@ -774,9 +775,11 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
|
||||
|
||||
$scope.cancel = function () {
|
||||
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.editTrackingId=-1;
|
||||
}
|
||||
|
||||
$scope.cancelCourseDetails = function () {
|
||||
@ -785,6 +788,26 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
// $scope.editCourseId = -1;
|
||||
}
|
||||
|
||||
$scope.setEditTrackingId = function (uniqe_id,courseid,universityid,MobileNumber) {
|
||||
|
||||
$scope.getStudentTrackingDetails1(courseid,universityid,MobileNumber);
|
||||
$scope.currentStudentId = MobileNumber;
|
||||
// $scope.getStudentCourseDetails(id);
|
||||
$scope.editTrackingId = uniqe_id;
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId=-1;
|
||||
$scope.trackingEditLoading = true;
|
||||
$scope.trackingdetails = true;
|
||||
|
||||
}
|
||||
$scope.TrackingDetails = function (s) {
|
||||
|
||||
$rootScope.trackingid1=s.TrackingID;
|
||||
console.log($rootScope.trackingid1+'student');
|
||||
$state.go('app.call.trackingFollowup');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -803,7 +826,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
|
||||
//console.log(student);return false;
|
||||
|
||||
var studentID= student.StudentID;
|
||||
var studentID= student.StudentID;
|
||||
var phonenumber = student.MobileNumber;
|
||||
var email = student.EmailID;
|
||||
|
||||
@ -843,6 +866,44 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
|
||||
}
|
||||
|
||||
$scope.getStudentTrackingDetails1 = function (courseid,universityid,MobileNumber)
|
||||
{
|
||||
|
||||
$scope.trackingEditLoading = true;
|
||||
$scope.list = true;
|
||||
$scope.courseEdit = false;
|
||||
$scope.courseAdd = false;
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getStudentTrackingDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
MobileNumber: MobileNumber,
|
||||
courseid:courseid,
|
||||
universityid:universityid,
|
||||
loginBranch: localDetails.localBranchID,
|
||||
createdBy: localDetails.localUserID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
|
||||
if (response.data.status==200) {
|
||||
|
||||
$scope.trackingDetails =response.data.trackingdata;
|
||||
$scope.trackingEditLoading = false;
|
||||
// $scope.
|
||||
console.log($scope.trackingDetails);
|
||||
} else {
|
||||
|
||||
$scope.trackingdetails = false;
|
||||
$scope.trackingEditLoading='';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2187,7 +2248,7 @@ $scope.allcourselist ='';
|
||||
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
console.log(response);
|
||||
|
||||
if (response.data.status==200) {
|
||||
|
||||
$scope.trackingDetails =response.data.trackingdata;
|
||||
|
||||
@ -14,12 +14,12 @@
|
||||
Tracking Details
|
||||
</legend>
|
||||
<!--list of course details : start-->
|
||||
<div>
|
||||
<div >
|
||||
<table class="table table-hover" >
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@ -219,6 +219,7 @@
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results">
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<a tooltip="View Student" ng-click="open(p);" class="text-dark">
|
||||
{{p.MobileNumber}}
|
||||
@ -245,7 +246,7 @@
|
||||
<i class="ti-user" tooltip="Personal Details" 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-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>
|
||||
</tr>
|
||||
@ -254,6 +255,9 @@
|
||||
</tr>
|
||||
<tr ng-show="editCourseId === p.Student_Course_id" ng-if="editCourseId === p.Student_Course_id">
|
||||
<td colspan="8" ng-include src="'assets/views/student/editStudentCourseDetails.html'"></td>
|
||||
</tr>
|
||||
<tr ng-show="editTrackingId === p.Student_Course_id" ng-if="editTrackingId === p.Student_Course_id">
|
||||
<td colspan="8" ng-include src="'assets/views/student/editTrackingDetails.html'"></td>
|
||||
</tr>
|
||||
<tr ng-show="p.StudentID ==msgdetID" ng-if="p.StudentID ==msgdetID">
|
||||
<td colspan="8" ng-include src="'assets/views/student/messageDetails.html'"></td>
|
||||
|
||||
@ -272,7 +272,7 @@
|
||||
<td><span ng-if="p.IsActive == true" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">ACTIVE</span>
|
||||
<span tooltip="{{p.DeactiveComments}}" ng-if="p.IsActive == false" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">DEACTIVE</span></td>
|
||||
<td><div id="containersPara">{{p.Comments}}</div></td>
|
||||
<td style="padding-left: 2px;">
|
||||
<td style="padding-left: 1px;">
|
||||
<!--<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details"
|
||||
ng-click="setEditId(p.StudentID);">-->
|
||||
<i class="ti-user" tooltip="Personal Details" id="personalDetailButton" ng-click="setEditId(p.Student_Course_id, p.StudentID);"></i>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user