signatory add
This commit is contained in:
@@ -132,28 +132,11 @@ public function employersList() :ResponseInterface {
|
|||||||
*/
|
*/
|
||||||
$sig_count = 0;
|
$sig_count = 0;
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
//$insert_data = $data;
|
$insert_data = $data;
|
||||||
|
|
||||||
$insert_data['employer_uid'] = $data['employer_uid'];
|
|
||||||
$insert_data['name'] = $data['name'];
|
|
||||||
$insert_data['title'] = $data['title'];
|
|
||||||
$insert_data['email'] = $data['email'];
|
|
||||||
$insert_data['phone'] = $data['phone'];
|
|
||||||
|
|
||||||
if ( $insert_data['employer_uid'] !=''
|
|
||||||
&& $insert_data['name'] !=''
|
|
||||||
&& $insert_data['title'] !=''
|
|
||||||
&& $insert_data['email'] !=''
|
|
||||||
&& $insert_data['phone'] !='' ){
|
|
||||||
$result = $this-> insert_db('employers', $insert_data);
|
|
||||||
$sig_count = $this->updateSignatoryCount( $data['employer_uid'] );
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$result = [
|
|
||||||
"error" => "Missing Required Data"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$result = $this-> insert_db('employers', $insert_data);
|
||||||
$result_data = [
|
$result_data = [
|
||||||
'call_return' => '100',
|
'call_return' => '100',
|
||||||
'signatory_count' => $sig_count,
|
'signatory_count' => $sig_count,
|
||||||
@@ -192,9 +175,31 @@ public function employersList() :ResponseInterface {
|
|||||||
];
|
];
|
||||||
return $this->respond($data, 200);
|
return $this->respond($data, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function signatoryAdd():ResponseInterface{
|
public function signatoryAdd():ResponseInterface{
|
||||||
|
/*
|
||||||
|
$insert_data['employer_uid'] = $data['employer_uid'];
|
||||||
|
$insert_data['name'] = $data['name'];
|
||||||
|
$insert_data['title'] = $data['title'];
|
||||||
|
$insert_data['email'] = $data['email'];
|
||||||
|
$insert_data['phone'] = $data['phone'];
|
||||||
|
|
||||||
|
if ( $insert_data['employer_uid'] !=''
|
||||||
|
&& $insert_data['name'] !=''
|
||||||
|
&& $insert_data['title'] !=''
|
||||||
|
&& $insert_data['email'] !=''
|
||||||
|
&& $insert_data['phone'] !='' ){
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$result = [
|
||||||
|
"error" => "Missing Required Data"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
*/
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
$loc = 100;
|
$loc = 100;
|
||||||
$employer_uid = $data["employer_uid"];
|
$employer_uid = $data["employer_uid"];
|
||||||
if ( $employer_uid !=''){
|
if ( $employer_uid !=''){
|
||||||
$query = $this->db->query("SELECT id FROM employers WHERE uid = '".$employer_uid."' ");
|
$query = $this->db->query("SELECT id FROM employers WHERE uid = '".$employer_uid."' ");
|
||||||
@@ -208,6 +213,7 @@ $loc = 100;
|
|||||||
$insert_data['title'] = $data['title'];
|
$insert_data['title'] = $data['title'];
|
||||||
$insert_data['phone'] = $data['phone'];
|
$insert_data['phone'] = $data['phone'];
|
||||||
$result = $this-> insert_db('employers_signatory', $insert_data);
|
$result = $this-> insert_db('employers_signatory', $insert_data);
|
||||||
|
$sig_count = $this->updateSignatoryCount( $data['employer_uid'] );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user