diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php
index eff15fac..09952634 100755
--- a/Apollo/api/application/config/routes.php
+++ b/Apollo/api/application/config/routes.php
@@ -332,3 +332,7 @@ $route['report_balfee'] = 'Report/balfee';
$route['report_lead'] = 'Report/lead';
$route['insertUniversityfile'] = 'UniversityFile_Controller/insertUniversityfile';
+//Application Form Details
+$route['getApplicationFromDetails'] = 'StatusUpdation_Controller/getApplicationFromDetails';
+$route['updateApplicationFormStatus'] = 'StatusUpdation_Controller/updateApplicationFormStatus';
+$route['getApplicationFormStatusList'] = 'StatusUpdation_Controller/getApplicationFormStatusList';
\ No newline at end of file
diff --git a/Apollo/api/application/controllers/StatusUpdation_Controller.php b/Apollo/api/application/controllers/StatusUpdation_Controller.php
index 604ad50c..5c079ef0 100755
--- a/Apollo/api/application/controllers/StatusUpdation_Controller.php
+++ b/Apollo/api/application/controllers/StatusUpdation_Controller.php
@@ -232,7 +232,6 @@ class StatusUpdation_Controller extends REST_Controller {
public function getApplicationFromDetails_post(){
$reqData = $this->post('data');
$reqBranch = $this->post('reqBranch');
- // print_r($reqData);exit();
$getApplicationFormDetails = $this->statusupdation_model->get_applicationFrom_details($reqData, $reqBranch); // Check if the employee exist
if ($getApplicationFormDetails) {
$getApplicationFormDetails['status'] = REST_Controller::HTTP_OK;
@@ -245,4 +244,38 @@ class StatusUpdation_Controller extends REST_Controller {
}
}
-}
\ No newline at end of file
+
+ public function updateApplicationFormStatus_post(){
+ $reqData = $this->post('data');
+ $reqBranch = $this->post('requestDetails');
+ $updateApplicationFormStatus = $this->statusupdation_model->update_applicationForm_status($reqData, $reqBranch); // Check if the employee exist
+ if ($updateApplicationFormStatus) {
+ $updateApplicationFormStatus['status'] = REST_Controller::HTTP_OK;
+ // Set the response and exit
+ $this->response($updateApplicationFormStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
+
+ } else {
+ // Set the response and exit
+ $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
+
+ }
+ }
+
+ public function getApplicationFormStatusList_post(){
+ $reqData = $this->post('data');
+ $reqBranch = $this->post('reqBranch');
+ $getApplicationFormStatusList = $this->statusupdation_model->get_ApplicationFormStatusDetails($reqData, $reqBranch); // Check if the employee exist
+ if ($getApplicationFormStatusList) {
+ $getApplicationFormStatusList['status'] = REST_Controller::HTTP_OK;
+ // Set the response and exit
+ $this->response($getApplicationFormStatusList, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
+
+ } else {
+ // Set the response and exit
+ $this->response(['message' => 'No list 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/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php
index 65345536..a8e6a0fd 100755
--- a/Apollo/api/application/models/StatusUpdation_model.php
+++ b/Apollo/api/application/models/StatusUpdation_model.php
@@ -316,7 +316,7 @@ class StatusUpdation_model extends CI_Model {
if( $statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED'){
$cerNamtToMsg = 'Answer booklet';
$getSemYearMsg = $this->get_couser_sem_yr_msg($arr[0]['CourseID']);
- $getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
+ $getSemYearANDType = "$getSemYearMsg";
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
// $mesg = "$cerNamtToMsg Received - Dear $studentName, Your $getSemYearANDType had been received.";
$mesg = "Answer booklet Received - Dear $studentName, Your answer booklet for $getSemYearANDType has been received.";
@@ -593,7 +593,7 @@ class StatusUpdation_model extends CI_Model {
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'smtp.sendgrid.net',
- 'smtp_port' => 465,
+ 'smtp_port' => 587,
'smtp_user' => 'apikey',
'smtp_pass' => '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',
'mailtype' => 'html',
@@ -602,12 +602,13 @@ class StatusUpdation_model extends CI_Model {
$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->to('dineshkumar.k@venbainfotech.com');
$this->email->from('noreply@apollodec.com','Apollo');
$subj = $sub;
$this->email->subject($subj);
@@ -883,8 +884,80 @@ class StatusUpdation_model extends CI_Model {
//get application form details
public function get_applicationFrom_details($reqData, $reqBranch) {
-echo $reqData['studId'];
-echo $reqData['courseId'];
-
+ $studentId = $reqData['studId'];
+ $courseId = $reqData['courseId'];
+ // $searchTableFor = APPLICATION_FORM;
+ $this->db->select('t1.ID, t1.Student_Fee_Status_Id, t1.BatchCode, t1.FeeType as SemID, CFD.Sem_Year as Sem_Year, t1.RegistrationMode, t1.RegistrationType');
+ $this->db->from('T_Registration_Details as t1');
+ $this->db->join('T_Course_Fees_Details as CFD', 'CFD.ID = t1.FeeType');
+ $this->db->where('t1.StudentID', $studentId);
+ $this->db->where('t1.CourseID', $courseId);
+ $fromTypes = $this->db->get();
+ $formTypeDetails = $fromTypes->result();
+ if($formTypeDetails){
+ // print_r($formTypeDetails);exit();
+ $resultArr['formTypeDetails'] = $formTypeDetails;
+ $resultArr['formTypeStatus'] = true;
+ $resultArr['message'] = "Successfully data generated";
+ } else {
+ // print_r($formTypeDetails);exit();
+ $resultArr['formTypeDetails'] = [];
+ $resultArr['formTypeStatus'] = false;
+ $resultArr['message'] = "No record found";
+ }
+ return $resultArr;
}
-}
\ No newline at end of file
+
+ public function update_applicationForm_status($reqData, $reqBranch){
+
+ $arr['Registration_Details_ID'] = $reqData[0]['register_details_id'];
+ $arr['ListCode'] = $reqData[0]['ListCode'];
+ $arr['Comments'] = $reqData[0]['Comments'];
+ $arr['AppFormDate'] = $reqData[0]['SDate'];
+
+ $arr['BranchCode'] = $reqBranch['localBranchID'];
+ $arr['CreatedBy'] = $reqBranch['localUserID'];
+ $time = date('Y-m-d H:i:s');
+ $dateTime = $time;
+ $arr['CreatedOn'] = $dateTime;
+// print_r($arr);exit();
+ $this->db->insert('T_ApplicationFormStatus', $arr);
+ if ($this->db->affected_rows() >= 1) {
+ $result['addStatus'] = true;
+ $result['message'] = "Successfully Application Form Status Updated";
+ } else {
+ $result['addStatus'] = false;
+ $result['message'] = "Something went wrong.please try again";
+ }
+ return $result;
+ }
+
+ public function get_ApplicationFormStatusDetails($reqData, $reqBranch){
+ $studentId = $reqData['studId'];
+ $courseId = $reqData['courseId'];
+ // echo $studentId;exit();
+ // $searchTableFor = APPLICATION_FORM;
+ $this->db->select('t1.ID, t2.BatchCode, t2.FeeType as SemID, CFD.Sem_Year as Sem_Year, t2.RegistrationMode, t2.RegistrationType, t1.AppFormDate as StatusUpdateDate,t3.ListName ');
+ $this->db->from('T_ApplicationFormStatus as t1');
+ $this->db->join('T_Registration_Details as t2', 't2.ID = t1.Registration_Details_ID');
+ $this->db->join('T_Course_Fees_Details as CFD', 'CFD.ID = t2.FeeType');
+ $this->db->join('' . PICK_LIST_DETAILS . ' as t3', 't3.ListCode = t1.ListCode', 'LEFT');
+
+ $this->db->where('t2.StudentID', $studentId);
+ $this->db->where('t2.CourseID', $courseId);
+ $fromTypes = $this->db->get();
+ $formTypeDetails = $fromTypes->result();
+ if($formTypeDetails){
+ // print_r($formTypeDetails);exit();
+ $resultArr['formTypeDetails'] = $formTypeDetails;
+ $resultArr['formTypeStatus'] = true;
+ $resultArr['message'] = "Successfully data generated";
+ } else {
+ // print_r($formTypeDetails);exit();
+ $resultArr['formTypeDetails'] = [];
+ $resultArr['formTypeStatus'] = false;
+ $resultArr['message'] = "No record found";
+ }
+ return $resultArr;
+ }
+}
\ No newline at end of file
diff --git a/Apollo/assets/js/controllers/applicationStatusCtrl.js b/Apollo/assets/js/controllers/applicationStatusCtrl.js
index c2ffef6c..e62c6eab 100644
--- a/Apollo/assets/js/controllers/applicationStatusCtrl.js
+++ b/Apollo/assets/js/controllers/applicationStatusCtrl.js
@@ -22,13 +22,15 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
$scope.editId = -1;
}
+ // Student Form type list
+ $scope.studentFormTypeList = "";
// get local client details
var localDetail = JSON.parse(localStorage.getItem('localObj'));
var localDetails = ipCookie('cookiechk');
- const localUpdateStatus = 'APPLICATIONFORM_STATUS';
+ const localUpdateStatus = 'APPICATION_STATUS';
$scope.localTypeSuperAdmin = false;
$scope.localBranchDetails = '';
@@ -97,14 +99,7 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
'Name': ''
}
- $scope.myStatusModel = {
- 'semYear': '',
- 'staus': '',
- 'dateOn': '',
- 'comment': '',
- 'certificatetype': '',
- 'certificateNumber': ''
- }
+
// get university list while page is loading
$scope.universityData = '';
@@ -276,8 +271,6 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
}
$scope.getApplicationFromDetails = function(frm_details){
-alert(JSON.stringify(frm_details));
-
var getStatusL = {
method: 'POST',
url: apiPoint.url + 'getApplicationFromDetails/',
@@ -290,8 +283,8 @@ alert(JSON.stringify(frm_details));
}
};
$http(getStatusL).then(function (response) {
- if (response.data.statusList) {
- $scope.statusDetailsList = response.data.statusList_details;
+ if (response.data.formTypeStatus) {
+ $scope.studentFormTypeList = response.data.formTypeDetails;
} else {
// $scope.searchLoading = false;
}
@@ -349,8 +342,29 @@ alert(JSON.stringify(frm_details));
}
}
+ $scope.editStatus = false;
+ $scope.editStatusID = '';
+
+ $scope.statusUpdateView = function(id){
+$scope.editStatus = true;
+$scope.editStatusID = id;
+ $scope.myStatusModel = {
+ 'id': '',
+ 'staus': '',
+ 'dateOn': '',
+ 'comment': ''
+ }
+ }
+
+ $scope.myStatusModel = {
+ 'staus': '',
+ 'dateOn': '',
+ 'comment': ''
+ }
+
$scope.statusUpdate = {
- submit: function (form, myStatusModel, localBranchDetails) {
+ submit: function (form, localBranchDetails, id) {
+ alert(id);
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@@ -378,25 +392,20 @@ alert(JSON.stringify(frm_details));
$scope.myStatusModel.dateOn = $filter('date')(new Date($scope.myStatusModel.dateOn), formate);
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) {
- let getStudentID = new getStudentForUpdateDetails(item.StudentID, item.CourseID, item.BranchCode);
+ let getStudentID = new getStudentForUpdateDetails(id);
studentForUpdate.push(getStudentID);
return true;
}
});
- function getStudentForUpdateDetails(id, courseId, dCode) {
- this.StudentID = id;
- this.CourseID = courseId;
- this.BranchCode = dCode;
+ function getStudentForUpdateDetails(id) {
this.ListCode = $scope.myStatusModel.staus;
this.SDate = $scope.myStatusModel.dateOn;
- this.Coursedetail = id;
this.Comments = $scope.myStatusModel.comment;
- this.CertificateType = $scope.myStatusModel.certificatetype;
- this.CertificateNumber = $scope.myStatusModel.certificateNumber;
+ this.register_details_id = id
}
var updateStudyMaterial = {
method: 'POST',
- url: apiPoint.url + 'updateApplicationStatus/',
+ url: apiPoint.url + 'updateApplicationFormStatus/',
headers: {
'Content-Type': 'application/json'
},
@@ -430,13 +439,10 @@ alert(JSON.stringify(frm_details));
},
reset: function (form) {
form.$setPristine(true);
- $scope.myStatusModel = {
- 'semYear': '',
+ $scope.myStatusModel = {
'staus': '',
'dateOn': '',
- 'comment': '',
- 'certificatetype': '',
- 'certificateNumber': ''
+ 'comment': ''
}
}
}
@@ -452,20 +458,22 @@ alert(JSON.stringify(frm_details));
$scope.prevStatusListForStudentCourse = '';
var getPrevStatus = {
method: 'POST',
- url: apiPoint.url + 'getPrevStatusDetailsForStu/',
+ url: apiPoint.url + 'getApplicationFormStatusList/',
headers: {
'Content-Type': 'application/json'
},
data: {
- statusFor: localUpdateStatus,
- getDetailsFor: { "student": p.StudentID, "CourseID": p.CourseID },
- data: localDetail
+ data: {
+ studId: p.StudentID,
+ courseId: p.CourseID
+ },
+ reqBranch: localDetails.localBranchID
}
};
$http(getPrevStatus).then(function (response) {
- if (response.data.preStatusDetails) {
+ if (response.data.formTypeStatus) {
$scope.prevStatusListForStudentCourseLoading = false;
- $scope.prevStatusListForStudentCourse = response.data.preStatus_details_list;
+ $scope.prevStatusListForStudentCourse = response.data.formTypeDetails;
$scope.prevNoRecordFound = false;
} else {
$scope.prevStatusListForStudentCourseLoading = false;
diff --git a/Apollo/assets/views/status-update/application_status.html b/Apollo/assets/views/status-update/application_status.html
index 5bc63532..49a3dd69 100644
--- a/Apollo/assets/views/status-update/application_status.html
+++ b/Apollo/assets/views/status-update/application_status.html
@@ -183,17 +183,20 @@
Status |
Comments |
- Document Name |
+ Batch |
Date |
- Updated By |
+ Sem/Year |
+ Form Type |
{{s.ListName}} |
{{s.Comments}} |
- {{s.CertificateName}} |
- {{s.AppDate}} |
- {{s.Firstname}} |
+ {{s.BatchCode}} |
+ {{s.StatusUpdateDate}} |
+ {{s.Sem_Year}} |
+ {{s.RegistrationType}} |
+
@@ -238,7 +241,8 @@
-
+ { {studentFormTypeList | json}}
+
@@ -325,7 +329,7 @@
-