certificate
This commit is contained in:
parent
dd894daac6
commit
f89b45f76f
@ -218,6 +218,10 @@ class StatusUpdation_Controller extends REST_Controller {
|
||||
$reqData = $this->post('data');
|
||||
$reqDetailsFor = $this->post('statusFor');
|
||||
$reqDetails = $this->post('getDetailsFor');
|
||||
|
||||
|
||||
//print_r($reqDetails);die();
|
||||
|
||||
$getPrevStatusList = $this->statusupdation_model->get_prev_status_list($reqDetailsFor, $reqDetails); // Check if the employee exist
|
||||
if ($getPrevStatusList) {
|
||||
$getPrevStatusList['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -240,6 +240,7 @@ $latestappstatus='';
|
||||
|
||||
public function get_prev_status_list($reqDetailsFor, $reqDetails) {
|
||||
if ($reqDetailsFor == 'STUDY_MATERIAL') {
|
||||
// echo 'in stu';die();
|
||||
$searchFor = 'M001';
|
||||
$searchTableFor = STUDY_MATERIAL_STATUS;
|
||||
$this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType');
|
||||
@ -261,16 +262,21 @@ $latestappstatus='';
|
||||
$results['message'] = 'No record found';
|
||||
}
|
||||
} else if ($reqDetailsFor == 'APPICATION_STATUS') {
|
||||
//echo 'in app';die();
|
||||
$searchFor = 'A001';
|
||||
$searchTableFor = APPLICATION_STATUS;
|
||||
$this->db->select('t1.*, t4.Firstname, t5.ListName, t1.CertificationType as CertificateName');
|
||||
$this->db->from('' . $searchTableFor . ' as t1');
|
||||
$this->db->where('t1.StudentID', $reqDetails['student']);
|
||||
$this->db->where('t1.CourseID',$reqDetails['CourseID']);
|
||||
$this->db->join('' . LOGIN . ' as t3', 't3.ID = t1.CreatedBy', 'LEFT');
|
||||
$this->db->join('' . STAFF . ' as t4', 't4.StaffID = t3.StaffID', 'LEFT');
|
||||
$this->db->join('' . PICK_LIST_DETAILS . ' as t5', 't5.ListCode = t1.ListCode', 'LEFT');
|
||||
|
||||
// $this->db->join('' . CERTIFICATION . ' as t6', 't6.CertificationID = t1.CertificationType', 'LEFT');
|
||||
|
||||
$this->db->order_by('t1.CreatedOn', 'DESC');
|
||||
|
||||
$statusDetails = $this->db->get();
|
||||
$prevStatusDetails = $statusDetails->result();
|
||||
if (count($prevStatusDetails) > 0) {
|
||||
@ -280,7 +286,13 @@ $latestappstatus='';
|
||||
$results['preStatusDetails'] = false;
|
||||
$results['message'] = 'No record found';
|
||||
}
|
||||
|
||||
|
||||
//print_r($this->db->last_query());
|
||||
} else if ($reqDetailsFor == 'CERTIFICATION_STATUS') {
|
||||
|
||||
|
||||
// echo 'in cer';die();
|
||||
$searchFor = 'C001';
|
||||
$searchTableFor = CERTIFICATION_STATUS;
|
||||
$this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType');
|
||||
@ -302,6 +314,7 @@ $latestappstatus='';
|
||||
$results['message'] = 'No record found';
|
||||
}
|
||||
} else if ($reqDetailsFor == 'ANSWERBOOKLET_STATUS') {
|
||||
// echo 'in ans';die();
|
||||
$searchFor = 'B001';
|
||||
$searchTableFor = ANSWER_BOOKLET;
|
||||
$this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType');
|
||||
|
||||
@ -460,6 +460,11 @@ app.controller('certificateStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
$scope.prevStatusListForStudentCourseLoading = false;
|
||||
$scope.prevStatusListForStudentCourse = response.data.preStatus_details_list;
|
||||
$scope.prevNoRecordFound = false;
|
||||
|
||||
|
||||
console.log($scope.prevStatusListForStudentCourse)
|
||||
|
||||
|
||||
} else {
|
||||
$scope.prevStatusListForStudentCourseLoading = false;
|
||||
$scope.prevStatusListForStudentCourseNoRecord = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user