phone history
This commit is contained in:
parent
2440de0e31
commit
0823463b19
@ -216,6 +216,8 @@ $route['update_DayBookDetails'] = 'DayBook_Controller/update_DayBookDetailsData'
|
||||
|
||||
$route['Getnotificcations'] = 'Student_Controller/Getnotificcations';
|
||||
|
||||
$route['GetPhoneHistory'] = 'Student_Controller/GetPhoneHistory';
|
||||
|
||||
|
||||
|
||||
$route['AllgetUniversity'] = 'Report/getAllUniversity';
|
||||
|
||||
@ -385,6 +385,10 @@ class Student_Controller extends REST_Controller {
|
||||
}
|
||||
|
||||
public function updateStudentExistDetail_post() {
|
||||
|
||||
// $mobile = $this->post('OldPhone');
|
||||
$olddata= $this->post('OldDetails');
|
||||
|
||||
$data = $this->post('data');
|
||||
$updatedBy = $this->post('updatedBy');
|
||||
$updateStudent = $data['StudentID'];
|
||||
@ -426,6 +430,216 @@ class Student_Controller extends REST_Controller {
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
$studentUpdate = $this->student_model->update_student($req, $updateStudent, $imagename, $imageSource, $size); // Check if the employee exist
|
||||
|
||||
// if($mobile!= $req['MobileNumber'])
|
||||
// {
|
||||
|
||||
// $mobileHistory['StudentID'] = $data['StudentID'];
|
||||
// $mobileHistory['Previous_No'] = $mobile;
|
||||
// $mobileHistory['Current_No'] = $req['MobileNumber'];
|
||||
// $mobileHistory['UpdateBy'] = $req['UpdatedBy'];
|
||||
// $date = date('Y-m-d H:i:s');
|
||||
// $mobileHistory['UpdatedOn'] = $date;
|
||||
// $mobileHistory['branch']=$data['BranchCode'];
|
||||
|
||||
// $updatemobilehistory = $this->student_model->UpdateMobileHistory($mobileHistory);
|
||||
|
||||
|
||||
// }
|
||||
|
||||
$changed = 0;
|
||||
|
||||
if($olddata['AadharNumber'] != $req['AadharNumber'])
|
||||
{
|
||||
$mobileHistory['AadharNumber'] = $olddata['AadharNumber'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['AdmittedBy'] != $req['AdmittedBy'])
|
||||
{
|
||||
$mobileHistory['AdmittedBy'] = $olddata['AdmittedBy'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['AlternateNumber'] != $req['AlternateNumber'])
|
||||
{
|
||||
$mobileHistory['AlternateNumber'] = $olddata['AlternateNumber'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Caste'] != $req['Caste'])
|
||||
{
|
||||
$mobileHistory['Caste'] = $olddata['Caste'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Category'] != $req['Category'])
|
||||
{
|
||||
$mobileHistory['Category'] = $olddata['Category'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Comments'] != $req['Comments'])
|
||||
{
|
||||
$mobileHistory['Comments'] = $olddata['Comments'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Companyname'] != $req['Companyname'])
|
||||
{
|
||||
$mobileHistory['Companyname'] = $olddata['Companyname'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['DOB'] != $req['DOB'])
|
||||
{
|
||||
$mobileHistory['DOB'] = $olddata['DOB'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Designation'] != $req['Designation'])
|
||||
{
|
||||
$mobileHistory['Designation'] = $olddata['Designation'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['EmailID'] != $req['EmailID'])
|
||||
{
|
||||
$mobileHistory['EmailID'] = $olddata['EmailID'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Fathername'] != $req['Fathername'])
|
||||
{
|
||||
$mobileHistory['Fathername'] = $olddata['Fathername'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Firstname'] != $req['Firstname'])
|
||||
{
|
||||
$mobileHistory['Firstname'] = $olddata['Firstname'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Gender'] != $req['Gender'])
|
||||
{
|
||||
$mobileHistory['Gender'] = $olddata['Gender'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Lastname'] != $req['Lastname'])
|
||||
{
|
||||
$mobileHistory['Lastname'] = $olddata['Lastname'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['MobileNumber'] != $req['MobileNumber'])
|
||||
{
|
||||
$mobileHistory['Previous_No'] = $olddata['MobileNumber'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['MotherName'] != $req['MotherName'])
|
||||
{
|
||||
$mobileHistory['MotherName'] = $olddata['MotherName'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($olddata['Nationality'] != $req['Nationality'])
|
||||
{
|
||||
$mobileHistory['Nationality'] = $olddata['Nationality'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['Occupation'] != $req['Occupation'])
|
||||
{
|
||||
$mobileHistory['Occupation'] = $olddata['Occupation'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['OtherID'] != $req['OtherID'])
|
||||
{
|
||||
$mobileHistory['OtherID'] = $olddata['OtherID'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
if($olddata['OtherIDDetails'] != $req['OtherIDDetails'])
|
||||
{
|
||||
$mobileHistory['OtherIDDetails'] = $olddata['OtherIDDetails'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($olddata['PermanentAddress'] != $req['PermanentAddress'])
|
||||
{
|
||||
$mobileHistory['PermanentAddress'] = $olddata['PermanentAddress'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($olddata['PreQualification'] != $req['PreQualification'])
|
||||
{
|
||||
$mobileHistory['PreQualification'] = $olddata['PreQualification'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($olddata['PresentAddress'] != $req['PresentAddress'])
|
||||
{
|
||||
$mobileHistory['PresentAddress'] = $olddata['PresentAddress'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($olddata['Qualification'] != $req['Qualification'])
|
||||
{
|
||||
$mobileHistory['Qualification'] = $olddata['Qualification'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($olddata['ReferersMobileNumber'] != $req['ReferersMobileNumber'])
|
||||
{
|
||||
$mobileHistory['ReferersMobileNumber'] = $olddata['ReferersMobileNumber'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($olddata['ReferredBy'] != $req['ReferredBy'])
|
||||
{
|
||||
$mobileHistory['ReferredBy'] = $olddata['ReferredBy'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($olddata['Religion'] != $req['Religion'])
|
||||
{
|
||||
$mobileHistory['Religion'] = $olddata['Religion'];
|
||||
$changed =1;
|
||||
}
|
||||
|
||||
|
||||
if($changed == 1)
|
||||
{
|
||||
$mobileHistory['StudentID'] = $data['StudentID'];
|
||||
|
||||
$mobileHistory['Current_No'] = $req['MobileNumber'];
|
||||
$mobileHistory['UpdateBy'] = $req['UpdatedBy'];
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$mobileHistory['UpdatedOn'] = $date;
|
||||
$mobileHistory['branch']=$data['BranchCode'];
|
||||
|
||||
$updatemobilehistory = $this->student_model->UpdateMobileHistory($mobileHistory);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($studentUpdate) {
|
||||
$studentUpdate['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
@ -716,4 +930,26 @@ class Student_Controller extends REST_Controller {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function GetPhoneHistory_post()
|
||||
{
|
||||
$get['studentID'] = $this->post('StudentID');
|
||||
$get['loginBranch'] = $this->post('loginBranch');
|
||||
|
||||
$phonenumberdetails = $this->student_model->GetPhoneDetails($get);
|
||||
|
||||
if ($phonenumberdetails)
|
||||
{
|
||||
$phonenumberdetails['status'] = REST_Controller::HTTP_OK;
|
||||
$this->response($phonenumberdetails, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else {
|
||||
|
||||
$this->response(['message' => 'No data found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1844,4 +1844,56 @@ class Student_model extends CI_Model {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function UpdateMobileHistory($mobileHistory)
|
||||
{
|
||||
|
||||
$this->db->insert('T_Student_PhoneHistory',$mobileHistory);
|
||||
$r = $this->db->affected_rows();
|
||||
if(count($r)>0)
|
||||
{
|
||||
return $r;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function GetPhoneDetails($get)
|
||||
{
|
||||
|
||||
$this->db->select('Current_No,Previous_No,DATE_FORMAT(UpdatedOn,"%d-%m-%Y") as Date');
|
||||
$this->db->from('T_Student_PhoneHistory');
|
||||
$this->db->where('StudentID',$get['studentID']);
|
||||
$this->db->where('branch',$get['loginBranch']);
|
||||
$this->db->where('Previous_No !=',null);
|
||||
$this->db->group_by('Previous_No');
|
||||
|
||||
$studentMobile = $this->db->get();
|
||||
|
||||
|
||||
if($studentMobile ->result())
|
||||
{
|
||||
|
||||
$result_array['stuidStatus'] = true;
|
||||
$result_array['Mobiledetails'] = $studentMobile->result();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$result_array['stuidStatus'] = false;
|
||||
$result_array['Mobiledetails'] = 'No Records Found';
|
||||
}
|
||||
|
||||
// print_r($this->db->last_query());die();
|
||||
|
||||
return $result_array;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -302,7 +302,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
* */
|
||||
$scope.changeSessions = function (details,type) {
|
||||
|
||||
//console.log(details.Sem_Year);return false;
|
||||
// console.log(details.Sem_Year);return false;
|
||||
|
||||
// console.log($scope.setfeedetails);return false;
|
||||
|
||||
@ -318,7 +318,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
if(role=='R002' || role == 'R005')
|
||||
{
|
||||
|
||||
//console.log('if')
|
||||
console.log('if')
|
||||
$scope.readonlycheck =true;
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
|
||||
else
|
||||
{
|
||||
//console.log('ses');
|
||||
console.log('ses');
|
||||
$scope.readonlycheck =false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
// load when html page load
|
||||
$scope.init = function () {
|
||||
|
||||
|
||||
// alert('dsc');
|
||||
var logcheck = JSON.parse(localStorage.getItem('localObj'));
|
||||
|
||||
const LOCALTYPE = logcheck.localType;
|
||||
@ -752,16 +752,149 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
|
||||
//======================================================================>
|
||||
|
||||
|
||||
$scope.CopyModel={
|
||||
|
||||
'AadharNumber':'',
|
||||
'AdmittedBy':'',
|
||||
'AlternateNumber':'',
|
||||
'BranchCode': '',
|
||||
'Caste':'',
|
||||
'Category':'',
|
||||
'Comments': '',
|
||||
'Companyname':'',
|
||||
'CourseCode': '',
|
||||
'CourseID':'',
|
||||
'CourseName': '',
|
||||
'CreatedBy': '',
|
||||
'CreatedOn':'',
|
||||
'DOB': '',
|
||||
'DeactiveComments':'',
|
||||
'Designation':'',
|
||||
'EmailID':'',
|
||||
'Fathername':'',
|
||||
'Firstname':'',
|
||||
'Gender': '',
|
||||
'IsActive':'',
|
||||
'Lastname': '',
|
||||
'MobileNumber':'',
|
||||
'MotherName': '',
|
||||
'Nationality':'',
|
||||
'Occupation':'',
|
||||
'OtherID':'',
|
||||
'OtherIDDetails':'',
|
||||
'PermanentAddress':'',
|
||||
'PreQualification':'',
|
||||
'PresentAddress':'',
|
||||
'ProfilePicPath':'',
|
||||
'Qualification':'',
|
||||
'ReferersMobileNumber':'',
|
||||
'ReferredBy':'',
|
||||
'Religion':'',
|
||||
'StudentID':'',
|
||||
'Student_Course_id':'',
|
||||
'UniversityID':'',
|
||||
'UniversityName':'',
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.setEditId = function (unique_id, id) {
|
||||
$scope.OldPhone='';
|
||||
$scope.setEditId = function (unique_id, id,k) {
|
||||
|
||||
// alert()
|
||||
|
||||
|
||||
$scope.CopyModel.Fathername=k.Fathername;
|
||||
$scope.CopyModel.AadharNumber=k.AadharNumber;
|
||||
$scope.CopyModel.AdmittedBy=k.AdmittedBy;
|
||||
$scope.CopyModel.AlternateNumber = k.AlternateNumber;
|
||||
$scope.CopyModel.Caste = k.Caste;
|
||||
$scope.CopyModel.Category = k.Category;
|
||||
$scope.CopyModel.Comments=k.Comments;
|
||||
$scope.CopyModel.Companyname=k.Companyname;
|
||||
$scope.CopyModel.CourseCode= k.CourseCode;
|
||||
$scope.CopyModel.CourseID=k.CourseID;
|
||||
$scope.CopyModel.CourseName=k.CourseName;
|
||||
$scope.CopyModel.DOB = k.DOB;
|
||||
$scope.CopyModel.DeactiveComments = k.DeactiveComments;
|
||||
$scope.CopyModel.EmailID=k.EmailID;
|
||||
$scope.CopyModel.Firstname=k.Firstname;
|
||||
$scope.CopyModel.Gender=k.Gender;
|
||||
$scope.CopyModel.IsActive=k.IsActive;
|
||||
$scope.CopyModel.Lastname=k.Lastname;
|
||||
$scope.CopyModel.MobileNumber=k.MobileNumber;
|
||||
$scope.CopyModel.MotherName=k.MotherName;
|
||||
$scope.CopyModel.Nationality=k.Nationality;
|
||||
$scope.CopyModel.Occupation=k.Occupation;
|
||||
$scope.CopyModel.OtherID=k.OtherID;
|
||||
$scope.CopyModel.OtherIDDetails=k.OtherIDDetails;
|
||||
$scope.CopyModel.PermanentAddress=k.PermanentAddress;
|
||||
$scope.CopyModel.PreQualification=k.PreQualification;
|
||||
$scope.CopyModel.PresentAddress=k.PresentAddress;
|
||||
$scope.CopyModel.ReferersMobileNumber=k.ReferersMobileNumber;
|
||||
$scope.CopyModel.ReferredBy=k.ReferredBy;
|
||||
$scope.CopyModel.Religion=k.Religion;
|
||||
$scope.CopyModel.StudentID=k.StudentID;
|
||||
|
||||
|
||||
$scope.editId = unique_id;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.studentViewPage = -1;
|
||||
$scope.OldPhone=mobile;
|
||||
|
||||
$scope.OldPhone=k.MobileNumber;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$scope.PreviousPhoneDetails ='';
|
||||
$scope.Changecheck = false;
|
||||
$scope.getPhoneNoHistoy = function(studentId)
|
||||
{
|
||||
|
||||
// alert('fn')
|
||||
var getphonehistory = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'GetPhoneHistory/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
|
||||
StudentID:studentId,
|
||||
loginBranch: localDetails.localBranchID,
|
||||
createdBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http(getphonehistory).then(function (response)
|
||||
{
|
||||
|
||||
//console.log(response.data)
|
||||
if(response.data.stuidStatus == true)
|
||||
{
|
||||
$scope.PreviousPhoneDetails= response.data.Mobiledetails;
|
||||
$scope.Changecheck= true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$scope.PreviousPhoneDetails= '';
|
||||
$scope.Changecheck= false;
|
||||
}
|
||||
|
||||
console.log($scope.PreviousPhoneDetails)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.setEditCourseId = function (unique_id,id) {
|
||||
|
||||
$scope.list = false;
|
||||
@ -1567,6 +1700,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
// update student details
|
||||
$scope.updateStuDetails = function (form, p, hidedob) {
|
||||
|
||||
|
||||
// console.log($scope.OldPhone);return false;
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
@ -1602,6 +1737,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
data: {
|
||||
data: p,
|
||||
updatedBy: localDetails.localUserID,
|
||||
OldPhone: $scope.OldPhone,
|
||||
OldDetails:$scope.CopyModel
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
@ -1668,6 +1805,9 @@ $scope.allcourselist ='';
|
||||
// load when html page load
|
||||
$scope.init = function () {
|
||||
$scope.che='123';
|
||||
|
||||
//console.log($scope.che);
|
||||
|
||||
$scope.localUserType = localDetails.localType;
|
||||
if (localDetail != null) {
|
||||
if (localDetails.localType === 'R004') {
|
||||
@ -1961,19 +2101,157 @@ $scope.allcourselist ='';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.CopyModel={
|
||||
|
||||
'AadharNumber':'',
|
||||
'AdmittedBy':'',
|
||||
'AlternateNumber':'',
|
||||
'BranchCode': '',
|
||||
'Caste':'',
|
||||
'Category':'',
|
||||
'Comments': '',
|
||||
'Companyname':'',
|
||||
'CourseCode': '',
|
||||
'CourseID':'',
|
||||
'CourseName': '',
|
||||
'CreatedBy': '',
|
||||
'CreatedOn':'',
|
||||
'DOB': '',
|
||||
'DeactiveComments':'',
|
||||
'Designation':'',
|
||||
'EmailID':'',
|
||||
'Fathername':'',
|
||||
'Firstname':'',
|
||||
'Gender': '',
|
||||
'IsActive':'',
|
||||
'Lastname': '',
|
||||
'MobileNumber':'',
|
||||
'MotherName': '',
|
||||
'Nationality':'',
|
||||
'Occupation':'',
|
||||
'OtherID':'',
|
||||
'OtherIDDetails':'',
|
||||
'PermanentAddress':'',
|
||||
'PreQualification':'',
|
||||
'PresentAddress':'',
|
||||
'ProfilePicPath':'',
|
||||
'Qualification':'',
|
||||
'ReferersMobileNumber':'',
|
||||
'ReferredBy':'',
|
||||
'Religion':'',
|
||||
'StudentID':'',
|
||||
'Student_Course_id':'',
|
||||
'UniversityID':'',
|
||||
'UniversityName':'',
|
||||
|
||||
};
|
||||
|
||||
|
||||
$scope.editId = -1;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.editTrackingId=-1;
|
||||
$scope.msgdetID = -1;
|
||||
$scope.setEditId = function (uniqe_id ,id) {
|
||||
$scope.OldPhone='';
|
||||
$scope.setEditId = function (uniqe_id ,id,k) {
|
||||
|
||||
// alert()
|
||||
//alert()
|
||||
//console.log(k);
|
||||
$scope.CopyModel.Fathername=k.Fathername;
|
||||
$scope.CopyModel.AadharNumber=k.AadharNumber;
|
||||
$scope.CopyModel.AdmittedBy=k.AdmittedBy;
|
||||
$scope.CopyModel.AlternateNumber = k.AlternateNumber;
|
||||
$scope.CopyModel.Caste = k.Caste;
|
||||
$scope.CopyModel.Category = k.Category;
|
||||
$scope.CopyModel.Comments=k.Comments;
|
||||
$scope.CopyModel.Companyname=k.Companyname;
|
||||
$scope.CopyModel.CourseCode= k.CourseCode;
|
||||
$scope.CopyModel.CourseID=k.CourseID;
|
||||
$scope.CopyModel.CourseName=k.CourseName;
|
||||
$scope.CopyModel.DOB = k.DOB;
|
||||
$scope.CopyModel.DeactiveComments = k.DeactiveComments;
|
||||
$scope.CopyModel.EmailID=k.EmailID;
|
||||
$scope.CopyModel.Firstname=k.Firstname;
|
||||
$scope.CopyModel.Gender=k.Gender;
|
||||
$scope.CopyModel.IsActive=k.IsActive;
|
||||
$scope.CopyModel.Lastname=k.Lastname;
|
||||
$scope.CopyModel.MobileNumber=k.MobileNumber;
|
||||
$scope.CopyModel.MotherName=k.MotherName;
|
||||
$scope.CopyModel.Nationality=k.Nationality;
|
||||
$scope.CopyModel.Occupation=k.Occupation;
|
||||
$scope.CopyModel.OtherID=k.OtherID;
|
||||
$scope.CopyModel.OtherIDDetails=k.OtherIDDetails;
|
||||
$scope.CopyModel.PermanentAddress=k.PermanentAddress;
|
||||
$scope.CopyModel.PreQualification=k.PreQualification;
|
||||
$scope.CopyModel.PresentAddress=k.PresentAddress;
|
||||
$scope.CopyModel.ReferersMobileNumber=k.ReferersMobileNumber;
|
||||
$scope.CopyModel.ReferredBy=k.ReferredBy;
|
||||
$scope.CopyModel.Religion=k.Religion;
|
||||
$scope.CopyModel.StudentID=k.StudentID;
|
||||
|
||||
|
||||
//console.log($scope.CopyModel)
|
||||
|
||||
// console.log(id)
|
||||
$scope.editId = uniqe_id;
|
||||
$scope.editCourseId = -1;
|
||||
$scope.editTrackingId=-1;
|
||||
$scope.msgdetID = -1;
|
||||
|
||||
$scope.OldPhone=k.MobileNumber;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.PreviousPhoneDetails ='';
|
||||
$scope.Changecheck = false;
|
||||
$scope.getPhoneNoHistoy = function(studentId)
|
||||
{
|
||||
|
||||
// alert('fn')
|
||||
var getphonehistory = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'GetPhoneHistory/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
|
||||
StudentID:studentId,
|
||||
loginBranch: localDetails.localBranchID,
|
||||
createdBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$http(getphonehistory).then(function (response)
|
||||
{
|
||||
|
||||
//console.log(response.data)
|
||||
if(response.data.stuidStatus == true)
|
||||
{
|
||||
$scope.PreviousPhoneDetails= response.data.Mobiledetails;
|
||||
$scope.Changecheck= true;
|
||||
|
||||
console.log($scope.PreviousPhoneDetails)
|
||||
}
|
||||
else
|
||||
{
|
||||
$scope.PreviousPhoneDetails= '';
|
||||
$scope.Changecheck= false;
|
||||
}
|
||||
|
||||
console.log($scope.PreviousPhoneDetails)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$scope.setEditCourseId = function (uniqe_id ,id) {
|
||||
|
||||
//alert('1');
|
||||
@ -3324,6 +3602,12 @@ $scope.allcourselist ='';
|
||||
// update student details
|
||||
$scope.updateStuDetails = function (form, p, hidedob) {
|
||||
var firstError = null;
|
||||
|
||||
|
||||
// console.log($scope.OldPhone);
|
||||
|
||||
|
||||
// console.log($scope.CopyModel);return false;
|
||||
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
@ -3360,6 +3644,8 @@ $scope.allcourselist ='';
|
||||
data: {
|
||||
data: p,
|
||||
updatedBy: localDetails.localUserID,
|
||||
OldPhone: $scope.OldPhone,
|
||||
OldDetails:$scope.CopyModel
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
@ -3488,7 +3774,6 @@ app.controller('studentModalDemoCtrl', ["$scope","$rootScope", "$modal", "$log",
|
||||
|
||||
$scope.open = function (studentDetails) {
|
||||
|
||||
|
||||
// get student view details
|
||||
var getcourse = {
|
||||
method: 'POST',
|
||||
|
||||
@ -453,6 +453,33 @@
|
||||
</div>
|
||||
</div>
|
||||
<!--<pre>{{ p | json}}</pre>-->
|
||||
<br/>
|
||||
|
||||
|
||||
<div ng-init="getPhoneNoHistoy(p.StudentID)">
|
||||
|
||||
<div ng-if='Changecheck==true'>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Previous Number</th>
|
||||
<th>Present Number</th>
|
||||
<th>Updated On</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ng-repeat="ph in PreviousPhoneDetails">
|
||||
<td>{{ph.Previous_No}}</td>
|
||||
<td>{{ph.Current_No}}</td>
|
||||
<td>{{ph.Date}}</td>
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" ng-init="hidden_DOB=p.DOB" ng-model="hidden_DOB">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
@ -243,7 +243,7 @@
|
||||
<td style="text-align: center;">
|
||||
<!--<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details"
|
||||
ng-click="setEditId(p.StudentID);">-->
|
||||
<i class="ti-user" tooltip="Personal Details" ng-click="setEditId(p.Student_Course_id, p.StudentID);"></i>
|
||||
<i class="ti-user" tooltip="Personal Details" ng-click="setEditId(p.Student_Course_id, p.StudentID,p);"></i>
|
||||
<!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">-->
|
||||
<i class="ti-write" tooltip="Course Details" ng-click="setEditCourseId(p.Student_Course_id, p.StudentID);"></i>
|
||||
<i class="ti-location-pin " tooltip="Tracking Details" ng-click="setEditTrackingId(p.Student_Course_id,p.CourseID,p.UniversityID, p.MobileNumber);"></i>
|
||||
|
||||
@ -275,7 +275,7 @@
|
||||
<td style="padding-left: 1px;">
|
||||
<!--<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details"
|
||||
ng-click="setEditId(p.StudentID);">-->
|
||||
<i class="ti-user" tooltip="Personal Details" id="personalDetailButton" ng-click="setEditId(p.Student_Course_id, p.StudentID);"></i>
|
||||
<i class="ti-user" tooltip="Personal Details" id="personalDetailButton" ng-click="setEditId(p.Student_Course_id, p.StudentID,p);"></i>
|
||||
<!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">-->
|
||||
<i class="ti-write" tooltip="Course Details" ng-click="setEditCourseId(p.Student_Course_id, p.StudentID);"></i>
|
||||
<i class="ti-location-pin " tooltip="Tracking Details" ng-click="setEditTrackingId(p.Student_Course_id,p.CourseID,p.UniversityID, p.MobileNumber);"></i>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user