TYPE OF ACTIVY

This commit is contained in:
velz 2018-12-11 19:19:15 +05:30
parent 577934d182
commit 4c09c36b22
3 changed files with 42 additions and 3 deletions

View File

@ -87,7 +87,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
// define login route name for token verification
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listAllTemplates/:any)'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getFinalPDReportQuestions'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getTypeOfActivetyFromBusinessForm'); // no errors
/*********************AWS resources Constants*************************************************/
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');

View File

@ -174,6 +174,7 @@ $route['getListOfPDReportVersions'] = 'PD_Controller/getListOfPDReportVersions';
$route['getPDFormDetails'] = 'PD_Controller/getPDFormDetails';
$route['savePDFormDetails'] = 'PD_Controller/savePDFormDetails';
$route['getFinalPDReportQuestions'] = 'PD_Controller/getFinalPDReportQuestions';
$route['getTypeOfActivetyFromBusinessForm'] = 'PD_Controller/getTypeOfActivetyFromBusinessForm';
//Dashboard and Reports Related routes
//$route['getDashBoardMaster'] = 'Dash_Board_Controller/getDashBoardDetailsOfPDTypeAndPDStatusWithDayWeekMonth';

View File

@ -2827,7 +2827,7 @@ class PD_Controller extends REST_Controller {
else
{
$data['dataStatus'] = false;
$data['status'] = REST_Controller::HTTP_OK;
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
$data['msg'] = 'PD Report Not Generated/Report Not Available!';
$this->response($data,REST_Controller::HTTP_OK);
}
@ -2873,5 +2873,43 @@ class PD_Controller extends REST_Controller {
/*********************************************************************************************
*********************************************************************************************/
public function getTypeOfActivetyFromBusinessForm_post()
{
$records = $this->post('records');
$pdid = $records['pd_id'];
$fields = array('column_name', 'column_value');
$where_condition_array = array('column_name'=>'type_of_activity','isactive'=>1,'fk_form_id'=>13,'fk_pd_id'=>$pdid);
$result_array = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILS);
//print_r($this->db->last_query());
if(count($result_array))
{
$fields = array('name');
$where_condition_array = array('type_of_activity_id'=>$result_array[0]['column_value'],'isactive'=>1);
$result = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,TYPEOFACTIVITY);
if(count($result)){ $result_array[0]['name'] = $result[0]['name']; }
$data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK;
$data['records'] = $result_array;
$this->response($data,REST_Controller::HTTP_OK);
}
else
{
$data['dataStatus'] = false;
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
$data['msg'] = "Fill Business Details First/ No Data Available!";
$this->response($data,REST_Controller::HTTP_OK);
}
}
}