Call track Reload issues fixed
This commit is contained in:
parent
2f3a078a29
commit
bef119d2b7
@ -167,9 +167,248 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as CourseName,Sem_year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(balance AS NUMBER) as BalanceFee,issuedate as IssuedToStudentDate,rcvedate as ReceivedFromStudentDate,Status as AnswerBookletStatus,Date as Date INTO XLS("Answer_booklet_status.xls",?) FROM ?',[mystyle,$scope.ans_book_data]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.ans_book_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.ans_book_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.ans_book_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.ans_book_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_ans_bookletCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_ans_bookletCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);return false;
|
||||
var comments = [];
|
||||
for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){
|
||||
comments [stuid] ="Call Tracking For Report Answer Booklet Details - BalanceFee:"+selectedStudents[stuid].balance + " - IssuedDate:" +selectedStudents[stuid].issuedate;
|
||||
}
|
||||
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
@ -307,245 +546,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
|
||||
}]);
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.ans_book_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.ans_book_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.ans_book_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.ans_book_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_ans_bookletCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_ans_bookletCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);return false;
|
||||
var comments = [];
|
||||
for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){
|
||||
comments [stuid] ="Call Tracking For Report Answer Booklet Details - BalanceFee:"+selectedStudents[stuid].balance + " - IssuedDate:" +selectedStudents[stuid].issuedate;
|
||||
}
|
||||
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -171,9 +171,240 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.app_pending_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.app_pending_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.app_pending_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
// console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
angular.forEach($scope.app_pending_data,function(value,key){
|
||||
//console.log(value);
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_app_pendingCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_app_pendingCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report Application Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
@ -312,238 +543,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
}]);
|
||||
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.app_pending_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.app_pending_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.app_pending_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
// console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
angular.forEach($scope.app_pending_data,function(value,key){
|
||||
//console.log(value);
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_app_pendingCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_app_pendingCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report Application Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -220,8 +220,241 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal",
|
||||
|
||||
|
||||
|
||||
/*modal controller
|
||||
* */
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.balfee_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.balfee_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.balfee_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.balfee_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_balfeeCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_balfeeCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report ExamFees Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
}]);
|
||||
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
@ -361,240 +594,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
}]);
|
||||
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.balfee_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.balfee_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.balfee_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.balfee_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_balfeeCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_balfeeCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report ExamFees Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -164,9 +164,246 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,initialPaid as DocumentFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as CourseName,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(balance AS NUMBER) as Balance,certname as CertificateName,status as CertificateStatus,adate as Date INTO XLS("Certificate_status.xls",?) FROM ?',[mystyle,$scope.cert_data]);
|
||||
};
|
||||
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.cert_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.cert_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.cert_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.cert_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_certificateCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_certificateCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
var comments = [];
|
||||
for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){
|
||||
comments [stuid] ="Call Tracking For Report Certificate Status - DocumentName:"+selectedStudents[stuid].Certificate_name + " - Status:" +selectedStudents[stuid].Certificate_status + " - Date:" +selectedStudents[stuid].Certificate_date;
|
||||
}
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
@ -304,245 +541,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
|
||||
}]);
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.cert_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.cert_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.cert_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.cert_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_certificateCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_certificateCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
var comments = [];
|
||||
for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){
|
||||
comments [stuid] ="Call Tracking For Report Certificate Status - DocumentName:"+selectedStudents[stuid].Certificate_name + " - Status:" +selectedStudents[stuid].Certificate_status + " - Date:" +selectedStudents[stuid].Certificate_date;
|
||||
}
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -167,9 +167,241 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
$scope.exportData = function () {
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Admission_date as AdmissionDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as CourseName,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,fdate as Followupdate,certname as DocumentName INTO XLS("Document_pending_student_list.xls",?) FROM ?',[mystyle,$scope.doc_pending_data]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.doc_pending_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.doc_pending_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.doc_pending_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
// console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
angular.forEach($scope.doc_pending_data,function(value,key){
|
||||
//console.log(value);
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_doc_pendingCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_doc_pendingCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:myModel.comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
@ -307,237 +539,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
|
||||
}]);
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.doc_pending_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.doc_pending_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.doc_pending_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
// console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
angular.forEach($scope.doc_pending_data,function(value,key){
|
||||
//console.log(value);
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_doc_pendingCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_doc_pendingCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:myModel.comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -178,9 +178,244 @@ app.controller('report_examfeeCtrl', ["$scope", "$filter","$rootScope","$modal",
|
||||
$scope.exportData = function () {
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as CourseName,Sem_year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(Amount AS NUMBER) as ExamWritingFee,Comments as Comments INTO XLS("Exam_writing_fee_report.xls",?) FROM ?',[mystyle,$scope.examfee_data]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.examfee_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.examfee_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.examfee_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.examfee_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_examfeeCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_examfeeCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report Exam Writing Fees Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
|
||||
}]);
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
@ -319,242 +554,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
}]);
|
||||
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.examfee_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.examfee_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.examfee_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.examfee_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_examfeeCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_examfeeCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report Exam Writing Fees Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -163,9 +163,248 @@ app.controller('report_markcard_certificateCtrl', ["$scope", "$filter","$rootSco
|
||||
$scope.exportData = function () {
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Document_fee_paid_date as DocumentFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,course_name as CourseName,Sem_year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(Balance_fee AS NUMBER) as BalanceFee,Markcard_status as MarkcardStatus,Markcard_date as MarkcardDate,Markcard_comments as MarkcardComments,Certificate_name as CertificateName,Certificate_status as CertificateStatus,Certificate_date as CertificateDate,Certificate_comments as CertificateComments INTO XLS("Markcard/Certificate_status.xls",?) FROM ?',[mystyle,$scope.mark_cert_data]);
|
||||
};
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.mark_cert_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.mark_cert_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.mark_cert_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.mark_cert_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_markcard_certificateCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_markcard_certificateCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
var comments = [];
|
||||
for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){
|
||||
comments [stuid] ="Call Tracking For Report Certificate Status - SemYear:"+selectedStudents[stuid].Sem_year + " - Balance:" +selectedStudents[stuid].Balance_fee + " - CertificateName:" +selectedStudents[stuid].Certificate_name + " - ReceivedStatus:" +selectedStudents[stuid].rstatus + " - ReceivedDate:" +selectedStudents[stuid].rdate;
|
||||
}
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
@ -303,244 +542,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
|
||||
}]);
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.mark_cert_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.mark_cert_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.mark_cert_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
// console.log("328");
|
||||
// console.log($scope.balfee_data);
|
||||
angular.forEach($scope.mark_cert_data,function(value,key){
|
||||
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
console.log(sid);
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
console.log($scope.selectedStudentsID.indexOf(sid));
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
//console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
//console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_markcard_certificateCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_markcard_certificateCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
var comments = [];
|
||||
for(var stuid=0;stuid<=selectedStudents.length-1;stuid++){
|
||||
comments [stuid] ="Call Tracking For Report Certificate Status - SemYear:"+selectedStudents[stuid].Sem_year + " - Balance:" +selectedStudents[stuid].Balance_fee + " - CertificateName:" +selectedStudents[stuid].Certificate_name + " - ReceivedStatus:" +selectedStudents[stuid].rstatus + " - ReceivedDate:" +selectedStudents[stuid].rdate;
|
||||
}
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:comments,
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -165,9 +165,240 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope",
|
||||
$scope.exportData = function () {
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Initial_paid_date as InitialPaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Roll_NO as RollNO,Father_name as FatherName,Course_name as CourseName,Sem_year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(Balance_Fee AS NUMBER) as BalanceFee,appdate as ApplicationSentDate,ansdate as AnswerBookletSentDate,Status as MarkCardStatus,Date as Date INTO XLS("Markcard_status.xls",?) FROM ?',[mystyle,$scope.markcard_data]);
|
||||
};
|
||||
/*modal controller
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.markcard_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.markcard_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.markcard_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
angular.forEach($scope.markcard_data,function(value,key){
|
||||
//console.log(value);
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
console.log()
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_markcard_statusCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
$rootScope.modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_markcard_statusCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report MarkCard Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
$rootScope.modalInstance.close();
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
|
||||
}]);
|
||||
/*modal controller
|
||||
* */
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope,$rootScope, $modal, $log, apiPoint, $http) {
|
||||
//Tooltip for print button
|
||||
$scope.dynamicTooltip = 'Student View';
|
||||
|
||||
@ -305,239 +536,6 @@ app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "Wor
|
||||
|
||||
|
||||
}]);
|
||||
/**
|
||||
* Auto Call Tracking Sriram
|
||||
*/
|
||||
$scope.selectedStudentsID = [];
|
||||
$scope.isCheckAll = function(e){
|
||||
var val = (e.target.checked ? true : false);
|
||||
if(val)
|
||||
{
|
||||
// $scope.disable = false;
|
||||
var len = $scope.markcard_data.length;
|
||||
var i = 0;
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if($scope.selectedStudentsID.indexOf($scope.markcard_data[i]) === -1)
|
||||
{
|
||||
|
||||
$scope.selectedStudentsID.push($scope.markcard_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $scope.disable = true;
|
||||
$scope.selectedStudentsID = [];
|
||||
}
|
||||
if($scope.selectedStudentsID !=''){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.isClick = function(e){
|
||||
var ide = e.target;
|
||||
var val = (ide.checked ? true : false);
|
||||
var sid = e.target.id;
|
||||
angular.forEach($scope.markcard_data,function(value,key){
|
||||
//console.log(value);
|
||||
if(sid == value.Student_id)
|
||||
{
|
||||
console.log()
|
||||
sid = value;
|
||||
}
|
||||
});
|
||||
|
||||
var pos = $scope.selectedStudentsID.indexOf(sid);
|
||||
//alert(val);
|
||||
if(val)
|
||||
{
|
||||
if( pos == -1)
|
||||
{
|
||||
|
||||
console.log("PUSH");
|
||||
$scope.selectedStudentsID.push(sid);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//console.log("POP");
|
||||
$scope.selectedStudentsID.splice(pos,1);
|
||||
}
|
||||
//
|
||||
if(val){
|
||||
$scope.disable = false;
|
||||
}else{
|
||||
$scope.disable = true;
|
||||
}
|
||||
console.log($scope.selectedStudentsID);
|
||||
}
|
||||
$scope.calltracking = function(){
|
||||
|
||||
//$rootScope.student = $scope.selectedStudentsID;
|
||||
if($scope.selectedStudentsID ==''){
|
||||
swal('Select Check box','','warning');
|
||||
return false;
|
||||
}else{
|
||||
$scope.controller = 'ng-controller="report_markcard_statusCtrl"';
|
||||
$scope.myModel.comments = 'Call Tracking for Document Report';
|
||||
var lead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getTrackingLeadDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
student:$scope.selectedStudentsID,
|
||||
branchID:JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
userType:JSON.parse(localStorage.getItem('localObj')).localType,
|
||||
}
|
||||
};
|
||||
$http(lead).then(function (response) {
|
||||
if (response.data.status==200) {
|
||||
$rootScope.activity = response.data.activityDetails;
|
||||
$rootScope.status = response.data.statusDetails;
|
||||
$rootScope.staffDetails = response.data.staffDetails;
|
||||
$rootScope.studentDetails = $scope.selectedStudentsID;
|
||||
// $scope.modalopen($scope.activity);
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'assets/views/autoCalltracking.html',
|
||||
controller: 'report_markcard_statusCtrl',
|
||||
// size: size,
|
||||
|
||||
resolve: {
|
||||
pdfitems: function () {
|
||||
return $scope.activity;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
$scope.selected = selectedItem;
|
||||
}, function () {
|
||||
$log.info('Modal dismissed at: ' + new Date());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.trackForm = {
|
||||
submit: function (form, myModel,loading,selectedStudents) {
|
||||
//console.log(selectedStudents);
|
||||
if(isNaN(myModel.date)){
|
||||
$scope.nextFollowupDate = myModel.date;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.getdate=new Date(myModel.date).toDateString();
|
||||
|
||||
$scope.nextFollowupDate = $filter('date')(new Date($scope.getdate), 'dd-MM-yyyy');
|
||||
}
|
||||
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
$scope.ldloading1[loading.replace('-', '_')] = true;
|
||||
/* hide this fun after branch level changes
|
||||
if($scope.userType !='R004'){
|
||||
$scope.updateBranchID = JSON.parse(localStorage.getItem('localObj')).localBranchID;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}
|
||||
else{
|
||||
$scope.updateBranchID = myModel.branch.BranchCode;
|
||||
$scope.updateAssignTo = myModel.assignedTo;
|
||||
|
||||
}*/
|
||||
|
||||
var addLead = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'autoAddlead/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
student:selectedStudents,
|
||||
date: $scope.nextFollowupDate,
|
||||
activity: myModel.activity.activityID,
|
||||
assignedTo: myModel.assignedTo,
|
||||
status: myModel.status,
|
||||
referedBy: myModel.referedBy,
|
||||
comments:"Call Tracking For Report MarkCard Details ",
|
||||
|
||||
enquiryStatus:myModel.enquiryStatus,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
|
||||
}
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
console.log(response);
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
swal(" ", response.data.leadDetails.message, "error");
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
$scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
"studentName": "",
|
||||
"mobileNumber": "",
|
||||
"universityName": "",
|
||||
"courseName": "",
|
||||
"activity": "",
|
||||
"assignedTo": "",
|
||||
"status": "",
|
||||
"referedBy": '',
|
||||
"comments":''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Call Tracking End
|
||||
*/
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -361,8 +361,8 @@ $scope.exportExcel= function () {
|
||||
};
|
||||
$http(addLead).then(function (response) {
|
||||
if (response.data.status==200 && response.data.leadDetails.leadStatus == true) {
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$rootScope.modalInstance.close();
|
||||
swal(" ", response.data.leadDetails.message, "success");
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user