This commit is contained in:
gandhimathi 2018-09-27 13:02:54 +05:30
commit 2edbfc0f50
14 changed files with 223 additions and 9 deletions

View File

@ -79,6 +79,10 @@ $db['default'] = array(
'username' => 'apollod4_DEV',
'password' => 'apollo1234',
'database' => 'apollod4_ApolloDECDev',
// 'username' => 'apollod4_SIT',
// 'password' => 'apollosit1234',
// 'database' => 'apollod4_ApolloDECNEWSIT',
'dbdriver' => 'mysqli',
'dbprefix' => '',

View File

@ -219,6 +219,8 @@ $route['updateCourseDetailss'] = 'DataCorrection_Controller/updateCourseDetailss
$route['getStudentAllInfo'] = 'DayBook_Controller/getStudentAllInfo';
$route['getCourse'] = 'Student_Controller/getCourse';
/*

View File

@ -157,6 +157,10 @@ class Call_Tracking_Controller extends REST_Controller {
// $search['searchName']= $this->post('searchName');
$getTrackedDetails = $this->Calltracking_model->getTrackingDetails($search,$status);
// print_r($getTrackedDetails);
// die();
if ($getTrackedDetails)
{
$getTrackedDetails['status'] = REST_Controller::HTTP_OK;

View File

@ -274,6 +274,7 @@ class Student_Controller extends REST_Controller {
$reqData['Status'] = $updateDetails['checkTracking'];
$reqData['StatusName'] = "PENDING";
$reqData['CreatedBy'] = $localdata['localUserID'];
$reqData['CourseID'] = $updateDetails['CourseID'];
$date = date('Y-m-d H:i:s');
$reqData['CreatedOn'] = $date;
$addStudentPendingDocDetails = $this->student_model->addStu_PendingDoc_Details($reqData, $localdata);
@ -644,4 +645,28 @@ class Student_Controller extends REST_Controller {
$this->response(['message' => 'No users were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
public function getCourse_post()
{
$data = $this->post('data');
$localBranchID =$data['localBranchID'];
$getcourselist= $this->student_model->get_All_Course($localBranchID);
if ($getcourselist) {
$getcourselist['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getcourselist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
} else {
// Set the response and exit
$this->response(['message' => 'No users were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
}

View File

@ -356,7 +356,7 @@ class Calltracking_model extends CI_Model {
public function getTrackingDetails($search=null,$status)
{
$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');
$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');
@ -424,6 +424,7 @@ class Calltracking_model extends CI_Model {
$tracking_array["ActivityName"]=$row->ActivityName;
$tracking_array["AlternateMobile"]=$row->AlternateMobile;
$tracking_array["Address"]=$row->Address;
$tracking_array["Comments"]=$row->FollowupComments;
// $tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID);
// $followupDetails=$this->getTrackingFollowup($row->TrackingID);
@ -439,6 +440,9 @@ class Calltracking_model extends CI_Model {
}
}
if($status!=true)
{
$result_array['pendingTrackingDetails'] = $this->getPrevPendingTrackingDetails($search);
@ -448,16 +452,19 @@ class Calltracking_model extends CI_Model {
{
$result_array['pendingTrackingDetails']=1;
}
// print_r($result_array);
// die();
//print_r($this->db->last_query());
return $result_array;
}
public function getPrevPendingTrackingDetails($search=null)
{
$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');
$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');
@ -507,6 +514,7 @@ class Calltracking_model extends CI_Model {
$tracking_array["ActivityName"]=$row->ActivityName;
$tracking_array["AlternateMobile"]=$row->AlternateMobile;
$tracking_array["Address"]=$row->Address;
$tracking_array["Comments"]=$row->FollowupComments;
// $tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID);
// $followupDetails=$this->getTrackingFollowup($row->TrackingID);
@ -562,6 +570,10 @@ class Calltracking_model extends CI_Model {
$this->db->where('TrackingID',$trackingId);
$this->db->order_by('InteractionId','DESC');
$trackingDetails = $this->db->get();
// print_r($trackingDetails);
// die();
return $trackingDetails->result();
}
@ -1133,9 +1145,13 @@ class Calltracking_model extends CI_Model {
// $tracking_array["followupDetails"]=$this->getTrackingFollowup($row->TrackingID);
$followupDetails=$this->getTrackingFollowup($row->TrackingID);
// print_r($followupDetails);
$tracking_array["followupDetails"]=$followupDetails[0]->FollowupOn;
$tracking_array["FollowupComments"] = $followupDetails[0]->FollowupComments;
$result[]=$tracking_array;
//print_r($result);
}
$result_array['trackingDetails']=$result;
@ -1144,6 +1160,12 @@ class Calltracking_model extends CI_Model {
}
}
// print_r($result_array);
// print_r($this->db->last_query());
return $result_array;
}
@ -1209,6 +1231,7 @@ class Calltracking_model extends CI_Model {
$followupDetails=$this->getTrackingFollowup($row->TrackingID);
$tracking_array["followupDetails"]=$followupDetails[0]->FollowupOn;
$tracking_array["FollowupComments"]=$followupDetails[0]->FollowupComments;
$result[]=$tracking_array;
@ -1281,6 +1304,7 @@ class Calltracking_model extends CI_Model {
$followupDetails=$this->getTrackingFollowup($row->TrackingID);
$tracking_array["followupDetails"]=$followupDetails[0]->FollowupOn;
$tracking_array["FollowupComments"]=$followupDetails[0]->FollowupComments;
$result[]=$tracking_array;

View File

@ -1325,8 +1325,9 @@ class Student_model extends CI_Model {
$localBranch = $localData['localBranchID'];
$this->db->select('*');
$this->db->order_by('CreatedOn', 'DESC');
$this->db->order_by('T_Student_DocumentTrack_Details.CreatedOn', 'DESC');
$this->db->from(STUDENTDOCUMENTTRACKDETAILS);
$this->db->join('T_CourseMaster','T_CourseMaster.CourseID=T_Student_DocumentTrack_Details.CourseID','left');
$this->db->where('StudentID', $stuID);
$getPendDocDetails = $this->db->get();
$documentPendingDetails = $getPendDocDetails->result();
@ -1342,6 +1343,10 @@ class Student_model extends CI_Model {
// add student enrollment pending document details
public function addStu_PendingDoc_Details($reqData, $localdata) {
//print_r($reqData);die();
$this->db->insert(STUDENTDOCUMENTTRACKDETAILS, $reqData);
if ($this->db->affected_rows() > 0) {
// Entry for call track
@ -1715,4 +1720,35 @@ class Student_model extends CI_Model {
}
public function get_All_Course($localBranchID)
{
$this->db->select('CourseID,T_CourseMaster.CourseCode,CourseName,T_CourseMaster.UniversityID,UniversityName');
$this->db->from('T_CourseMaster');
$this->db->join('T_UniversityMaster','T_UniversityMaster.UniversityID=T_CourseMaster.UniversityID');
$this->db->where('T_CourseMaster.BranchCode',$localBranchID);
$this->db->order_by('UniversityID','asc');
$courseDetails = $this->db->get();
if($courseDetails->result())
{
//print_r($searchDetails->result());
$result_array['feeStatus'] = true;
$result_array['details'] = $courseDetails->result();
}
else
{
$result_array['feeStatus'] = false;
$result_array['details'] = "No records found!";
}
// print_r($this->db->last_query());die();
return $result_array;
}
}

View File

@ -206,6 +206,8 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
* created by kms
* */
$scope.setEditId = function (p,search1,search2,search3,search4,search5,fromDate,toDate) {
$scope.searchData = {
"searchDate": search1,
"searchName": search2,
@ -466,6 +468,9 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
$http(getTrackDetails).then(function (response) {
if(response.data.pendingTrackingDetails.trackingStatus && response.data.trackingDetails.length > 0){
$scope.loader = false;
// console.log(response.data)
//$scope.currentDate1=$filter('date')(new Date(), 'dd-MM-yyyy');
$scope.tillPendingDetails = response.data.pendingTrackingDetails.trackingDetails;
angular.forEach($scope.tillPendingDetails, function (value, key) {
@ -491,7 +496,7 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
});
//console.log($scope.data);
$rootScope.trackingStatus = response.data.statusDetails;
localStorage.setItem('trackingList', JSON.stringify($scope.data));
@ -598,6 +603,9 @@ app.controller('callTrackingLeadCtrl', ["$scope","$rootScope","toaster", "$filte
* */
$scope.setEditId = function (p,search1,search2,search3,search4,search5,fromDate) {
// alert('in');
// return false;
$scope.changeFromDate= $filter('date')(fromDate, 'yyyy-MM-dd');
$scope.searchData = {
@ -740,6 +748,8 @@ app.controller('callTrackingLeadCtrl', ["$scope","$rootScope","toaster", "$filte
$scope.data = response.data.trackingDetails;
console.log($scope.data);
localStorage.setItem('trackingList', JSON.stringify($scope.data));
// this for search box
@ -803,6 +813,9 @@ app.controller('callTrackingCloseCtrl', ["$scope","$rootScope","toaster", "$filt
* created by kms
* */
$scope.setEditId = function (p,search1,search2,search3,search4,search5,fromDate) {
// alert('in');
// return false;
$scope.changeFromDate= $filter('date')(fromDate, 'yyyy-MM-dd');
$scope.searchData = {
@ -1530,6 +1543,8 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
* created by kms
* */
$rootScope.updateFollowup = function (form,followupDetails,myModel1, loading) {
// alert('com');
// return false;
var firstError = null;
if (form.$invalid) {

View File

@ -72,6 +72,30 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
}
var allcourse = {
method: 'POST',
url: apiPoint.url + 'getCourse/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: localDetails
}
};
$http(allcourse).then(function (response) {
if (response.data.details) {
$scope.allcourselist = response.data.details;
// console.log($scope.allcourselist)
} else {
$scope.employeeList = '';
}
});
@ -1252,12 +1276,17 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$scope.myModelAddPendingDocDetails = {
"documentDetails": "",
"documentdate":"",
"course":"",
"checkTracking": false
}
$scope.documentTrackAddDetailsLoading = false;
$scope.studentEntrollPendingDocFORM = {
submit: function (form, myModelAddPendingDocDetails, stuID) {
// alert('in');
// return false;
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@ -1281,6 +1310,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
"student": stuID,
"doc_Details": myModelAddPendingDocDetails.documentDetails,
"checkTracking": myModelAddPendingDocDetails.checkTracking,
"CourseID":myModelAddPendingDocDetails.course,
"documentdate": $filter('date')(new Date($scope.docFollowupDate),'dd-MM-yyyy')
};
var updateStudentPendingDocDetails = {
@ -1300,6 +1330,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$scope.documentTrackAddDetailsLoading = false;
$scope.myModelAddPendingDocDetails = {
"documentDetails": "",
"course":"",
"checkTracking": false
}
form.$setPristine(true);
@ -1311,8 +1342,12 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
}
},
reset: function (form) {
// alert('reset')
// return false;
$scope.myModelAddPendingDocDetails = {
"documentDetails": "",
"course":"",
"checkTracking": false
}
}
@ -1490,10 +1525,13 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
var localDetails = ipCookie('cookiechk');
$scope.localBranchDetails = "";
$scope.loader = false;
$scope.allcourselist ='';
$scope.che='abc';
$scope.viewStudentDetailsPage = false;
// load when html page load
$scope.init = function () {
$scope.che='123';
$scope.localUserType = localDetails.localType;
if (localDetail != null) {
if (localDetails.localType === 'R004') {
@ -1505,6 +1543,33 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
}
} else {
}
var allcourse = {
method: 'POST',
url: apiPoint.url + 'getCourse/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: localDetails
}
};
$http(allcourse).then(function (response) {
if (response.data.details) {
$scope.allcourselist = response.data.details;
// console.log($scope.allcourselist)
} else {
$scope.employeeList = '';
}
});
}
@ -2831,6 +2896,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
$scope.myModelAddPendingDocDetails = {
"documentDetails": "",
"course":"",
"checkTracking": false
}
@ -2838,6 +2904,10 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
$scope.studentEntrollPendingDocFORM = {
submit: function (form, myModelAddPendingDocDetails, stuID) {
//console.log(myModelAddPendingDocDetails)
// alert('in');
// return false;
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@ -2862,6 +2932,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
"student" : stuID,
"doc_Details": myModelAddPendingDocDetails.documentDetails,
"checkTracking": myModelAddPendingDocDetails.checkTracking,
"CourseID":myModelAddPendingDocDetails.course,
"documentdate" :$filter('date')(new Date($scope.docFollowupDate),'dd-MM-yyyy')
};
var updateStudentPendingDocDetails = {
@ -2894,6 +2965,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
reset: function (form) {
$scope.myModelAddPendingDocDetails = {
"documentDetails": "",
"course":"",
"checkTracking": false
}
}

View File

@ -111,6 +111,7 @@
</th>
<th>Assigned </th>
<th>Created </th>
<th>Comments</th>
<th>Status</th>
</tr>
@ -142,6 +143,8 @@
padding: 0.5em 0.6em;" aria-hidden="true"></b>
</a></td>-->
<td>{{p.FollowupComments}}</td>
<td ng-if="p.statusName!='CLOSE'">
<a class="text-dark" tooltip="Click To View" ng-click="setEditId(p,'','','','','',myModel.search);">

View File

@ -170,6 +170,7 @@
<th>Course</th>
<th>Activity </th>
<th>Assigned </th>
<th>Comments</th>
<th>Status</th>
</tr>
@ -197,6 +198,8 @@
box-shadow: 0px 0px 2px green;
padding: 0.5em 0.6em;" aria-hidden="true"></b>
</a></td>-->
<td>{{p.FollowupComments}}</td>
<td ng-if="p.statusName!='CLOSE'">

View File

@ -113,11 +113,12 @@
</th>
<th>Assigned </th>
<th>Created </th>
<th>Comments</th>
<th>Status</th>
</tr>
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|filter:search2:strict|itemsPerPage:10">
<tbody dir-paginate="p in data|unique:'TrackingID'|orderBy:sortKey:reverse|filter:search:strict|filter:search2:strict|itemsPerPage:10">
<tr>
<td ng-if="p.Flag==false">
<a class="glyphicon ng-scope fa margin-right-5 fa-flag text-grey text-extra-large" tooltip="Potential" ng-click="markAsImportant(p.TrackingID,true);"></a>
@ -142,6 +143,8 @@
padding: 0.5em 0.6em;" aria-hidden="true"></b>
</a></td>-->
<td>{{p.FollowupComments}}</td>
<td ng-if="p.statusName!='CLOSE'">
<a class="text-dark" tooltip="Click To View" ng-click="setEditId(p,'','','','','',myModel.search);">

View File

@ -112,6 +112,7 @@
</th>
<th>Assigned</th>
<th>Created</th>
<th>Comments</th>
<th>Status</th>
</tr>
@ -141,6 +142,8 @@
padding: 0.5em 0.6em;" aria-hidden="true"></b>
</a></td>-->
<td>{{p.FollowupComments}}</td>
<td ng-if="p.statusName!='CLOSE'">
<a class="text-dark" tooltip="Click To View" ng-click="setEditId(p,'','','','','',myModel.search);">

View File

@ -216,8 +216,8 @@
<!-- <div ng-if="load=0">
<b><h1 style="color:black;"><center> No Records Found</h1></center></b>
</div> -->
<!-- <dir-pagination-controls direction-links="true" boundary-links="true">
</dir-pagination-controls> -->
<dir-pagination-controls direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>

View File

@ -598,7 +598,25 @@
</div>
<div class="col-md-2 form-group">
<!-- {{che}} -->
<div class="col-md-4" >
<label for="form-field-select-2">Course</label>
<select class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="course" ng-model="myModelAddPendingDocDetails.course">
<option value="" selected>Select Course</option>
<option ng-repeat="item in allcourselist" value="{{item.CourseID}}">{{item.CourseName}}-{{item.CourseCode}} ({{item.UniversityName}}) </option>
</select>
</div>
<div class="col-md-4 form-group">
<label>
Track Status
</label>
@ -646,6 +664,7 @@
<tr>
<th>Detail</th>
<th>Follow_Up_Date</th>
<th>Course</th>
<th>Status</th>
<th class="center">Delete</th>
</tr>
@ -658,6 +677,7 @@
<span ng-if="penddoc.Status == 1">Open</span>
<span ng-if="penddoc.Status == 0">Close</span>
</td>-->
<td>{{penddoc.CourseName}}</td>
<td>
{{penddoc.StatusName | ucfirst}}
</td>