Section 2 into 9 in flhiphots : ps
This commit is contained in:
parent
b83bf0f3ee
commit
fccaa144ed
@ -263,7 +263,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
|
|
||||||
log_message('ERROR','####FLYHI-PD SAVE CALLED');
|
log_message('ERROR','####FLYHI-PD SAVE CALLED');
|
||||||
|
|
||||||
$section_names = array('1' => 'General Section','2' => 'Photography');
|
$section_names = array('1' => 'General Section','9' => 'Photography');
|
||||||
// $section_names = array('1' => 'General Section');
|
// $section_names = array('1' => 'General Section');
|
||||||
|
|
||||||
if($records['sales_pd_id'] == '' || $records['sales_pd_id'] == null)
|
if($records['sales_pd_id'] == '' || $records['sales_pd_id'] == null)
|
||||||
@ -380,7 +380,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
unset($dup_of_section_names [ $completed_section_value['section_id'] ]);
|
unset($dup_of_section_names [ $completed_section_value['section_id'] ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($dup_of_section_names[2]);//unset photograph always
|
unset($dup_of_section_names[9]);//unset photograph always
|
||||||
$img_satellite_check = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('img_name' => 'satellite','fk_sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALEPD_DOCS);
|
$img_satellite_check = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('img_name' => 'satellite','fk_sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALEPD_DOCS);
|
||||||
$img_selfile_check = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('img_name' => 'selfie_with_person_met','fk_sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALEPD_DOCS);
|
$img_selfile_check = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('img_name' => 'selfie_with_person_met','fk_sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALEPD_DOCS);
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
unset($records['status']);
|
unset($records['status']);
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['records'][] = ($img_selfile_check[0]['count'] == 0) ? array('section_id' => 2,'section_name' => 'selfie image') : ( $img_satellite_check[0]['count'] == 0 ? array('section_id' => 2,'section_name' => 'satellite image') :('selfie image and satellite image ar not available'));
|
$data['records'][] = ($img_selfile_check[0]['count'] == 0) ? array('section_id' => 9,'section_name' => 'selfie image') : ( $img_satellite_check[0]['count'] == 0 ? array('section_id' => 9,'section_name' => 'satellite image') :('selfie image and satellite image ar not available'));
|
||||||
$data['pd_status'] = 'DRAFT';
|
$data['pd_status'] = 'DRAFT';
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$this->response($data,REST_Controller::HTTP_OK);
|
$this->response($data,REST_Controller::HTTP_OK);
|
||||||
@ -541,7 +541,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
else{
|
else{
|
||||||
$section_data = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1,'section_id' => $records['section_id']),SALESPD_SECTION_DATA);
|
$section_data = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1,'section_id' => $records['section_id']),SALESPD_SECTION_DATA);
|
||||||
//print_r( json_decode($section_data[0]['section_data'],true));die();
|
//print_r( json_decode($section_data[0]['section_data'],true));die();
|
||||||
if($records['section_id'] == 2 && count($section_data))
|
if($records['section_id'] == 9 && count($section_data))
|
||||||
{
|
{
|
||||||
$all_sales_pd_images = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
$all_sales_pd_images = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
//print_r($all_sales_pd_images);die();
|
//print_r($all_sales_pd_images);die();
|
||||||
@ -695,7 +695,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
$view_data['section'.$section['section_id'] ] = $this->processFlyhiPDJSON($section);//die();
|
$view_data['section'.$section['section_id'] ] = $this->processFlyhiPDJSON($section);//die();
|
||||||
$section_fields['section'.$section['section_id'] ] = $this->processFlyhiPDJSON($section);
|
$section_fields['section'.$section['section_id'] ] = $this->processFlyhiPDJSON($section);
|
||||||
}
|
}
|
||||||
$view_data['section2'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
$view_data['section9'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
$view_data['product_id'] = $flyhipd_data[0]['product_id'];
|
$view_data['product_id'] = $flyhipd_data[0]['product_id'];
|
||||||
$view_data['geo_location'] = $flyhipd_data[0]['geo_location'];
|
$view_data['geo_location'] = $flyhipd_data[0]['geo_location'];
|
||||||
$view_data['satellite_image'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
$view_data['satellite_image'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
@ -823,7 +823,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
else if($question['is_repeatable'] == 1 )
|
else if($question['is_repeatable'] == 1 )
|
||||||
{
|
{
|
||||||
//print_r($question['questions_group']);die();
|
//print_r($question['questions_group']);die();
|
||||||
if($section_id != 2)
|
if($section_id != 9)
|
||||||
{
|
{
|
||||||
foreach ($question['questions_group'] as $group_key => $group_value)
|
foreach ($question['questions_group'] as $group_key => $group_value)
|
||||||
{
|
{
|
||||||
@ -913,9 +913,9 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
$this->Flyhi_Model->updateRecords($update_fields2,SALEPD_DOCS,array('img_name' => 'selfie_with_person_met','fk_sales_pd_id' => $records['fk_sales_pd_id']));
|
$this->Flyhi_Model->updateRecords($update_fields2,SALEPD_DOCS,array('img_name' => 'selfie_with_person_met','fk_sales_pd_id' => $records['fk_sales_pd_id']));
|
||||||
if($is_customer_app)
|
if($is_customer_app)
|
||||||
{
|
{
|
||||||
$this->Flyhi_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('section_id' => 2,'sales_pd_id' => $records['fk_sales_pd_id']));
|
$this->Flyhi_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('section_id' => 9,'sales_pd_id' => $records['fk_sales_pd_id']));
|
||||||
}
|
}
|
||||||
// $this->Flyhi_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('section_id' => 2,'sales_pd_id' => $records['fk_sales_pd_id']));// temporary
|
// $this->Flyhi_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('section_id' => 9,'sales_pd_id' => $records['fk_sales_pd_id']));// temporary
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1061,7 +1061,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
|
|
||||||
$product_short_name = $this->Flyhi_Model->selectCustomRecords(array('abbr'),array('product_id' => $product ),PRODUCTS);
|
$product_short_name = $this->Flyhi_Model->selectCustomRecords(array('abbr'),array('product_id' => $product ),PRODUCTS);
|
||||||
|
|
||||||
$section_names = array('1' => 'General Section','2' => 'Photography');
|
$section_names = array('1' => 'General Section','9' => 'Photography');
|
||||||
|
|
||||||
$count = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('lender_id' => $lender,'product_id' => $product,'isactive' => 1),SALES_PD_DATA);
|
$count = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('lender_id' => $lender,'product_id' => $product,'isactive' => 1),SALES_PD_DATA);
|
||||||
|
|
||||||
@ -1112,7 +1112,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// print_r($dup_of_section_names);
|
// print_r($dup_of_section_names);
|
||||||
unset($dup_of_section_names[2]);//unset photograph always
|
unset($dup_of_section_names[9]);//unset photograph always
|
||||||
|
|
||||||
|
|
||||||
if(count($dup_of_section_names))
|
if(count($dup_of_section_names))
|
||||||
@ -1155,7 +1155,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
unset($records['status']);
|
unset($records['status']);
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['records'][] = array('section_id' => 2,'section_name' => 'selfie image');
|
$data['records'][] = array('section_id' => 9,'section_name' => 'selfie image');
|
||||||
$data['pd_status'] = 'DRAFT';
|
$data['pd_status'] = 'DRAFT';
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$this->response($data,REST_Controller::HTTP_OK);
|
$this->response($data,REST_Controller::HTTP_OK);
|
||||||
@ -1332,7 +1332,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: //photosection
|
case 9: //photosection
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user