CHANGE_SERVICE_GROUP_ISSUE : AADHAVAN
This commit is contained in:
parent
22ae8a7db4
commit
af1998bd5b
@ -347,18 +347,18 @@ class MasterController extends BaseController
|
||||
->findAll();
|
||||
|
||||
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
||||
foreach ($data['serviceGroupData'] as $key => $value) {
|
||||
$check_its_okay = 0;
|
||||
foreach (json_decode($value['business_id']) as $values) {
|
||||
if($values == $business_id){
|
||||
$check_its_okay =1;
|
||||
}
|
||||
}
|
||||
if($check_its_okay == 0){
|
||||
unset($data['serviceGroupData'][$key]);
|
||||
}
|
||||
$check_its_okay = 0;
|
||||
}
|
||||
// foreach ($data['serviceGroupData'] as $key => $value) {
|
||||
// $check_its_okay = 0;
|
||||
// foreach (json_decode($value['business_id']) as $values) {
|
||||
// if($values == $business_id){
|
||||
// $check_its_okay =1;
|
||||
// }
|
||||
// }
|
||||
// if($check_its_okay == 0){
|
||||
// unset($data['serviceGroupData'][$key]);
|
||||
// }
|
||||
// $check_its_okay = 0;
|
||||
// }
|
||||
|
||||
}else{
|
||||
$business_id = $this->session->get('logged_in_staff_business_id');
|
||||
@ -400,18 +400,18 @@ class MasterController extends BaseController
|
||||
->findAll();
|
||||
|
||||
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
||||
foreach ($data['serviceGroupData'] as $key => $value) {
|
||||
$check_its_okay = 0;
|
||||
foreach (json_decode($value['business_id']) as $values) {
|
||||
if($values == $business_id){
|
||||
$check_its_okay =1;
|
||||
}
|
||||
}
|
||||
if($check_its_okay == 0){
|
||||
unset($data['serviceGroupData'][$key]);
|
||||
}
|
||||
$check_its_okay = 0;
|
||||
}
|
||||
// foreach ($data['serviceGroupData'] as $key => $value) {
|
||||
// $check_its_okay = 0;
|
||||
// foreach (json_decode($value['business_id']) as $values) {
|
||||
// if($values == $business_id){
|
||||
// $check_its_okay =1;
|
||||
// }
|
||||
// }
|
||||
// if($check_its_okay == 0){
|
||||
// unset($data['serviceGroupData'][$key]);
|
||||
// }
|
||||
// $check_its_okay = 0;
|
||||
// }
|
||||
}
|
||||
|
||||
foreach ($data['doc_list'] as $doc) {
|
||||
@ -722,12 +722,16 @@ class MasterController extends BaseController
|
||||
$documentUrl = base_url();
|
||||
helper('url');
|
||||
$url ='<a href="' . generate_signed_url('preview', ['doc_id'=> md5($doc_id)], 36000) . '">Preview and Approve Document</a>';
|
||||
$businessData = $this->BranchModel->select('branches.* , business.business_name ')
|
||||
->join('business', 'branches.business_id = business.business_id', 'left')
|
||||
->where('branches.branch_id',$this->session->get('logged_in_staff_branch_id'))
|
||||
// $businessData = $this->BranchModel->select('branches.* , business.business_name ')
|
||||
// ->join('business', 'branches.business_id = business.business_id', 'left')
|
||||
// ->where('branches.branch_id',$this->session->get('logged_in_staff_branch_id'))
|
||||
// ->get()->getRow();
|
||||
$businessData = $this->BusinessModel->select('branches.* , business.business_name ')
|
||||
->join('branches', 'business.business_id = branches.business_id', 'left')
|
||||
->where('business.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||
->get()->getRow();
|
||||
$subject = 'BB-Sign Verify Document';
|
||||
|
||||
// print_r($businessData);die;
|
||||
$message = "Dear " . $clientData->client_name . ",<br>" . $businessData->business_name . " has requested your approval for a document. Please click the link below to preview and approve.<br><br>" . $url;
|
||||
|
||||
$mail_send = $MailHelper->send_url_email($clientData->email , $businessData->email, $subject, $message);
|
||||
@ -750,6 +754,7 @@ class MasterController extends BaseController
|
||||
$statusData['status'] = 'Revert';
|
||||
$this->DocsStatusModel->insert($statusData);
|
||||
}
|
||||
|
||||
$updated = $this->ClientDocsModel->update($doc_id, $data);
|
||||
if ($updated) {
|
||||
return $this->response->setJSON(['status' => 'success','code' => 200,'data' => true],200);
|
||||
|
||||
@ -596,7 +596,7 @@
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
// console.log(response);
|
||||
console.log(response.data);
|
||||
if (response.data) {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user