PD HISTORY LIST OF PD OFFICERS SMART PD QUESTIONS
This commit is contained in:
parent
a9e882ec1e
commit
9427d68378
@ -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', 'getFullPDDetails'); // no errors
|
||||
|
||||
/*********************AWS resources Constants*************************************************/
|
||||
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
|
||||
|
||||
@ -900,8 +900,9 @@ class PD_Controller extends REST_Controller {
|
||||
$list_of_pd_officers[$key]['mobile_no'] = $names[0]['mobile_no'];
|
||||
$list_of_pd_officers[$key]['count'] = 0;
|
||||
|
||||
$this->db->SELECT('COUNT(*) as count');
|
||||
$this->db->SELECT('pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name');
|
||||
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
|
||||
$this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1');
|
||||
$this->db->OR_GROUP_START();
|
||||
$this->db->OR_WHERE('PDTRIGGER.pd_status',SCHEDULED);
|
||||
$this->db->OR_WHERE('PDTRIGGER.pd_status',INPROGRESS);
|
||||
@ -910,7 +911,9 @@ class PD_Controller extends REST_Controller {
|
||||
$this->db->WHERE('PDTRIGGER.fk_pd_allocated_to',$pdofficer['fk_user_id']);
|
||||
$pd_count = $this->db->GET()->result_array();
|
||||
//print_r($this->db->last_query());
|
||||
if(count($pd_count)){ $list_of_pd_officers[$key]['count'] = $pd_count[0]['count']; }
|
||||
if(count($pd_count)){
|
||||
$list_of_pd_officers[$key]['pd_details'] = $pd_count;
|
||||
$list_of_pd_officers[$key]['count'] =count($pd_count); }
|
||||
|
||||
// Get Profile Pic from S3
|
||||
|
||||
@ -995,8 +998,9 @@ class PD_Controller extends REST_Controller {
|
||||
$list_of_pd_officers[$key]['mobile_no'] = $names[0]['mobile_no'];
|
||||
$list_of_pd_officers[$key]['count'] = 0;
|
||||
|
||||
$this->db->SELECT('COUNT(*) as count');
|
||||
$this->db->SELECT('pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name');
|
||||
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
|
||||
$this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1');
|
||||
$this->db->OR_GROUP_START();
|
||||
$this->db->OR_WHERE('PDTRIGGER.pd_status',SCHEDULED);
|
||||
$this->db->OR_WHERE('PDTRIGGER.pd_status',INPROGRESS);
|
||||
@ -1005,7 +1009,10 @@ class PD_Controller extends REST_Controller {
|
||||
$this->db->WHERE('PDTRIGGER.fk_pd_allocated_to',$pdofficer['fk_user_id']);
|
||||
$pd_count = $this->db->GET()->result_array();
|
||||
//print_r($this->db->last_query());
|
||||
if(count($pd_count)){ $list_of_pd_officers[$key]['count'] = $pd_count[0]['count']; }
|
||||
if(count($pd_count)){
|
||||
$list_of_pd_officers[$key]['pd_details'] = $pd_count;
|
||||
$list_of_pd_officers[$key]['count'] =count($pd_count);
|
||||
}
|
||||
|
||||
// Get Profile Pic from S3
|
||||
|
||||
@ -1176,11 +1183,13 @@ class PD_Controller extends REST_Controller {
|
||||
public function loadFullTemplate_get()
|
||||
{
|
||||
$pd_id = "";
|
||||
$client = "";
|
||||
if($this->get('pd_id')) { $pd_id = $this->get('pd_id'); }
|
||||
if($this->get('client')) { $client = $this->get('client'); }
|
||||
if($pd_id != "" || $pd_id != null)
|
||||
{
|
||||
|
||||
$template_details = $this->PD_Model->getTemplateForPD($pd_id);
|
||||
$template_details = $this->PD_Model->getTemplateForPD($pd_id,$client);
|
||||
if(count($template_details))
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
|
||||
@ -243,8 +243,18 @@ class PD_Model extends SPARQ_Model {
|
||||
{
|
||||
foreach($logs as $log_key => $log)
|
||||
{
|
||||
//print_r($log);
|
||||
//echo $arrayForText[$log['field_name']].' Changed From "'. $log['old_value'] .'" To "'. $log['new_value'].'"';
|
||||
|
||||
if($log_key == 0)
|
||||
{
|
||||
$log_string = 'PD Ctreated with '.$log['old_value'].'" status "'.'"';
|
||||
$user = $log['createdby'];
|
||||
$time = $log['createdon'];
|
||||
$actual_logs[$log_key]['log'] = $log_string;
|
||||
$actual_logs[$log_key]['user'] = $user;
|
||||
$actual_logs[$log_key]['time'] = $time;
|
||||
}
|
||||
else
|
||||
{
|
||||
$field_name = $log['field_name'];
|
||||
//print_r($field_name);
|
||||
switch($field_name){
|
||||
@ -375,6 +385,7 @@ class PD_Model extends SPARQ_Model {
|
||||
$actual_logs[$log_key]['time'] = $time;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -436,9 +447,10 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
|
||||
|
||||
public function getTemplateForPD($pdid)
|
||||
public function getTemplateForPD($pdid,$client)
|
||||
{
|
||||
|
||||
|
||||
$template_id = "";
|
||||
$categories = "";
|
||||
$overall_answered_count = 0;
|
||||
@ -446,7 +458,7 @@ class PD_Model extends SPARQ_Model {
|
||||
//Get PD Master Details including Template id @param $pd_id
|
||||
$pd_master_detials = $this->getPDMasterDetails($pdid);
|
||||
$pd_applicants_detials = $this->getApplicantsDetails($pdid);
|
||||
//sprint_r($pd_master_detials);
|
||||
//print_r($pd_master_detials);die();
|
||||
if(count($pd_master_detials)){
|
||||
$template_id = $pd_master_detials[0]['fk_pd_template_id'];
|
||||
}
|
||||
@ -573,7 +585,20 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
}
|
||||
|
||||
if($pd_master_detials[0]['fk_pd_type'] == 2 && $client == 1)
|
||||
{
|
||||
|
||||
//$temp_array = array(3,5,10,13);
|
||||
foreach($template_forms as $key => $form)
|
||||
{
|
||||
if($form['form_id'] != 3 && $form['form_id'] != 5 && $form['form_id'] != 10 && $form['form_id'] != 13)
|
||||
{
|
||||
unset($template_forms[$key]) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -589,7 +614,7 @@ class PD_Model extends SPARQ_Model {
|
||||
return $result_data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getAnswersForPD($question_id,$pd_id,$template_id,$category_id)
|
||||
{
|
||||
$overalldata =array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user