Merge branch 'main' of bitbucket.org:venbainformationtechnology/bb_sign

This commit is contained in:
unknown 2024-06-13 10:45:29 +05:30
commit 9f69987f2f
4 changed files with 17 additions and 10 deletions

View File

@ -221,7 +221,7 @@ class MasterController extends BaseController
$id = $this->request->getVar('service_id'); $id = $this->request->getVar('service_id');
$data['AllServiceGroupData'] = $this->ServiceGroupModel->findAll(); $data['AllServiceGroupData'] = $this->ServiceGroupModel->findAll();
$data['AllBusinessData'] = $this->BusinessModel->findAll(); $data['AllBusinessData'] = $this->BusinessModel->where('isactive',1)->findAll();
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow(); $staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
echo view('layout/header', ['Data'=>$staffdata]); echo view('layout/header', ['Data'=>$staffdata]);
@ -245,6 +245,9 @@ class MasterController extends BaseController
$data['serviceGroupData'] = $this->ServiceGroupModel->where('service_group_id',$data['templateData']->service_group_id)->get()->getRow(); $data['serviceGroupData'] = $this->ServiceGroupModel->where('service_group_id',$data['templateData']->service_group_id)->get()->getRow();
$data['AllServiceGroupData'] = $this->ServiceGroupModel->where('branch_id',$this->session->get('logged_in_staff_branch_id'))->findAll(); $data['AllServiceGroupData'] = $this->ServiceGroupModel->where('branch_id',$this->session->get('logged_in_staff_branch_id'))->findAll();
$data['BusinessData'] = $this->BusinessModel->where('business_id',$data['templateData']->template_header_business)->where('isactive',1)->get()->getRow();
$data['AllBusinessData'] = $this->BusinessModel->where('isactive',1)->findAll();
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow(); $staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
echo view('layout/header', ['Data'=>$staffdata]); echo view('layout/header', ['Data'=>$staffdata]);
echo view('template_form',$data); echo view('template_form',$data);
@ -353,7 +356,8 @@ class MasterController extends BaseController
->join('client', 'client_branch.client_id = client.client_id', 'left') ->join('client', 'client_branch.client_id = client.client_id', 'left')
->where('client_branch.id',$data['docData']->client_branch_id)->get()->getRow(); ->where('client_branch.id',$data['docData']->client_branch_id)->get()->getRow();
$data['header_html'] = $data['docData']->header_html;
$data['footer_html'] = $data['docData']->footer_html;
$data['body_html'] = $data['docData']->body_html; $data['body_html'] = $data['docData']->body_html;
foreach ($data['clientData'] as $key => $value) { foreach ($data['clientData'] as $key => $value) {
$placeHolder = '%'.$key.'%'; $placeHolder = '%'.$key.'%';

View File

@ -37,9 +37,10 @@ class ClientDocsModel extends Model
public function docPreview($doc_id){ public function docPreview($doc_id){
$this->select('client_docs.is_approved ,client_docs.id as doc_id,client_docs.client_branch_id ,client_docs.updated_at,client_docs.ip_address,template.template_name,client_docs.body_html , services.service_name'); $this->select('client_docs.is_approved ,client_docs.id as doc_id,client_docs.client_branch_id ,client_docs.updated_at,client_docs.ip_address,template.template_name,client_docs.body_html , services.service_name , business.header_html, business.footer_html');
$this->join('template', 'template.template_id = client_docs.template_id'); $this->join('template', 'template.template_id = client_docs.template_id');
$this->join('services', 'services.service_id = template.service_id'); $this->join('services', 'services.service_id = template.service_id');
$this->join('business', 'business.business_id = template.template_header_business');
$this->where('client_docs.id', $doc_id); $this->where('client_docs.id', $doc_id);
return $this->get()->getRow(); return $this->get()->getRow();

View File

@ -51,17 +51,18 @@
<div class="card-body"> <div class="card-body">
<div class="template-header"> <div class="template-header">
<?php echo $header_html; ?>
</div> </div>
<div class="template-body"> <div class="template-body">
<?php echo $body_html; ?>
<?php echo $body_html; ?> <div>
<?php if($docData->is_approved == 1){ echo ' <div class="file_approved"> Approved at '.date('d-m-Y H:i:s', strtotime($docData->updated_at)).' through OTP sent to '.$clientData->mobile_no.' from ip address '.$docData->ip_address.'</div>'; } ?>
</div>
</div> </div>
<div > <div class="template-footer">
<?php if($docData->is_approved == 1){ echo ' <div class="file_approved"> Approved at '.date('d-m-Y H:i:s', strtotime($docData->updated_at)).' through OTP sent to '.$clientData->mobile_no.' from ip address '.$docData->ip_address.'</div>'; } ?> <?php echo $footer_html; ?>
</div> </div>
</div> </div>

View File

@ -259,6 +259,7 @@ $(document).ready(function() {
$('#summernote-basic').summernote({ $('#summernote-basic').summernote({
height: 500,
toolbar: [ toolbar: [
// [groupName, [list of button]] // [groupName, [list of button]]
['style', ['style']], ['style', ['style']],