Merge branch 'master' of https://bitbucket.org/venbainformationtechnology/apollodec
This commit is contained in:
commit
77ddc147e3
@ -423,7 +423,8 @@ group by sid,Sem
|
||||
}
|
||||
public function app_pending($bat=null,$br=null,$u=null){
|
||||
|
||||
$sql = "SELECT
|
||||
$sql = "SELECT * FROM (SELECT
|
||||
APFS.Registration_Details_ID AS regid,
|
||||
APFS.ListCode as StatusCode,
|
||||
APFS.AppFormDate as StatusUpdationOn,
|
||||
APFS.Comments as StatusComments,
|
||||
@ -431,25 +432,63 @@ group by sid,Sem
|
||||
concat(STU.Firstname,' ', STU.Lastname) as Student_name,
|
||||
STU.Fathername as FatherName,
|
||||
STU.MobileNumber as Phone_number,
|
||||
COUR.CourseName as CourseName,
|
||||
UNIV.UniversityName as UniversityName,
|
||||
STU.AlternateNumber as AlternateNumber,
|
||||
STU.PresentAddress as address,
|
||||
COUR.CourseName as Course_name,
|
||||
UNIV.UniversityName as University,
|
||||
sfpd.BILL as InitialPayDate,
|
||||
RD.Student_Fee_Status_Id as FeesStatusID,
|
||||
STU_COUR.EnrollmentID as EnrollmentNumber,
|
||||
CFD.Sem_Year as Sem_Year,
|
||||
RD.RegistrationType as FormType,
|
||||
STU.StudentID
|
||||
FROM T_ApplicationFormStatus as APFS
|
||||
LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID
|
||||
LEFT JOIN T_PickListDetails as PKL ON PKL.ListCode = APFS.ListCode
|
||||
LEFT JOIN T_StudentDetails as STU ON STU.StudentID = RD.StudentID
|
||||
LEFT JOIN T_CourseMaster as COUR ON COUR.CourseID = RD.CourseID
|
||||
LEFT JOIN T_Student_CourseDetails as STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
||||
LEFT JOIN T_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType
|
||||
LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||
LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM apollod4_ApolloDECDev.T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id
|
||||
FROM T_ApplicationFormStatus AS APFS LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID
|
||||
LEFT JOIN T_PickListDetails AS PKL ON PKL.ListCode = APFS.ListCode LEFT JOIN T_StudentDetails AS STU ON STU.StudentID = RD.StudentID LEFT JOIN T_CourseMaster AS COUR ON COUR.CourseID = RD.CourseID LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
||||
LEFT JOIN T_Course_Fees_Details AS CFD ON CFD.ID = RD.FeeType
|
||||
LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||
LEFT JOIN (SELECT FeesId AS FeeID, min(CreatedOn), BillDate AS BILL FROM T_Students_Fees_PaidDetails GROUP BY FeesId) AS sfpd ON sfpd.FeeID = RD.Student_Fee_Status_Id
|
||||
where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
||||
group by APFS.Registration_Details_ID";
|
||||
ORDER BY StatusUpdationOn DESC) x
|
||||
GROUP BY x.regid";
|
||||
|
||||
// SELECT * FROM (SELECT APFS.Registration_Details_ID AS regid, APFS.ListCode AS StatusCode, APFS.AppFormDate AS StatusUpdationOn, APFS.Comments AS StatusComments, PKL.ListName AS StatusName, concat(STU.Firstname,' ', STU.Lastname) AS StudentName, STU.Fathername AS FatherName, STU.MobileNumber AS Phone_number, COUR.CourseName AS CourseName, UNIV.UniversityName AS UniversityName, sfpd.BILL AS InitialPayDate, RD.Student_Fee_Status_Id AS FeesStatusID, STU_COUR.EnrollmentID AS EnrollmentNumber, CFD.Sem_Year AS Sem_Year, RD.RegistrationType AS FormType, STU.StudentID
|
||||
// FROM T_ApplicationFormStatus AS APFS LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID
|
||||
// LEFT JOIN T_PickListDetails AS PKL ON PKL.ListCode = APFS.ListCode LEFT JOIN T_StudentDetails AS STU ON STU.StudentID = RD.StudentID LEFT JOIN T_CourseMaster AS COUR ON COUR.CourseID = RD.CourseID LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
||||
// LEFT JOIN T_Course_Fees_Details AS CFD ON CFD.ID = RD.FeeType
|
||||
// LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||
// LEFT JOIN (SELECT FeesId AS FeeID, min(CreatedOn), BillDate AS BILL FROM T_Students_Fees_PaidDetails GROUP BY FeesId) AS sfpd ON sfpd.FeeID = RD.Student_Fee_Status_Id
|
||||
// ORDER BY StatusUpdationOn DESC) x
|
||||
// GROUP BY x.regid
|
||||
|
||||
// $sql = "SELECT
|
||||
// APFS.ListCode as StatusCode,
|
||||
// APFS.AppFormDate as StatusUpdationOn,
|
||||
// APFS.Comments as StatusComments,
|
||||
// PKL.ListName as StatusName,
|
||||
// concat(STU.Firstname,' ', STU.Lastname) as Student_name,
|
||||
// STU.Fathername as FatherName,
|
||||
// STU.MobileNumber as Phone_number,
|
||||
// STU.AlternateNumber as AlternateNumber,
|
||||
// STU.PresentAddress as address,
|
||||
// COUR.CourseName as Course_name,
|
||||
// UNIV.UniversityName as University,
|
||||
// sfpd.BILL as InitialPayDate,
|
||||
// RD.Student_Fee_Status_Id as FeesStatusID,
|
||||
// STU_COUR.EnrollmentID as EnrollmentNumber,
|
||||
// CFD.Sem_Year as Sem_Year,
|
||||
// RD.RegistrationType as FormType,
|
||||
// STU.StudentID
|
||||
// FROM T_ApplicationFormStatus as APFS
|
||||
// LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID
|
||||
// LEFT JOIN T_PickListDetails as PKL ON PKL.ListCode = APFS.ListCode
|
||||
// LEFT JOIN T_StudentDetails as STU ON STU.StudentID = RD.StudentID
|
||||
// LEFT JOIN T_CourseMaster as COUR ON COUR.CourseID = RD.CourseID
|
||||
// LEFT JOIN T_Student_CourseDetails as STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
||||
// LEFT JOIN T_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType
|
||||
// LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||
// LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id
|
||||
// where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
||||
// group by APFS.Registration_Details_ID";
|
||||
$leadDet=$this->db->query($sql);
|
||||
$answer = $leadDet->result();
|
||||
if (count($answer) > 0) {
|
||||
|
||||
@ -222,7 +222,7 @@ $scope.tod = to_dt;
|
||||
};
|
||||
console.log(mystyle);
|
||||
|
||||
alasql('SELECT UniversityName,Cash,Cheque,Referal,Onlinec as OnlineTransaction,WAIVER,Card as CardTransaction,Total INTO XLS("Fee Paid List report.xls",?) FROM ?',[mystyle,$scope.newreglist]);
|
||||
alasql('SELECT UniversityName,Cash,Cheque,Referal,Onlinec as OnlineTransaction,WAIVER as Waiver,Card as CardTransaction,Total INTO XLS("Fee Paid List report.xls",?) FROM ?',[mystyle,$scope.newreglist]);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ app.controller('daybookCtrl', ["$scope", "$rootScope", "toaster", "$filter", "ng
|
||||
"date": "",
|
||||
"dateTo": ""
|
||||
}
|
||||
|
||||
|
||||
// get the data while page loading functions goes here
|
||||
$scope.init = function () {
|
||||
$scope.todayDate = new Date();
|
||||
|
||||
@ -11,9 +11,12 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
|
||||
$scope.disableAddButton = false;
|
||||
$scope.disableEditButton = false;
|
||||
|
||||
|
||||
|
||||
|
||||
//In controller
|
||||
$scope.exportAction = function(){
|
||||
alert();
|
||||
// alert();
|
||||
switch('excel'){
|
||||
case 'pdf': $scope.$broadcast('export-pdf', {});
|
||||
break;
|
||||
@ -185,6 +188,8 @@ $scope.dayBookApprovalAccess = '';
|
||||
|
||||
$scope.noRecordFound = true;
|
||||
$scope.dataLength = 0;
|
||||
|
||||
var rows1 = '';
|
||||
// get day book type name list
|
||||
$scope.getDayBookList = function () {
|
||||
var getDatBookListDetails = {
|
||||
@ -202,6 +207,34 @@ $scope.dayBookApprovalAccess = '';
|
||||
if (response.data.dayBookListStatus) {
|
||||
|
||||
$scope.data = response.data.dayBookListDetails;
|
||||
// alert(JSON.stringify($scope.data));
|
||||
|
||||
var o = {};
|
||||
// o[key] = value;
|
||||
var intDate = 0;
|
||||
|
||||
var arrForeach = $scope.data;
|
||||
arrForeach.forEach(function(element) {
|
||||
var value = {};
|
||||
value['Date'] = element.Date || '-';
|
||||
value['IncomeExpence'] = element.ListName || '-';
|
||||
value['VoucherBillNumber'] = element.VoucherNumber || '-';
|
||||
value['PaidReceivedToFrom'] = element.PaidTo || '-';
|
||||
value['Sem'] = element.FeePaymentDetails || '-';
|
||||
value['Course'] = element.CourseName || '-';
|
||||
// value['University'] = element.UniversityName || '-';
|
||||
// value['Type'] = element.TypeName || '-';
|
||||
// value['ReceiptNo'] = element.ReceiptNo || '-';
|
||||
// value['Comments'] = element.ReceiptNoComments || '-';
|
||||
// value['ModeofPayment'] = element.ModeOfPayment || '-';
|
||||
// value['Amount'] = element.Amount || '-';
|
||||
// value['Balance'] = element.Balance || '-';
|
||||
o[intDate] = value;
|
||||
intDate++;
|
||||
});
|
||||
|
||||
rows1 = o;
|
||||
|
||||
$scope.dataLength = $scope.data.length;
|
||||
if ($scope.data.length !== 0) {
|
||||
$scope.noRecordFound = false;
|
||||
@ -216,6 +249,153 @@ $scope.dayBookApprovalAccess = '';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
||||
|
||||
$scope.generatePFD = function() {
|
||||
|
||||
// var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
|
||||
|
||||
var headers = {
|
||||
// fila_0:{
|
||||
// col_1:{ text: 'Faltas', style: 'tableHeader',rowSpan: 2, alignment: 'center',margin: [0, 8, 0, 0] },
|
||||
// col_2:{ text: 'Fecha', style: 'tableHeader',rowSpan: 2, alignment: 'center',margin: [0, 8, 0, 0] },
|
||||
// col_3:{ text: 'Descripción', style: 'tableHeader',rowSpan: 2, alignment: 'center',margin: [0, 8, 0, 0] },
|
||||
// col_4:{ text: 'Cita con acudientes', style: 'tableHeader',colSpan: 2, alignment: 'center' }
|
||||
// },
|
||||
fila_1:{
|
||||
col_1:{ text: 'DATE', style: 'tableHeader', alignment: 'center' },
|
||||
col_2:{ text: 'Income Expense', style: 'tableHeader', alignment: 'center' },
|
||||
col_3:{ text: 'Voucher Number Bill Number', style: 'tableHeader', alignment: 'center' },
|
||||
col_4:{ text: 'Paid To Received From', style: 'tableHeader', alignment: 'center' },
|
||||
col_5:{ text: 'Sem', style: 'tableHeader', alignment: 'center'},
|
||||
col_6:{ text: 'Course', style: 'tableHeader', alignment: 'center'},
|
||||
// col_7:{ text: 'University', style: 'tableHeader', alignment: 'center'},
|
||||
// col_8:{ text: 'Type', style: 'tableHeader', alignment: 'center'},
|
||||
// col_9:{ text: 'Receipt No', style: 'tableHeader', alignment: 'center'},
|
||||
// col_10:{ text: 'Comments', style: 'tableHeader', alignment: 'center'},
|
||||
// col_11:{ text: 'Mode of Payment', style: 'tableHeader', alignment: 'center'},
|
||||
// col_12:{ text: 'Amount', style: 'tableHeader', alignment: 'center'},
|
||||
// col_13:{ text: 'Balance', style: 'tableHeader', alignment: 'center'},
|
||||
}
|
||||
}
|
||||
var body = [];
|
||||
for (var key in headers){
|
||||
if (headers.hasOwnProperty(key)){
|
||||
var header = headers[key];
|
||||
var row = new Array();
|
||||
row.push( header.col_1 );
|
||||
row.push( header.col_2 );
|
||||
row.push( header.col_3 );
|
||||
row.push( header.col_4 );
|
||||
row.push( header.col_5 );
|
||||
row.push( header.col_6 );
|
||||
// row.push( header.col_7 );
|
||||
// row.push( header.col_8 );
|
||||
// row.push( header.col_9 );
|
||||
// row.push( header.col_10 );
|
||||
// row.push( header.col_11 );
|
||||
// row.push( header.col_12 );
|
||||
// row.push( header.col_13 );
|
||||
body.push(row);
|
||||
}
|
||||
}
|
||||
for (var key in rows1)
|
||||
{
|
||||
if (rows1.hasOwnProperty(key))
|
||||
{
|
||||
var data = rows1[key];
|
||||
var row = new Array();
|
||||
row.push( data.Date.toString() );
|
||||
row.push( data.IncomeExpence.toString() );
|
||||
row.push( data.VoucherBillNumber.toString() );
|
||||
row.push( data.PaidReceivedToFrom.toString() );
|
||||
row.push( data.Sem.toString() );
|
||||
row.push( data.Course.toString() );
|
||||
// row.push( data.University.toString() );
|
||||
// row.push( data.Type.toString() );
|
||||
// row.push( data.ReceiptNo.toString() );
|
||||
// row.push( data.Comments.toString() );
|
||||
// row.push( data.ModeofPayment.toString() );
|
||||
// row.push( data.Amount.toString() );
|
||||
// row.push( data.Balance.toString() );
|
||||
body.push(row);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var docDefinition = {
|
||||
pageMargins: [40,155,40,55],
|
||||
pageOrientation: 'landscape',
|
||||
header: function() {
|
||||
return {
|
||||
margin: 40,
|
||||
columns: [
|
||||
{
|
||||
},
|
||||
{ text:['Resumen disciplinario'],
|
||||
alignment: 'left',bold:true,margin:[-405,80,0,0],fontSize: 24}
|
||||
]
|
||||
}
|
||||
},
|
||||
footer: function(currentPage, pageCount) {
|
||||
return { text:'Pagina '+ currentPage.toString() + ' de ' + pageCount, alignment: 'center',margin:[0,30,0,0] };
|
||||
},
|
||||
content: [
|
||||
{
|
||||
layout: 'lightHorizontalLines', // optional
|
||||
table: {
|
||||
// headers are automatically repeated if the table spans over multiple pages
|
||||
// you can declare how many rows should be treated as headers
|
||||
// headerRows: 1,
|
||||
// widths: [ '*', 'auto', 100, '*' ],
|
||||
|
||||
// body: [
|
||||
// [ 'First', 'Second', 'Third', 'The last one' ],
|
||||
// [ 'Value 1', 'Value 2', 'Value 3', 'Value 4' ],
|
||||
// [ { text: 'Bold value', bold: true }, 'Val 2', 'Val 3', 'Val 4' ]
|
||||
// ]
|
||||
widths: [ '*', '*', '*', '*', '*' ],
|
||||
headerRows: 2,
|
||||
// keepWithHeaderRows: 1,
|
||||
body: body
|
||||
}
|
||||
}
|
||||
],
|
||||
styles: {
|
||||
header: {
|
||||
fontSize: 28,
|
||||
bold: true
|
||||
},
|
||||
subheader: {
|
||||
fontSize: 15,
|
||||
bold: true
|
||||
},
|
||||
quote: {
|
||||
italics: true
|
||||
},
|
||||
small: {
|
||||
fontSize: 8
|
||||
},
|
||||
sta: {
|
||||
fontSize: 11,
|
||||
bold: false,
|
||||
alignment: 'justify'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
alert(JSON.stringify(rows1));
|
||||
// pdfMake.createPdf(docDefinition).download();
|
||||
pdfMake.createPdf(docDefinition).print();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
||||
// income expense type status list
|
||||
$scope.getIncomeExpenseType_Status = function () {
|
||||
var getIncomeExpenseType = {
|
||||
@ -603,3 +783,5 @@ $scope.dayBookApprovalAccess = '';
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -167,13 +167,244 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
||||
|
||||
|
||||
$scope.exportData = function () {
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,InitialPayDate as InititalPaymentDate,EnrollmentNumber as EnrollmentID,Student_name as StudentName,FatherName as FatherName,CourseName as CourseName,Sem_Year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,UniversityName as University,StatusName as ApplicationPendingStatus,FormType as FormType,StatusUpdationOn as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_pending_data]);
|
||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,InitialPayDate as InititalPaymentDate,EnrollmentNumber as EnrollmentID,Student_name as StudentName,FatherName as FatherName,Course_name as CourseName,Sem_Year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,StatusName as ApplicationPendingStatus,FormType as FormType,StatusUpdationOn as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_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.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 {
|
||||
|
||||
68341
Apollo/assets/js/directives/pdf_make/pdfMake.js
Normal file
68341
Apollo/assets/js/directives/pdf_make/pdfMake.js
Normal file
File diff suppressed because one or more lines are too long
47
Apollo/assets/js/directives/pdf_make/virtual-fs.js
Normal file
47
Apollo/assets/js/directives/pdf_make/virtual-fs.js
Normal file
File diff suppressed because one or more lines are too long
@ -123,10 +123,10 @@
|
||||
<td>{{p.EnrollmentNumber}}</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Student_name}}</a></td>
|
||||
<td>{{p.FatherName}}</td>
|
||||
<td>{{p.CourseName}}</td>
|
||||
<td>{{p.Course_name}}</td>
|
||||
<td>{{p.Sem_Year}}</td>
|
||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Phone_number}}</a></td>
|
||||
<td>{{p.UniversityName}}</td>
|
||||
<td>{{p.University}}</td>
|
||||
<td>{{p.StatusName}}</td>
|
||||
<td>{{p.FormType}}</td>
|
||||
<td>{{p.StatusUpdationOn}}</td>
|
||||
|
||||
@ -101,6 +101,11 @@
|
||||
<script src="assets/js/directives/file-upload.js"></script>
|
||||
<script src="assets/js/directives/convert-words.js"></script>
|
||||
<script src="assets/js/directives/table-export.js"></script>
|
||||
|
||||
<!--pdfmake plugin -->
|
||||
<script src="assets/js/directives/pdf_make/pdfMake.js"></script>
|
||||
<script src="assets/js/directives/pdf_make/virtual-fs.js"></script>
|
||||
|
||||
<!-- Clip-Two Controllers -->
|
||||
<script src="assets/js/controllers/mainCtrl.js"></script>
|
||||
<script src="assets/js/controllers/bootstrapCtrl.js"></script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user