diff --git a/Apollo/api/application/controllers/StudentView_Controller.php b/Apollo/api/application/controllers/StudentView_Controller.php index 21c6ee1e..cde833f0 100755 --- a/Apollo/api/application/controllers/StudentView_Controller.php +++ b/Apollo/api/application/controllers/StudentView_Controller.php @@ -68,13 +68,9 @@ class StudentView_Controller extends REST_Controller $id = $this->post('studentID'); $comment = $this->post('comments'); - print_r($id); - print_r($comment); - die(); - $studentListDetails = 1; - + $studentListDetails = $this->studentview_model->updateStudentComment($id,$comment); if ($studentListDetails) { - // $studentListDetails['status'] = REST_Controller::HTTP_OK; + $studentListDetails['status'] = REST_Controller::HTTP_OK; // // Set the response and exit $this->response($studentListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index 308479eb..159fbac6 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -610,7 +610,7 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col - $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,LT.ReferredBy as ReferredBy'); + $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,LT.ReferredBy as ReferredBy,date_format(LT.CreatedOn,"%d-%m-%Y") as trackingDetailsCreatedOn,date_format(LD.CreatedOn,"%d-%m-%Y") as leadDetailsCreatedOn'); $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'); @@ -703,6 +703,7 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col $tracking_array["Address"]=$row->Address; $tracking_array["Comments"]=$row->FollowupComments; $tracking_array["ReferredBy"]=$row->ReferredBy; + $tracking_array["trackingDetailsCreatedOn"]=$row->trackingDetailsCreatedOn; // $tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID); // $followupDetails=$this->getTrackingFollowup($row->TrackingID); @@ -821,7 +822,7 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col - $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->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,date_format(LT.CreatedOn,"%d-%m-%Y") as trackingDetailsCreatedOn,date_format(LD.CreatedOn,"%d-%m-%Y") as leadDetailsCreatedOn'); $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'); @@ -890,6 +891,7 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col $tracking_array["AlternateMobile"]=$row->AlternateMobile; $tracking_array["Address"]=$row->Address; $tracking_array["Comments"]=$row->FollowupComments; + $tracking_array["trackingDetailsCreatedOn"]=$row->trackingDetailsCreatedOn; // $tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID); // $followupDetails=$this->getTrackingFollowup($row->TrackingID); @@ -1051,7 +1053,7 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col - $this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.CreatedBranch,LT.PendingDocStatus,BR.BranchName,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,LT.ReferredBy,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName'); + $this->db->select('LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.CreatedBranch,LT.PendingDocStatus,BR.BranchName,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,LT.ReferredBy,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName,date_format(LT.CreatedOn,"%d-%m-%Y") as trackingDetailsCreatedOn'); $this->db->from(LEAD_DETAILS.' as LD'); $this->db->join(LEAD_TRACKING.' as LT', 'LT.LeadID = LD.LeadID'); $this->db->join(LOGIN.' as LO', 'LO.ID = LT.AssignedTo'); @@ -1128,6 +1130,7 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col $tracking_array["PendingDocStatus"]=$row->PendingDocStatus; $tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID); $tracking_array["collectTrackedID"]=$this->getStudentTrackedID($row->MobileNumber,$trackingID['CreatedBranch'],$trackingID['requestedDept'],$trackingID['UpdatedBy']); + $tracking_array["trackingDetailsCreatedOn"]=$row->trackingDetailsCreatedOn; $result[]=$tracking_array; diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index dd48f3fd..3be240f5 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -24,7 +24,7 @@ class Fees_status_model extends CI_Model $this->db->join(COURSE.' as CU', 'CU.CourseID = STC.CourseID'); // $this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = STC.SessionID'); $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID'); - $this->db->join(BATCH.' as BA', 'BA.UniversityID = US.UniversityID'); + $this->db->join(BATCH.' as BA', 'BA.UniversityID = US.UniversityID AND BA.BranchCode = STC.BranchID'); $this->db->where('ST.IsActive','1'); $this->db->where('STC.IsActive','1'); if($search['requestedBranch']!='All'){ @@ -1188,10 +1188,10 @@ class Fees_status_model extends CI_Model * */ public function setFees($details=null,$jsonData=null){ - echo 'i am Here'; - print_r($details); - print_r($jsonData); - die(); + // echo 'i am Here'; + // print_r($details); + // print_r($jsonData); + // die(); $RollNo= $details['RollNo']; diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index fcc6177c..0ae90464 100755 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -1043,13 +1043,17 @@ $this->db->insert_batch('T_BroadcastStatus', $data); $studentId = $reqData['studId']; $courseId = $reqData['courseId']; // $searchTableFor = APPLICATION_FORM; - $this->db->select('t1.ID, t1.Student_Fee_Status_Id, t1.BatchCode, t1.FeeType as SemID, CFD.Sem_Year as Sem_Year, t1.RegistrationMode, t1.RegistrationType'); + $this->db->select('t1.ID, t1.Student_Fee_Status_Id, t1.BatchCode, t1.FeeType as SemID, CFD.Sem_Year as Sem_Year, t1.RegistrationMode, t1.RegistrationType,BM.BatchName,t1.CreatedOn'); $this->db->from('T_Registration_Details as t1'); $this->db->join('T_Course_Fees_Details as CFD', 'CFD.ID = t1.FeeType'); + $this->db->join('T_BatchMaster as BM', 'BM.BatchCode = t1.BatchCode'); $this->db->where('t1.StudentID', $studentId); $this->db->where('t1.CourseID', $courseId); + $this->db->group_by('t1.ID'); $fromTypes = $this->db->get(); $formTypeDetails = $fromTypes->result(); + // print_r($this->db->last_query()); + // die(); if($formTypeDetails){ // print_r($formTypeDetails);exit(); $resultArr['formTypeDetails'] = $formTypeDetails; diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index 1869606c..e95daac4 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -349,10 +349,6 @@ class Student_model extends CI_Model { $stuDetails = $this->db->query($subQuery); $checkArr = $stuDetails->result(); - -//print_r( $this->db->last_query()); -//die(); - if (count($checkArr) > 0) { $results['studentList'] = true; $results['student_details'] = $stuDetails->result(); @@ -779,22 +775,6 @@ class Student_model extends CI_Model { ORDER BY S.CreatedOn"; } - - - - - - - - - - - - - - - - else { $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,SC.IsActive as CourseActive, SC.Status CourseStatus FROM " . STUDENTCOURSE . " as SC @@ -822,6 +802,9 @@ class Student_model extends CI_Model { } else { $results['studentList'] = false; } +// print_r( $this->db->last_query()); +// die(); + return $results; } diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 2774a852..98a78f0e 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -693,19 +693,27 @@ class Studentview_model extends CI_Model } - public function updateStudentComment(){ - return 1; - // $array = (''=>); - // $this->db->where('ID', $Arr['ID']); - // $this->db->update(STUDENTS, $array); - // if ($this->db->affected_rows() == '1') { - // $result['updateUniversityStatus'] = true; - // $result['message'] = "Successfully University details Updated"; - // } else { - // $result['updateUniversityStatus'] = false; - // $result['message'] = "University details not Updated"; - // } - // return $result; + public function updateStudentComment($id,$value){ + + $Arr = array('Comments'=>$value); + $this->db->trans_start(); + $this->db->where('StudentID',$id); + $this->db->update(STUDENTS, $Arr); + $affectedRows=$this->db->affected_rows(); + $this->db->trans_complete(); + if ($this->db->trans_status() === false) { + $result = array( 'message' => 'Unable to Update details!','studCommentUpdateStatus' => false ); + } else if ($this->db->trans_status() === true) { + if($affectedRows > 0 ) { + $result = array( 'message' => 'Successfully Updated!','studCommentUpdateStatus' => true ); + } else { + $result = array( 'message' => 'No Changes, Try Again!.','studCommentUpdateStatus' => true ); + } + } + else{ + $result = array( 'message' => 'Haven`t Updated Anything,Try Again','studCommentUpdateStatus' => false ); + } + return $result; } } \ No newline at end of file diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index f2768dcc..2eaa6fd7 100755 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -3886,32 +3886,27 @@ app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", }; $scope.updateComments = function (form,details,loading) { - +var stud = details.StudentID; +var cmts = details.Comment; +console.log('stud',stud,'cmts',cmts); var update = { method: 'POST', url: apiPoint.url + 'updateStudentCommentDetails/', headers: { 'Content-Type': 'application/json' }, - data: { - studentID: details, - comments: details, - } + data: {studentID: stud,comments: cmts} }; $http(update).then(function (response) { console.log(response); - // if (response.data.status==200 && response.data.followupStatus) { - // $rootScope.loadFollowupDetails(response.data.trackingID); - // $scope.ldloading2[loading.replace('-', '_')] = false; - // $rootScope.myModel1.comments=''; - - // } else { - // $scope.ldloading[loading.replace('-', '_')] = false; - // swal("Failed!", response.data.message, "error"); - // } + if (response.data.status==200 && response.data.studCommentUpdateStatus) { + // $scope.ldloading2[loading.replace('-', '_')] = false; + swal("",response.data.message, "success"); + } else { + // $scope.ldloading[loading.replace('-', '_')] = false; + swal("Failed!", response.data.message, "error"); + } }); - - }; $scope.printStudentDetails = function (details) { diff --git a/Apollo/assets/views/callTrackingDetails.html b/Apollo/assets/views/callTrackingDetails.html index 8a9eaf6c..74c38e86 100755 --- a/Apollo/assets/views/callTrackingDetails.html +++ b/Apollo/assets/views/callTrackingDetails.html @@ -189,6 +189,7 @@ ReferredBy Comments Status + CreatedDate @@ -231,6 +232,7 @@ {{p.statusName}} + {{p.trackingDetailsCreatedOn}} diff --git a/Apollo/assets/views/callTrackingFollowup.html b/Apollo/assets/views/callTrackingFollowup.html index d34cc858..7303b026 100755 --- a/Apollo/assets/views/callTrackingFollowup.html +++ b/Apollo/assets/views/callTrackingFollowup.html @@ -234,6 +234,11 @@ + + Created Date + {{followupDetails.trackingDetailsCreatedOn}} + + diff --git a/Apollo/assets/views/report_mark_certificate_status.html b/Apollo/assets/views/report_mark_certificate_status.html index 244908c0..cc8abb6e 100755 --- a/Apollo/assets/views/report_mark_certificate_status.html +++ b/Apollo/assets/views/report_mark_certificate_status.html @@ -7,7 +7,7 @@