MERGE : GWM
This commit is contained in:
parent
c98e034f00
commit
6ca0fe4a44
@ -265,7 +265,11 @@ class MasterController extends BaseController
|
||||
|
||||
|
||||
|
||||
$data['doc_list'] = $this->ClientDocsModel->getDocs();
|
||||
$data['doc_list'] = $this->ClientDocsModel->select('client_docs.* , services.service_name , service_group.group_name')
|
||||
->join('template', 'template.template_id = client_docs.template_id', 'left')
|
||||
->join('services', 'services.service_id = template.service_id', 'left')
|
||||
->join('service_group', 'service_group.service_group_id = template.service_group_id', 'left')
|
||||
->findAll();
|
||||
|
||||
$data['clientdata'] = $this->ClientBranchModel->select('client.name as client_name , client_branch.name as client_branch_name , client_branch.id as client_branch_id')
|
||||
->join('client', 'client_branch.client_id = client.client_id', 'left')
|
||||
@ -305,6 +309,7 @@ class MasterController extends BaseController
|
||||
$docData = $this->request->getVar();
|
||||
$docData['created_by'] = $this->session->has('is_staff_logged_in');
|
||||
$docData['body_html'] = $this->TemplateModel->where('template_id',$this->request->getVar('template_id'))->get()->getRow()->body_html;
|
||||
$docData['template_name'] = $this->TemplateModel->where('template_id',$this->request->getVar('template_id'))->get()->getRow()->template_name;
|
||||
$insert = $this->ClientDocsModel->insert($docData);
|
||||
|
||||
if($insert){
|
||||
|
||||
@ -62,7 +62,7 @@ class StaffController extends BaseController
|
||||
$this->session->set('logged_in_staff_branch_id',$staffdata['branch_id']);
|
||||
$this->session->set('logged_in_staff_business_id',$staffdata['business_id']);
|
||||
|
||||
return redirect()->to(base_url().'client_list');
|
||||
return redirect()->to(base_url().'shared_docs_list');
|
||||
}
|
||||
else{
|
||||
$this->session->setTempdata('error','Email or Password is invalid',3);
|
||||
|
||||
@ -7,7 +7,7 @@ class ClientDocsModel extends Model
|
||||
protected $table = 'client_docs';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $allowedFields = ['client_branch_id','template_id','body_html','document_name','rejection_reason','is_approved','otp','ip_address','is_active' ,'created_by','updated_by'];
|
||||
protected $allowedFields = ['client_branch_id','template_id','template_name','body_html','document_name','rejection_reason','is_approved','otp','ip_address','is_active' ,'created_by','updated_by'];
|
||||
|
||||
|
||||
|
||||
|
||||
@ -80,12 +80,12 @@
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?php echo base_url().'client_docs_preview?doc_id='.$value['doc_id']; ?>" > <i class='mdi mdi-eye-outline mr-1' style="margin-right: 16px !important;margin-left: 5px;"></i>Preview</a>
|
||||
<a class="dropdown-item" href="<?php echo base_url().'client_docs_preview?doc_id='.$value['id']; ?>" > <i class='mdi mdi-eye-outline mr-1' style="margin-right: 16px !important;margin-left: 5px;"></i>Preview</a>
|
||||
|
||||
<?php if($value['is_active'] == 1 && $value['is_approved'] == 0){ ?>
|
||||
<a class="dropdown-item" data-id="<?php echo $value['doc_id']; ?>" data-isactive="<?php echo $value['is_active']; ?>" title="Revert" onclick="statusChange(this)"><i class="mdi mdi-file-undo" style="margin-right: 16px !important;margin-left: 5px;"></i>Revert</a>
|
||||
<a class="dropdown-item" data-id="<?php echo $value['id']; ?>" data-isactive="<?php echo $value['is_active']; ?>" title="Revert" onclick="statusChange(this)"><i class="mdi mdi-file-undo" style="margin-right: 16px !important;margin-left: 5px;"></i>Revert</a>
|
||||
<?php } else if($value['is_active'] == 0 ) { ?>
|
||||
<a class="dropdown-item" data-id="<?php echo $value['doc_id']; ?>" data-isactive="<?php echo $value['is_active']; ?>" title="Share" onclick="statusChange(this)"><i class="mdi mdi-share-all-outline" style="margin-right: 16px !important;margin-left: 5px;"></i>Share</a>
|
||||
<a class="dropdown-item" data-id="<?php echo $value['id']; ?>" data-isactive="<?php echo $value['is_active']; ?>" title="Share" onclick="statusChange(this)"><i class="mdi mdi-share-all-outline" style="margin-right: 16px !important;margin-left: 5px;"></i>Share</a>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user