status updation screen changes : kdk
This commit is contained in:
parent
118c65bde2
commit
062b103cc1
@ -1,11 +1,9 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
/**
|
||||
* This is an example of a few basic user interaction methods you could use
|
||||
* all done with a hardcoded array
|
||||
@ -13,136 +11,99 @@ require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
* @package CodeIgniter
|
||||
* @subpackage Rest Server
|
||||
* @category Controller
|
||||
* @author
|
||||
* @author
|
||||
* @license MIT
|
||||
* @link
|
||||
* @link
|
||||
*/
|
||||
class StatusUpdation_Controller extends REST_Controller {
|
||||
|
||||
/*
|
||||
/*
|
||||
* status Updation details
|
||||
* params:
|
||||
* created by kdk
|
||||
* */
|
||||
function __construct()
|
||||
{
|
||||
function __construct() {
|
||||
// Construct the parent class
|
||||
parent::__construct();
|
||||
$this->methods['getUniversity_post']['limit'] = 100;
|
||||
$this->methods['getUniversity_post']['limit'] = 100;
|
||||
$this->methods['chkUnivIdExistDetail_post']['limit'] = 100;
|
||||
// load the university model
|
||||
// load the university model
|
||||
$this->load->model('StatusUpdation_model', 'statusupdation_model');
|
||||
}
|
||||
|
||||
|
||||
// get University, Course, Branch Detailss
|
||||
public function getUniveCourseBratch_post() {
|
||||
$reqData = $this->post('data');
|
||||
$loginUserId = $reqData['localUserID'];
|
||||
$loginUserBranchId = $reqData['localBranchID'];
|
||||
$loginUserType = $reqData['localType'];
|
||||
$getUniversityListDetails = $this->statusupdation_model->get_university_course_batch($loginUserBranchId);// Check if the employee exist
|
||||
if ($getUniversityListDetails)
|
||||
{
|
||||
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getUniversityListDetails, 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
|
||||
$getUniversityListDetails = $this->statusupdation_model->get_university_course_batch($loginUserBranchId); // Check if the employee exist
|
||||
if ($getUniversityListDetails) {
|
||||
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getUniversityListDetails, 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ger Result fot searched keyword details
|
||||
public function getSearchDetails_post() {
|
||||
$reqSearchData = $this->post('data');
|
||||
$reqData = $this->post('requestDetails');
|
||||
// print_r($reqSearchData);exit();
|
||||
|
||||
$getSearchDetails = $this->statusupdation_model->get_search_result($reqSearchData, $reqData);// Check if the employee exist
|
||||
if ($getSearchDetails)
|
||||
{
|
||||
$getSearchDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getSearchDetails, 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
|
||||
$getSearchDetails = $this->statusupdation_model->get_search_result($reqSearchData, $reqData); // Check if the employee exist
|
||||
if ($getSearchDetails) {
|
||||
$getSearchDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getSearchDetails, 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// get Sem/year for the respective course
|
||||
public function getSemYearForCourse_post() {
|
||||
$reqData = $this->post('data');
|
||||
$stuFor = $this->post('stuFor');
|
||||
$reqBranch = $this->post('reqBranch');
|
||||
$getSemYeatList = $this->statusupdation_model->get_semyear_result($reqData, $stuFor, $reqBranch);// Check if the employee exist
|
||||
if ($getSemYeatList)
|
||||
{
|
||||
$getSemYeatList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getSemYeatList, 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
|
||||
$getSemYeatList = $this->statusupdation_model->get_semyear_result($reqData, $stuFor, $reqBranch); // Check if the employee exist
|
||||
if ($getSemYeatList) {
|
||||
$getSemYeatList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getSemYeatList, 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
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// update the study material Status
|
||||
public function updateStudentMaterialStatus_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqDetails = $this->post('requestDetails');
|
||||
|
||||
$time = date('Y-m-d H:i:s');
|
||||
$dateTime = $time;
|
||||
|
||||
$count = count($reqData);
|
||||
// echo $reqDetails['localUserID'];exit();
|
||||
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$data[] = array(
|
||||
'StudentID' => $reqData[$i]['StudentID'],
|
||||
'CourseID' => $reqData[$i]['CourseID'],
|
||||
'BranchCode' => $reqData[$i]['BranchCode'],
|
||||
'ListCode' => $reqData[$i]['ListCode'],
|
||||
'SDate' => $reqData[$i]['SDate'],
|
||||
'Coursedetail' => $reqData[$i]['Coursedetail'],
|
||||
'Comments' => $reqData[$i]['Comments'],
|
||||
'Sem' => $reqData[$i]['Sem'],
|
||||
'CreatedBy' => $reqDetails['localUserID'],
|
||||
'CreatedOn' => $dateTime,
|
||||
);
|
||||
for ($i = 0;$i < $count;$i++) {
|
||||
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'SDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime,);
|
||||
}
|
||||
|
||||
$updateStudentMaterialSta = $this->statusupdation_model->update_semyear($data);// Check if the employee exist
|
||||
if ($updateStudentMaterialSta)
|
||||
{
|
||||
$updateStudentMaterialSta['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateStudentMaterialSta, 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
|
||||
$updateStudentMaterialSta = $this->statusupdation_model->update_semyear($data); // Check if the employee exist
|
||||
if ($updateStudentMaterialSta) {
|
||||
$updateStudentMaterialSta['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateStudentMaterialSta, 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,110 +111,63 @@ class StatusUpdation_Controller extends REST_Controller {
|
||||
public function updateAnswerBookLetStatus_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqDetails = $this->post('requestDetails');
|
||||
|
||||
$time = date('Y-m-d H:i:s');
|
||||
$dateTime = $time;
|
||||
|
||||
$count = count($reqData);
|
||||
// echo $reqDetails['localUserID'];exit();
|
||||
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$data[] = array(
|
||||
'StudentID' => $reqData[$i]['StudentID'],
|
||||
'CourseID' => $reqData[$i]['CourseID'],
|
||||
'BranchCode' => $reqData[$i]['BranchCode'],
|
||||
'ListCode' => $reqData[$i]['ListCode'],
|
||||
'AnsDate' => $reqData[$i]['SDate'],
|
||||
'Coursedetail' => $reqData[$i]['Coursedetail'],
|
||||
'Comments' => $reqData[$i]['Comments'],
|
||||
'Sem' => $reqData[$i]['Sem'],
|
||||
'CreatedBy' => $reqDetails['localUserID'],
|
||||
'CreatedOn' => $dateTime,
|
||||
);
|
||||
for ($i = 0;$i < $count;$i++) {
|
||||
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'AnsDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime,);
|
||||
}
|
||||
|
||||
$updateAnswerBookletStat = $this->statusupdation_model->update_answerbooklet($data,$reqDetails);// Check if the employee exist
|
||||
if ($updateAnswerBookletStat)
|
||||
{
|
||||
$updateAnswerBookletStat['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateAnswerBookletStat, 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
|
||||
$updateAnswerBookletStat = $this->statusupdation_model->update_answerbooklet($data, $reqDetails); // Check if the employee exist
|
||||
if ($updateAnswerBookletStat) {
|
||||
$updateAnswerBookletStat['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateAnswerBookletStat, 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// get certification type list
|
||||
public function getCertificateList_post() {
|
||||
$reqData = $this->post('data');
|
||||
|
||||
$certificateList = $this->statusupdation_model->get_certificate_list();// Check if the employee exist
|
||||
if ($certificateList)
|
||||
{
|
||||
$certificateList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($certificateList, 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
|
||||
$certificateList = $this->statusupdation_model->get_certificate_list($reqData['localBranchID']); // Check if the employee exist
|
||||
if ($certificateList) {
|
||||
$certificateList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($certificateList, 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
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// update certification status
|
||||
public function updateCertificationStatus_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqDetails = $this->post('requestDetails');
|
||||
|
||||
$time = date('Y-m-d H:i:s');
|
||||
$dateTime = $time;
|
||||
|
||||
$count = count($reqData);
|
||||
// echo $reqDetails['localUserID'];exit();
|
||||
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$data[] = array(
|
||||
'StudentID' => $reqData[$i]['StudentID'],
|
||||
'CourseID' => $reqData[$i]['CourseID'],
|
||||
'BranchCode' => $reqData[$i]['BranchCode'],
|
||||
'ListCode' => $reqData[$i]['ListCode'],
|
||||
'CDate' => $reqData[$i]['SDate'],
|
||||
'Coursedetail' => $reqData[$i]['Coursedetail'],
|
||||
'Comments' => $reqData[$i]['Comments'],
|
||||
'Sem' => $reqData[$i]['Sem'],
|
||||
'CreatedBy' => $reqDetails['localUserID'],
|
||||
'CreatedOn' => $dateTime,
|
||||
// 'CertificationType' => $reqData[$i]['CertificateType'],
|
||||
'CertificationType' => 'MARK CARD',
|
||||
'CertificationNo' =>$reqData[$i]['CertificateNumber'],
|
||||
);
|
||||
for ($i = 0;$i < $count;$i++) {
|
||||
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'CDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime,
|
||||
// 'CertificationType' => $reqData[$i]['CertificateType'],
|
||||
'CertificationType' => 'MARK CARD', 'CertificationNo' => $reqData[$i]['CertificateNumber'],);
|
||||
}
|
||||
|
||||
$updateCertificateStatus = $this->statusupdation_model->update_certificateStatus($data);// Check if the employee exist
|
||||
if ($updateCertificateStatus)
|
||||
{
|
||||
$updateCertificateStatus['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateCertificateStatus, 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
|
||||
$updateCertificateStatus = $this->statusupdation_model->update_certificateStatus($data); // Check if the employee exist
|
||||
if ($updateCertificateStatus) {
|
||||
$updateCertificateStatus['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateCertificateStatus, 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,42 +175,22 @@ class StatusUpdation_Controller extends REST_Controller {
|
||||
public function updateApplicationStatus_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqDetails = $this->post('requestDetails');
|
||||
|
||||
$time = date('Y-m-d H:i:s');
|
||||
$dateTime = $time;
|
||||
|
||||
$count = count($reqData);
|
||||
// echo $reqDetails['localUserID'];exit();
|
||||
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$data[] = array(
|
||||
'StudentID' => $reqData[$i]['StudentID'],
|
||||
'CourseID' => $reqData[$i]['CourseID'],
|
||||
'BranchCode' => $reqData[$i]['BranchCode'],
|
||||
'ListCode' => $reqData[$i]['ListCode'],
|
||||
'AppDate' => $reqData[$i]['SDate'],
|
||||
'Comments' => $reqData[$i]['Comments'],
|
||||
'CreatedBy' => $reqDetails['localUserID'],
|
||||
'CreatedOn' => $dateTime,
|
||||
'CertificationType' => $reqData[$i]['CertificateType'],
|
||||
'CertificationNo' =>$reqData[$i]['CertificateNumber'],
|
||||
);
|
||||
for ($i = 0;$i < $count;$i++) {
|
||||
$data[] = array('StudentID' => $reqData[$i]['StudentID'], 'CourseID' => $reqData[$i]['CourseID'], 'BranchCode' => $reqData[$i]['BranchCode'], 'ListCode' => $reqData[$i]['ListCode'], 'AppDate' => $reqData[$i]['SDate'], 'Comments' => $reqData[$i]['Comments'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime, 'CertificationType' => $reqData[$i]['CertificateType'], 'CertificationNo' => $reqData[$i]['CertificateNumber'],);
|
||||
}
|
||||
|
||||
$updateApplicationStatus = $this->statusupdation_model->update_applicationStatus($data,$reqDetails);// Check if the employee exist
|
||||
if ($updateApplicationStatus)
|
||||
{
|
||||
$updateApplicationStatus['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateApplicationStatus, 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
|
||||
$updateApplicationStatus = $this->statusupdation_model->update_applicationStatus($data, $reqDetails); // Check if the employee exist
|
||||
if ($updateApplicationStatus) {
|
||||
$updateApplicationStatus['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($updateApplicationStatus, 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,20 +199,16 @@ class StatusUpdation_Controller extends REST_Controller {
|
||||
$reqData = $this->post('data');
|
||||
$reqDetails = $this->post('statusFor');
|
||||
$reqBranch = $this->post('reqBranch');
|
||||
$getStatusList = $this->statusupdation_model->get_status_list($reqData, $reqBranch);// Check if the employee exist
|
||||
if ($getStatusList)
|
||||
{
|
||||
$getStatusList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getStatusList, 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
|
||||
$getStatusList = $this->statusupdation_model->get_status_list($reqData, $reqBranch); // Check if the employee exist
|
||||
if ($getStatusList) {
|
||||
$getStatusList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getStatusList, 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -326,23 +216,16 @@ class StatusUpdation_Controller extends REST_Controller {
|
||||
$reqData = $this->post('data');
|
||||
$reqDetailsFor = $this->post('statusFor');
|
||||
$reqDetails = $this->post('getDetailsFor');
|
||||
|
||||
$getPrevStatusList = $this->statusupdation_model->get_prev_status_list($reqDetailsFor, $reqDetails);// Check if the employee exist
|
||||
if ($getPrevStatusList)
|
||||
{
|
||||
$getPrevStatusList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getPrevStatusList, 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
|
||||
$getPrevStatusList = $this->statusupdation_model->get_prev_status_list($reqDetailsFor, $reqDetails); // Check if the employee exist
|
||||
if ($getPrevStatusList) {
|
||||
$getPrevStatusList['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getPrevStatusList, 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
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user