diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php
index c8dae92c..3779fad4 100755
--- a/Apollo/api/application/config/routes.php
+++ b/Apollo/api/application/config/routes.php
@@ -214,6 +214,9 @@ $route['getAllDayBookDetails'] = 'DayBook_Controller/getAllDayBookDetails';
$route['update_DayBookDetails'] = 'DayBook_Controller/update_DayBookDetailsData';
+$route['Getnotificcations'] = 'Student_Controller/Getnotificcations';
+
+
$route['AllgetUniversity'] = 'Report/getAllUniversity';
$route['NewregDetails'] = 'Report/NewregDetails';
diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php
index d7ca1246..1425c328 100755
--- a/Apollo/api/application/controllers/Call_Tracking_Controller.php
+++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php
@@ -119,10 +119,13 @@ class Call_Tracking_Controller extends REST_Controller {
$tracking_followup_details['StatusName'] = $this->post('status');
$tracking_followup_details['AssignedStaff'] = $this->post('assignedTo');
+ $message = $this->post('msgactivity');
+ // echo $message;die();
- $leadDetails = $this->Calltracking_model->addleadDetails($lead_details,$tracking_details,$tracking_followup_details);// Check if the users data store contains users (in case the database result returns NULL)
+
+ $leadDetails = $this->Calltracking_model->addleadDetails($lead_details,$tracking_details,$tracking_followup_details,$message);// Check if the users data store contains users (in case the database result returns NULL)
if ($leadDetails)
{
$leadDetails['status'] = REST_Controller::HTTP_OK;
diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php
index d75c01ae..e22bc187 100755
--- a/Apollo/api/application/controllers/Report.php
+++ b/Apollo/api/application/controllers/Report.php
@@ -501,6 +501,9 @@ class Report extends REST_Controller {
$det['from'] = $this->post('from');
$det['to'] = $this->post('to');
$det['university'] = $this->post('university');
+ $det['branchId'] = $this->post('branchId');
+
+
$feelist = $this->report_model->GetFeePaidDetails($det);
diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php
index 1babfbee..e19c6b7d 100755
--- a/Apollo/api/application/controllers/Student_Controller.php
+++ b/Apollo/api/application/controllers/Student_Controller.php
@@ -689,4 +689,29 @@ class Student_Controller extends REST_Controller {
}
+
+
+
+
+ public function Getnotificcations_post()
+ {
+ $det['StudentID']=$this->post('StudentID');
+ $det['Phone']= $this->post('Phone');
+ $det['Email']=$this->post('Email');
+ $det['loginBranch']= $this->post('loginBranch');
+ $det['createdBy']=$this->post('createdBy');
+
+ $getnotifications = $this->student_model->GetStudentNotifications($det);
+
+ if ($getnotifications) {
+ $getnotifications['status'] = REST_Controller::HTTP_OK;
+ // Set the response and exit
+ $this->response($getnotifications, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
+ } else {
+ // Set the response and exit
+ $this->response(['message' => 'No users were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
+ }
+
+ }
+
}
\ No newline at end of file
diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php
index b4cd1c28..a0db31c1 100755
--- a/Apollo/api/application/models/Calltracking_model.php
+++ b/Apollo/api/application/models/Calltracking_model.php
@@ -312,8 +312,11 @@ class Calltracking_model extends CI_Model {
* created by kms
* */
- public function addleadDetails($lead_Details=null,$track_Details=null,$followup_Details=null)
+ public function addleadDetails($lead_Details=null,$track_Details=null,$followup_Details=null,$messagecheck=null)
{
+
+
+ // print_r($lead_Details);die();
$this->db->insert(LEAD_DETAILS, $lead_Details);
// this if for insert lead details
if($this->db->affected_rows() == '1'){
@@ -325,10 +328,72 @@ class Calltracking_model extends CI_Model {
$followup_Details['TrackingID']=$this->db->insert_id();
$this->db->insert(LEAD_TRACKING_FOLLOWUP, $followup_Details);
// this if for insert follow up details
- if($this->db->affected_rows() == '1'){
+ if($this->db->affected_rows() == '1')
+ {
+
+
+ if($messagecheck !=0)
+ {
+ $number = $lead_Details['MobileNumber'];
+ $name = $lead_Details['LeadName'];
+ $CourseName = $track_Details['Course'];
+ $Email = $track_Details['EmailID'];
+
+
+
+
+
+ // $msg='Dear '.$name.', Thank for Enquiring with Apollo Distance Education College for the course '.$CourseName.'. Pls Feel free to call us for more information 9962012985,9962012982.Thanks.';
+
+
+ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education College for the course '.$CourseName.'. Pls feel free to call us for more information at 9962012985 or 9962012982.';
+
+
+ $messa = urlencode($msg);
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $number . "&SenderID=APODEC&Message=" . $messa . "&ServiceName=TEMPLATE_BASED");
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
+ $output = curl_exec($ch);
+ curl_close($ch);
+
+ $arrss = explode('
', $output);
+
+ $time = date('Y-m-d H:i:s');
+ $dateTime = $time;
+ $msgGroup = date('YmdHis');
+
+ for ($i = 0, $c = count($arrss);$i < $c;$i++)
+ {
+
+ if ($arrss[$i] === '')
+ {
+ break;
+ }
+ else
+ {
+ $a = explode(':', $arrss[$i]);
+ $msgIdState = $a[0];
+ $msgId = $a[1];
+ $msgNumb = $a[2];
+ $msgStatus = $a[4];
+ $data[] = array('MsgId' => $msgId, 'MobileNumber' => $msgNumb, 'MsgBody' => $msg, 'Status' => $msgStatus, 'CreatedOn' => $dateTime,'MsgGroup' => $msgGroup);
+ continue;
+ }
+ }
+
+
+ $this->mailsend($Email, $msg);
+
+ $this->db->insert_batch('T_BroadcastStatus', $data);
+
+ }
+
+
$result['leadStatus'] = true;
$result['message'] = "Successfully lead details added";
- }
+
+
+ }
else{
$result['leadStatus'] = false;
$result['message'] = "Something went wrong.please try again";
@@ -351,6 +416,68 @@ class Calltracking_model extends CI_Model {
}
+
+
+
+
+
+ public function mailsend($mail, $msg) {
+
+ // $list = implode(',', $mail);
+
+ $list = $mail;
+ $sub = 'Enquiry Details';
+ //Load email library
+ $this->load->library('email');
+ //SMTP & mail configuration
+ $config = array(
+ 'protocol' => 'smtp',
+ 'smtp_host' => 'smtp.sendgrid.net',
+ 'smtp_port' => 587,
+ 'smtp_user' => 'apikey',
+ 'smtp_pass' => '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',
+ 'mailtype' => 'html',
+ 'charset' => 'utf-8'
+ );
+ $this->email->initialize($config);
+ $this->email->set_mailtype("html");
+ $this->email->set_newline("\r\n");
+ // print_r($this->email);exit();
+ //Email content
+ // $htmlContent = '
Sending email via SMTP server
';
+ $htmlContent = $msg;
+ // Email body load the html template
+ // $body = $this->load->view('emails/anillabs.php',$data,TRUE);
+ $this->email->to($list);
+ $this->email->from('noreply@apollodec.com','Apollo');
+ $subj = $sub;
+ $this->email->subject($subj);
+ $this->email->message($htmlContent);
+ //Send email 1
+ $result = $this->email->send();
+
+
+ $time = date('Y-m-d H:i:s');
+ $dateTime = $time;
+ $msgGroup = date('YmdHis');
+
+
+ $data[] = array('MobileNumber' => $list, 'MsgBody' => $htmlContent, 'Status' => 'success', 'CreatedOn' => $dateTime,'MsgGroup' => $msgGroup);
+
+
+ $this->db->insert_batch('T_BroadcastStatus', $data);
+ // echo $this->email->print_debugger(); exit();
+ return $result;
+
+ }
+
+
+
+
+
+
+
+
/*
* get all tracked details
* created by kms
diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php
index 3513cdca..4f2f4c86 100755
--- a/Apollo/api/application/models/Fees_status_model.php
+++ b/Apollo/api/application/models/Fees_status_model.php
@@ -1650,6 +1650,44 @@ $REGID='';
// print_r($output);exit();
curl_close($ch);
+
+ $arrss = explode('
', $output);
+
+ $time = date('Y-m-d H:i:s');
+ $dateTime = $time;
+ $msgGroup = date('YmdHis');
+
+ //print_r($arrss);
+
+ for ($i = 0, $c = count($arrss);$i < $c;$i++)
+ {
+
+ if ($arrss[$i] === '')
+ {
+ break;
+ }
+ else
+ {
+ $a = explode(':', $arrss[$i]);
+ $msgIdState = $a[0];
+ $msgId = $a[1];
+ $msgNumb = $a[2];
+ $msgStatus = $a[4];
+ $data = array('MsgId' => $msgId, 'MobileNumber' => $msgNumb, 'MsgBody' => $data, 'Status' => $msgStatus, 'CreatedOn' => $dateTime,'MsgGroup' => $msgGroup);
+ continue;
+ }
+ }
+
+
+ // print_r($data);die();
+
+ $this->db->insert('T_BroadcastStatus',$data);
+
+
+
+
+
+
return $output;
}
diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php
index b2add3cf..ce1b757d 100755
--- a/Apollo/api/application/models/Reports_model.php
+++ b/Apollo/api/application/models/Reports_model.php
@@ -1167,7 +1167,7 @@ $query = $this->db->query($subQuery,array());
$fromd= date("Y-m-d",strtotime($start_date));
$tod=date("Y-m-d",strtotime($end_date));
- //echo $det['university'];die() ;
+ //echo $det['branchId'];die() ;
$this->db->select('d.UniversityID,UniversityName,
sum(IF(ModeOfPayment ="CASH", BillAmount, 0)) AS Cash,
@@ -1191,6 +1191,8 @@ $query = $this->db->query($subQuery,array());
$this->db->where("date_format(a.CreatedOn,'%Y-%m-%d')<=",date('Y-m-d', strtotime($end_date)));
+ $this->db->where('d.BranchCode',$det['branchId']);
+
$this->db->where('a.IsActive','1');
@@ -1219,8 +1221,8 @@ if($feeDetails)
}
- //print_r( $this->db->last_query());
- //die();
+ // print_r( $this->db->last_query());
+ // die();
return $result_array;
diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php
index ea706ea4..f5be41cf 100755
--- a/Apollo/api/application/models/StatusUpdation_model.php
+++ b/Apollo/api/application/models/StatusUpdation_model.php
@@ -623,11 +623,45 @@ $latestappstatus='';
}
$mobile = implode(',', $number);
$message = urlencode($msg);
+
+
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=APODEC&Message=" . $message . "&ServiceName=TEMPLATE_BASED");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$output = curl_exec($ch);
curl_close($ch);
+
+
+ $arrss = explode('
', $output);
+
+ $time = date('Y-m-d H:i:s');
+ $dateTime = $time;
+ $msgGroup = date('YmdHis');
+
+
+ for ($i = 0, $c = count($arrss);$i < $c;$i++)
+ {
+
+ if ($arrss[$i] === '')
+ {
+ break;
+ }
+ else
+ {
+ $a = explode(':', $arrss[$i]);
+ $msgIdState = $a[0];
+ $msgId = $a[1];
+ $msgNumb = $a[2];
+ $msgStatus = $a[4];
+ $data[] = array('MsgId' => $msgId, 'MobileNumber' => $msgNumb, 'MsgBody' => $msg, 'Status' => $msgStatus, 'CreatedOn' => $dateTime,'MsgGroup' => $msgGroup);
+ continue;
+ }
+ }
+
+
+ $this->db->insert_batch('T_BroadcastStatus', $data);
+
+
return $output;
}
@@ -666,6 +700,24 @@ $latestappstatus='';
$this->email->message($htmlContent);
//Send email 1
$result = $this->email->send();
+
+
+
+
+
+ $time = date('Y-m-d H:i:s');
+ $dateTime = $time;
+ $msgGroup = date('YmdHis');
+
+
+ $data[] = array('MobileNumber' => $list, 'MsgBody' => $htmlContent, 'Status' => 'success', 'CreatedOn' => $dateTime,'MsgGroup' => $msgGroup);
+
+
+$this->db->insert_batch('T_BroadcastStatus', $data);
+
+
+
+
// echo $this->email->print_debugger(); exit();
return $result;
diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php
index a8adbca9..5e26be50 100755
--- a/Apollo/api/application/models/Student_model.php
+++ b/Apollo/api/application/models/Student_model.php
@@ -37,27 +37,23 @@ class Student_model extends CI_Model {
}
public function get_student_tracking_details($universityid,$courseid,$MobileNumber,$loginBranch)
{
- $this->db->select ('LTF.FollowupOn,LD.LeadID,LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry,LT.TrackingID,LT.ActivityStatus,LT.AssignedTo,LT.StatusCode,LT.University,LT.Course,LT.AlternateMobile,LT.Address,LT.Flag,ST.StaffID,ST.Firstname,PLD1.ListCode as statusListCode,PLD1.ListName as statusListName,AV.ActivityID,AV.ActivityName,LTF.FollowupComments');
- $this->db->from(LEAD_TRACKING_FOLLOWUP.' as LTF');
- $this->db->join(LEAD_TRACKING.' as LT','LT.TrackingID=LTF.TrackingID');
- $this->db->join(LEAD_DETAILS.' as LD', 'LT.LeadID = LD.LeadID');
- $this->db->join(LOGIN.' as LO', 'LO.ID = LT.AssignedTo');
- $this->db->join(STAFF.' as ST', 'ST.StaffID = LO.StaffID');
- $this->db->join(ACTIVITY.' as AV', 'AV.ActivityID = LT.ActivityStatus');
- $this->db->join(PICK_LIST_DETAILS.' as PLD1', 'PLD1.ListCode = LT.StatusCode');
- $this->db->join(UNIVERSITY.' as UM','UM.UniversityName=LT.University');
- $this->db->join(COURSE.' as CM','CM.CourseName=LT.Course');
- $this->db->where('LD.MobileNumber',$MobileNumber);
- $this->db->where('PLD1.BranchCode',$loginBranch);
- $this->db->where('UM.UniversityID',$universityid);
- $this->db->where('CM.CourseID',$courseid);
- //$this->db->group by('LD.LeadID');
- $this->db->group_by('LD.LeadID');
- $trackingDetails=$this->db->get()->result_array();
- $result =$trackingDetails;
- return $result;
- }
-
+ $sql="SELECT LTF.FollowupOn,LD.LeadID,LTF.InteractionId, LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry, LT.TrackingID, LT.ActivityStatus,LT.AssignedTo, LT.StatusCode, LT.University, LT.Course, LT.AlternateMobile, LT.Address,LT.Flag, ST.StaffID, ST.Firstname, PLD1.ListCode as statusListCode, PLD1.ListName as statusListName, AV.ActivityID ,AV.ActivityName, LTF.FollowupComments
+ FROM T_Lead_Tracking_Followup as LTF
+ JOIN T_Lead_Tracking as LT ON LT.TrackingID=LTF.TrackingID
+ JOIN T_Lead_Details as LD ON LT.LeadID = LD.LeadID
+ JOIN T_Login as LO ON LO.ID = LT.AssignedTo
+ JOIN T_StaffDetails as ST ON ST.StaffID = LO.StaffID
+ JOIN T_ActivityMaster as AV ON AV.ActivityID = LT.ActivityStatus
+ JOIN T_PickListDetails as PLD1 ON PLD1.ListCode = LT.StatusCode
+ JOIN T_UniversityMaster as UM ON UM.UniversityName=LT.University
+ JOIN T_CourseMaster as CM ON CM.CourseName=LT.Course
+ WHERE LD.MobileNumber = '".$MobileNumber."' AND PLD1.BranchCode= '".$loginBranch."' AND UM.UniversityID = '".$universityid."' AND CM.CourseID = '".$courseid."' AND LTF.InteractionId in (select max(InteractionId) from T_Lead_Tracking_Followup GROUP BY TrackingID)";
+
+ $b=$this->db->query($sql);
+ $trackingDetails = $b->result();
+ $result =$trackingDetails;
+ return $result;
+ }
// get student list based on login user
public function get_student_list($loginUserId, $loginUserBranchId, $loginUserType, $getSearchData,$batchcode) {
if ($loginUserType == SUPER_ADMIN) {
@@ -1651,6 +1647,37 @@ class Student_model extends CI_Model {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$output = curl_exec($ch);
curl_close($ch);
+
+
+
+ $arrss = explode('
', $output);
+
+ $time = date('Y-m-d H:i:s');
+ $dateTime = $time;
+ $msgGroup = date('YmdHis');
+
+ for ($i = 0, $c = count($arrss);$i < $c;$i++)
+ {
+
+ if ($arrss[$i] === '')
+ {
+ break;
+ }
+ else
+ {
+ $a = explode(':', $arrss[$i]);
+ $msgIdState = $a[0];
+ $msgId = $a[1];
+ $msgNumb = $a[2];
+ $msgStatus = $a[4];
+ $data[] = array('MsgId' => $msgId, 'MobileNumber' => $msgNumb, 'MsgBody' => $msg, 'Status' => $msgStatus, 'CreatedOn' => $dateTime,'MsgGroup' => $msgGroup);
+ continue;
+ }
+ }
+
+
+ $this->db->insert_batch('T_BroadcastStatus', $data);
+
return $output;
}
@@ -1725,4 +1752,72 @@ class Student_model extends CI_Model {
}
+
+
+ public function GetStudentNotifications($det)
+ {
+
+
+ $this->db->select('*');
+ $this->db->from('T_BroadcastStatus');
+ $this->db->like('MobileNumber', $det['Phone'], 'before');
+ $messagedet = $this->db->get();
+
+ if($messagedet ->result())
+ {
+
+ $result_array['msgStatus'] = true;
+ $result_array['msgdetails'] = $messagedet->result();
+ }
+
+ else
+ {
+ $result_array['msgStatus'] = false;
+ $result_array['msgdetails'] = 'No Records Found';
+ }
+
+ $this->db->select('*');
+ $this->db->from('T_BroadcastStatus');
+ $this->db->where('MobileNumber', $det['Email']);
+ $maildet = $this->db->get();
+
+
+ if($maildet ->result())
+ {
+
+ $result_array['mailStatus'] = true;
+ $result_array['maildetails'] = $maildet->result();
+ }
+
+ else
+ {
+ $result_array['mailStatus'] = false;
+ $result_array['maildetails'] = 'No Records Found';
+ }
+
+///print_r($this->db->last_query());die();
+
+ $this->db->select('StudentID');
+ $this->db->from('T_StudentDetails');
+ $this->db->where('MobileNumber', $det['Phone']);
+ $studentID = $this->db->get();
+
+
+ if($studentID ->result())
+ {
+
+ $result_array['stuidStatus'] = true;
+ $result_array['StudentID'] = $studentID->result();
+ }
+
+ else
+ {
+ $result_array['stuidStatus'] = false;
+ $result_array['StudentID'] = 'No Records Found';
+ }
+
+ return $result_array;
+
+ }
+
}
\ No newline at end of file
diff --git a/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js
index 1f173a6b..a4c0e6e7 100644
--- a/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js
+++ b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js
@@ -91,6 +91,8 @@ $scope.universityId='';
$scope.getDetails = function (form,myModel)
{
+// console.log(JSON.parse(localStorage.getItem('localObj')).localBranchID);
+// return false;
var firstError = null;
if (form.$invalid) {
@@ -161,7 +163,8 @@ $scope.tod = to_dt;
data: {
university: $scope.universityId,
from : $scope.filters.from_date ,
- to : $scope.filters.to_date
+ to : $scope.filters.to_date,
+ branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
}
}
diff --git a/Apollo/assets/js/controllers/callTrackingCtrl.js b/Apollo/assets/js/controllers/callTrackingCtrl.js
index fe82c8d6..c868fce6 100755
--- a/Apollo/assets/js/controllers/callTrackingCtrl.js
+++ b/Apollo/assets/js/controllers/callTrackingCtrl.js
@@ -241,7 +241,18 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
$scope.trackForm = {
submit: function (form, myModel,loading) {
+//console.log(myModel.activity.activityName);
+var string = myModel.activity.activityName;
+var Upperstring = string.toUpperCase();
+var checkresult = Upperstring.search("ADMISSION");
+var msgactivity = 0;
+if(checkresult != -1)
+{
+ msgactivity = 1;
+}
+// console.log(msgactivity)
+// return false;
if(isNaN(myModel.date)){
$scope.nextFollowupDate = myModel.date;
@@ -309,7 +320,8 @@ app.controller('callTrackingCtrl', ["$scope","$rootScope","toaster", "$filter",
emailId:myModel.emailId,
enquiryStatus:myModel.enquiryStatus,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
- branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID
+ branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
+ msgactivity:msgactivity
}
};
@@ -1648,6 +1660,21 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
};
$rootScope.loadFollowupDetails = function (trackID) {
+ if(trackID==null || trackID=='')
+ {
+
+ $scope.value = $rootScope.trackingid;
+ $scope.showprev = false;
+ $scope.shownext = false;
+ console.log($scope.value);
+ }
+ else
+ {
+ $scope.value = trackID;
+ $scope.showprev = true;
+ $scope.shownext =true;
+ console.log($scope.value);
+ }
var load = {
method: 'POST',
url: apiPoint.url + 'loadFollowupDetails/',
@@ -1655,7 +1682,7 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
'Content-Type': 'application/json'
},
data: {
- trackingID: trackID,
+ trackingID: $scope.value,
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
@@ -1798,9 +1825,10 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
} else {
swal("Failed!", response.data.message, "error");
}
+
});
-
+ localStorage.removeItem('trackID');
}
/*
@@ -1824,6 +1852,11 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
* created by kms
* */
$scope.cancel = function () {
+ $scope.valvo = $rootScope.trackingid;
+ if($scope.valvo!='')
+ {
+ $state.go('app.call.tracking');
+ }
if(JSON.parse(localStorage.getItem('searchObj')).callFrom=='details'){
$state.go('app.call.tracking');
}
diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js
index 7ec08c3c..7b976b96 100755
--- a/Apollo/assets/js/controllers/feesStatusCtrl.js
+++ b/Apollo/assets/js/controllers/feesStatusCtrl.js
@@ -301,19 +301,59 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* created by kms
* */
$scope.changeSessions = function (details,type) {
- if(details.SessionName!=undefined && details.SessionName!=''){
- //console.log('if');
+ //console.log(details.Sem_Year);return false;
+
+ // console.log($scope.setfeedetails);return false;
+
+ var role = JSON.parse(localStorage.getItem('localObj')).localType;
+
+ if($scope.setfeedetails.length != 0)
+ {
+ angular.forEach($scope.setfeedetails,function (setfeedetails,key) {
+
+ if(setfeedetails.Sem_Year == details.Sem_Year)
+ {
+
+ if(role=='R002' || role == 'R005')
+ {
+
+ //console.log('if')
+ $scope.readonlycheck =true;
+ }
+
+
+
+ else
+ {
+ //console.log('ses');
+ $scope.readonlycheck =false;
+ }
+ }
+
+
+
+ });
+ }
+
+
+ if(details.SessionName!=undefined && details.SessionName!='')
+ {
+
+ console.log('if');
$scope.sessionDetails=[];
$scope.sessionDetailsTo=[];
- if(type==1){
+ if(type==1)
+ {
$scope.setModel.feesType.ToSessionName="";
}
- else{
+ else
+ {
$scope.setModel.feesType.ToSessionName=details.ToSessionName;
}
- if(details.ProgramType=='Y001' && details.SNo=='1'){
+ if(details.ProgramType=='Y001' && details.SNo=='1')
+ {
//console.log('if1')
// get session details
@@ -335,11 +375,13 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
});
}
- else if(details.ProgramType=='Y001' && details.SNo!='1'){
+ else if(details.ProgramType=='Y001' && details.SNo!='1')
+ {
// console.log('if else1')
- if($scope.feesStructureInfo[0].SessionName!=''){
+ if($scope.feesStructureInfo[0].SessionName!='')
+ {
// console.log('else if if')
// get session details
@@ -367,7 +409,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
// after branch changes
- else{
+ else
+ {
// console.log('else if else')
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
@@ -388,7 +431,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
- else{
+ else
+ {
// console.log('else')
// get session details
@@ -417,12 +461,16 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
});
}
}
- else{
+
+ else
+ {
// console.log('function else')
// alert("function else");
- if(details.ProgramType=='Y001' && details.SNo!='1'){
+ if(details.ProgramType=='Y001' && details.SNo!='1')
+ {
+ // console.log('else if')
// alert("else if");
$scope.sessionDetails=[];
$scope.sessionDetailsTo=[];
@@ -451,7 +499,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
});
-$scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
+ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
}
else{
@@ -473,13 +521,17 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
}
- else{
+ else
+ {
+
+ // console.log('else else')
//alert("else else");
$scope.sessionDetails=[];
$scope.sessionDetailsTo=[];
- if(details.SessionName=='' || details.SessionName==null || details.SessionName==undefined){
-
+ if(details.SessionName=='' || details.SessionName==null || details.SessionName==undefined)
+ {
+ //console.log('else else if')
angular.forEach($scope.masterSessionDetails,function (svalues,skey) {
if(svalues.IsActive=='1' ){
@@ -492,8 +544,13 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
});
+
+ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
}
- else{
+ else
+ {
+
+ //console.log('else else else')
// get session details
var found = $filter('getById')($scope.masterSessionDetails, details.SessionName);
$scope.ExistSessionDate = new Date(found.SessionDate.substring(6,10)+'-'+found.SessionDate.substring(3,5)+'-'+found.SessionDate.substring(0,2));
@@ -905,16 +962,21 @@ $scope.setModel.feesType.SessionName = $scope.sessionDetails[0].SessionID;
if (response.data.status==200 && response.data.feesStatus) {
// console.log(response.data.sessionDetails);
-
+ var role = JSON.parse(localStorage.getItem('localObj')).localType;
+ //console.log(role);
$scope.setfeedetails=response.data.feesetDetails;
//console.log($scope.setfeedetails);
$scope.masterSessionDetails =response.data.sessionDetails;
//console.log($scope.masterSessionDetails);
+ $scope.readonlycheck =false;
if($scope.setfeedetails.length != 0)
{
-
+ if(role=='R002' || role == 'R005')
+ {
+
$scope.readonlycheck =true;
+ }
}
else
{
diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js
index d63f201c..f8b16fa4 100755
--- a/Apollo/assets/js/controllers/studentCtrl.js
+++ b/Apollo/assets/js/controllers/studentCtrl.js
@@ -785,6 +785,75 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
// $scope.editCourseId = -1;
}
+
+
+
+
+ $scope.cancelnotification = function()
+ {
+ $scope.msgdetID = '-1';
+ }
+
+ $scope.MailDetails='';
+ $scope.MessageDetails = '';
+ $scope.StudentIDDet = '';
+ $scope.msgdetID = -1;
+ $scope.setmessageId = function (student)
+ {
+
+ //console.log(student);return false;
+
+ var studentID= student.StudentID;
+ var phonenumber = student.MobileNumber;
+ var email = student.EmailID;
+
+
+ var sentnotification = {
+ method: 'POST',
+ url: apiPoint.url + 'Getnotificcations/',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ data: {
+
+ StudentID: studentID,
+ Phone: phonenumber,
+ Email:email,
+ loginBranch: localDetails.localBranchID,
+ createdBy: localDetails.localUserID,
+ }
+ };
+ $http(sentnotification).then(function (response) {
+
+ if(response.data.status == 200)
+ {
+ $scope.MailDetails=response.data.maildetails;
+ $scope.MessageDetails = response.data.msgdetails;
+ $scope.StudentIDDet = response.data.StudentID;
+ $scope.msgdetID = $scope.StudentIDDet[0].StudentID;
+
+ // console.log($scope.MailDetails);
+
+ }
+
+ });
+
+
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
$scope.addStudentCourse = function () {
$scope.myModelCourse = {
'university': '',
@@ -1292,7 +1361,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
// alert('in');
- // return false;
+ // return false;
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@@ -1834,12 +1903,14 @@ $scope.allcourselist ='';
$scope.editId = -1;
$scope.editCourseId = -1;
$scope.editTrackingId=-1;
+ $scope.msgdetID = -1;
$scope.setEditId = function (uniqe_id ,id) {
// alert()
$scope.editId = uniqe_id;
$scope.editCourseId = -1;
$scope.editTrackingId=-1;
+ $scope.msgdetID = -1;
}
$scope.setEditCourseId = function (uniqe_id ,id) {
@@ -1855,7 +1926,7 @@ $scope.allcourselist ='';
$scope.courseEditLoading = true;
$scope.courselist = true;
}
- $scope.setEditTrackingId = function (uniqe_id,courseid,universityid,MobileNumber) {
+ $scope.setEditTrackingId = function (uniqe_id,courseid,universityid,MobileNumber) {
$scope.list = false;
@@ -1869,6 +1940,72 @@ $scope.allcourselist ='';
$scope.trackingdetails = true;
}
+ $scope.TrackingDetails = function (s) {
+
+ $rootScope.trackingid=s.TrackingID;
+ $state.go('app.call.trackingFollowup');
+
+
+ }
+
+
+ $scope.cancelnotification = function()
+ {
+ $scope.msgdetID = '-1';
+ }
+
+ $scope.MailDetails='';
+ $scope.MessageDetails = '';
+ $scope.StudentIDDet = '';
+ $scope.msgdetID = -1;
+ $scope.setmessageId = function (student)
+ {
+
+ //console.log(student);return false;
+
+ var studentID= student.StudentID;
+ var phonenumber = student.MobileNumber;
+ var email = student.EmailID;
+
+
+ var sentnotification = {
+ method: 'POST',
+ url: apiPoint.url + 'Getnotificcations/',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ data: {
+
+ StudentID: studentID,
+ Phone: phonenumber,
+ Email:email,
+ loginBranch: localDetails.localBranchID,
+ createdBy: localDetails.localUserID,
+ }
+ };
+ $http(sentnotification).then(function (response) {
+
+ if(response.data.status == 200)
+ {
+ $scope.MailDetails=response.data.maildetails;
+ $scope.MessageDetails = response.data.msgdetails;
+ $scope.StudentIDDet = response.data.StudentID;
+ $scope.msgdetID = $scope.StudentIDDet[0].StudentID;
+
+ //console.log($scope.msgdetID);
+
+ }
+
+ });
+
+
+
+
+ }
+
+
+
+
$scope.cancel = function () {
@@ -2028,7 +2165,7 @@ $scope.allcourselist ='';
}
});
}
- $scope.getStudentTrackingDetails = function (courseid,universityid,MobileNumber)
+ $scope.getStudentTrackingDetails = function (courseid,universityid,MobileNumber)
{
$scope.trackingEditLoading = true;
@@ -2065,6 +2202,7 @@ $scope.allcourselist ='';
});
}
+
$scope.stuCourseEditDetailsObj = {};
$scope.onSlecetUnivEdit = function (univid, coursid) {
@@ -2952,6 +3090,9 @@ $scope.allcourselist ='';
if (response.data.PendingDocListStatus == true) {
// $scope.PendingDocNotFound = false;
$scope.studentPendingDocumentsDetails = response.data.student_pending_doc_details;
+
+ console.log($scope.studentPendingDocumentsDetails);
+
} else {
// $scope.PendingDocNotFound = true;
}
@@ -2970,9 +3111,11 @@ $scope.allcourselist ='';
$scope.studentEntrollPendingDocFORM = {
submit: function (form, myModelAddPendingDocDetails, stuID) {
-//console.log(myModelAddPendingDocDetails)
- // alert('in');
- // return false;
+// console.log(myModelAddPendingDocDetails);
+// console.log(form);
+// console.log(stuID);
+// // alert('in');
+// return false;
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
diff --git a/Apollo/assets/views/callTrackingFollowup.html b/Apollo/assets/views/callTrackingFollowup.html
index faddb80f..d34cc858 100755
--- a/Apollo/assets/views/callTrackingFollowup.html
+++ b/Apollo/assets/views/callTrackingFollowup.html
@@ -32,11 +32,11 @@
-
-