Merge branch 'main' of bitbucket.org:venbainformationtechnology/bb_sign
This commit is contained in:
commit
5e2b80c086
@ -262,6 +262,7 @@ class MasterController extends BaseController
|
||||
$id = $this->request->getVar('template_id');
|
||||
$data['templateData'] = $this->TemplateModel->where('md5(template_id)',$id)->get()->getRow();
|
||||
$data['serviceData'] = $this->ServiceModel->where('service_id',$data['templateData']->service_id)->get()->getRow();
|
||||
$data['businessData'] = $this->BusinessModel->where('business_id',$data['templateData']->template_header_business)->get()->getRow();
|
||||
|
||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||
$data['body_html'] = $data['templateData']->body_html;
|
||||
@ -288,10 +289,10 @@ class MasterController extends BaseController
|
||||
|
||||
$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')
|
||||
->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||
// ->where('client.business_id',$this->session->get('logged_in_staff_business_id'))
|
||||
->findAll();
|
||||
$data['serviceGroupData'] = $this->ServiceGroupModel->findAll();
|
||||
// print_r($data['doc_list']);die;
|
||||
|
||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||
echo view('layout/header', ['Data'=>$staffdata]);
|
||||
echo view('share_docs',$data);
|
||||
@ -351,10 +352,14 @@ class MasterController extends BaseController
|
||||
|
||||
$doc_id = $this->request->getVar('doc_id');
|
||||
$data['docData'] = $this->ClientDocsModel->docPreview($doc_id);
|
||||
|
||||
|
||||
$data['clientData'] = $this->ClientBranchModel->select('client.* , client_branch.*')
|
||||
->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();
|
||||
|
||||
$DateAndYears = $this->dateAndYearPlaceholder();
|
||||
|
||||
|
||||
$data['header_html'] = $data['docData']->header_html;
|
||||
$data['footer_html'] = $data['docData']->footer_html;
|
||||
@ -364,6 +369,12 @@ class MasterController extends BaseController
|
||||
$data['body_html'] = str_replace($placeHolder,$value,$data['body_html']);
|
||||
|
||||
}
|
||||
|
||||
foreach ($DateAndYears as $key => $value) {
|
||||
$placeHolder = '%'.$key.'%';
|
||||
$data['body_html'] = str_replace($placeHolder,$value,$data['body_html']);
|
||||
|
||||
}
|
||||
|
||||
echo view('layout/header', ['Data'=>$userData]);
|
||||
echo view('client_docs_preview',$data);
|
||||
@ -371,6 +382,52 @@ class MasterController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function dateAndYearPlaceholder()
|
||||
{
|
||||
$currentDate = date('d-m-Y');
|
||||
|
||||
|
||||
$currentYear = date('Y');
|
||||
$currentMonth = date('m');
|
||||
|
||||
|
||||
if ($currentMonth >= 4) {
|
||||
$financialYearStart = $currentYear . '-04-01';
|
||||
$financialYearEnd = ($currentYear + 1) . '-03-31';
|
||||
$financialYear = $currentYear . '-' . ($currentYear + 1);
|
||||
$assessmentYear = ($currentYear + 1) . '-' . ($currentYear + 2);
|
||||
$q1 = '01-04-' . $currentYear . ' to ' . '30-06-' . $currentYear;
|
||||
$q2 = '01-07-' . $currentYear . ' to ' . '30-09-' . $currentYear;
|
||||
$q3 = '01-10-' . $currentYear . ' to ' . '31-12-' . $currentYear;
|
||||
$q4 = '01-01-' . ($currentYear + 1) . ' to ' . '31-03-' . ($currentYear + 1);
|
||||
|
||||
} else {
|
||||
$financialYearStart = ($currentYear - 1) . '-04-01';
|
||||
$financialYearEnd = $currentYear . '-03-31';
|
||||
$financialYear = ($currentYear - 1) . '-' . $currentYear;
|
||||
$assessmentYear = $currentYear . '-' . ($currentYear + 1);
|
||||
$q1 = '01-04-' . ($currentYear - 1) . ' to ' . '30-06-' . ($currentYear - 1);
|
||||
$q2 = '01-07-' . ($currentYear - 1) . ' to ' . '30-09-' . ($currentYear - 1);
|
||||
$q3 = '01-10-' . ($currentYear - 1) . ' to ' . '31-12-' . ($currentYear - 1);
|
||||
$q4 = '01-01-' . $currentYear . ' to ' . '31-03-' . $currentYear;
|
||||
}
|
||||
|
||||
$DateAndYears = [
|
||||
"CD" => $currentDate,
|
||||
"CY" => $currentYear,
|
||||
"FY" => $financialYear,
|
||||
"AY" => $assessmentYear,
|
||||
"Q1" => $q1,
|
||||
"Q2" => $q2,
|
||||
"Q3" => $q3,
|
||||
"Q4" => $q4,
|
||||
|
||||
];
|
||||
|
||||
return $DateAndYears;
|
||||
|
||||
}
|
||||
|
||||
public function client_docs_histroy($doc_id)
|
||||
{
|
||||
if($this->session->has('is_staff_logged_in')){
|
||||
|
||||
@ -174,11 +174,7 @@ class StaffController extends BaseController
|
||||
if(!$this->session->has('is_staff_logged_in')){ return redirect()->to(base_url().'staff'); }
|
||||
|
||||
|
||||
$data['clientList'] = $this->ClientModel->select('client.* , COUNT(client_docs.id) as docs_count')
|
||||
->join('client_docs', 'client.client_id = client_docs.client_branch_id', 'left')
|
||||
->where('client.branch_id',$this->session->get('logged_in_staff_branch_id'))
|
||||
->groupBy('client.client_id')
|
||||
->findAll();
|
||||
$data['clientList'] = $this->ClientModel->findAll();
|
||||
|
||||
$staffdata = $this->StaffModel->where('staff_id',$this->session->get('is_staff_logged_in'))->get()->getRow();
|
||||
echo view('layout/header', ['Data'=>$staffdata]);
|
||||
|
||||
@ -14,7 +14,7 @@ class ClientDocsModel extends Model
|
||||
public function getTemplate($client_id){
|
||||
|
||||
|
||||
$this->select('template.template_name , template.template_id ,client_docs.is_approved ,client_docs.id as doc_id ,client_docs.created_at , services.service_name');
|
||||
$this->select('template.template_name , template.template_id ,client_docs.is_approved ,client_docs.id as doc_id ,client_docs.created_at ,client_docs.document_name, services.service_name');
|
||||
$this->join('template', 'template.template_id = client_docs.template_id');
|
||||
$this->join('services', 'services.service_id = template.service_id');
|
||||
$this->where('client_docs.is_active', 1);
|
||||
@ -37,7 +37,7 @@ class ClientDocsModel extends Model
|
||||
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 , business.header_html, business.footer_html');
|
||||
$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 ,client_docs.is_active, services.service_name , business.header_html, business.footer_html');
|
||||
$this->join('template', 'template.template_id = client_docs.template_id');
|
||||
$this->join('services', 'services.service_id = template.service_id');
|
||||
$this->join('business', 'business.business_id = template.template_header_business');
|
||||
|
||||
@ -80,12 +80,36 @@
|
||||
$(document).ready(function() {
|
||||
$('#summernote-header').summernote({
|
||||
height: 150, // set the height of the editor
|
||||
placeholder: 'Write the header content here...'
|
||||
toolbar: [
|
||||
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear' ]],
|
||||
['fontname', ['fontname']],
|
||||
['fontsize', ['fontsize']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph' , 'height']],
|
||||
['table', ['table']],
|
||||
['insert', [ 'picture']],
|
||||
['view', ['fullscreen', 'codeview', 'help']],
|
||||
['mybutton', ['customButton','Years']] // Custom button group
|
||||
],
|
||||
});
|
||||
|
||||
$('#summernote-footer').summernote({
|
||||
height: 150, // set the height of the editor
|
||||
placeholder: 'Write the footer content here...'
|
||||
toolbar: [
|
||||
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear' ]],
|
||||
['fontname', ['fontname']],
|
||||
['fontsize', ['fontsize']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph' , 'height']],
|
||||
['table', ['table']],
|
||||
['insert', [ 'picture']],
|
||||
['view', ['fullscreen', 'codeview', 'help']],
|
||||
['mybutton', ['customButton','Years']] // Custom button group
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
@ -94,7 +118,7 @@ $(document).ready(function() {
|
||||
$('#summernote-header').summernote('code', $('#header_html').val());
|
||||
$('#summernote-footer').summernote('code', $('#footer_html').val());
|
||||
|
||||
}, 1000);
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
border-top: 1px dotted #000;
|
||||
padding-top: 3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</style>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
|
||||
|
||||
@ -19,29 +20,48 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-2"> </div>
|
||||
<div class="col-8">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $docData->service_name; ?>
|
||||
<a class="download-btnn" style="color:#000;">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-2">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-8">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"><?php echo $docData->service_name; ?>
|
||||
<a class="download-btnn" style="color:#000;">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
</h4>
|
||||
<div class="page-title-right">
|
||||
<a onclick="window.history.back()" class="btn btn-secondary waves-effect waves-light"> Close </a>
|
||||
|
||||
<?php if($docData->is_approved != 1){ ?>
|
||||
<a href="#" class="btn btn-danger waves-effect waves-light" data-toggle="modal" data-target="#reject-modal"> Reject </a>
|
||||
<a href="#" data-toggle="modal" data-target="#approve-modal" class="btn btn-primary waves-effect waves-light"> Approve </a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="page-title-right">
|
||||
<a onclick="window.history.back()" class="btn btn-secondary waves-effect waves-light"> Close </a>
|
||||
|
||||
<?php if(isset($_SESSION['is_staff_logged_in']) && $_SESSION['is_staff_logged_in']) {
|
||||
if( $docData->is_active == 1 && $docData->is_approved == 0){ ?>
|
||||
<a data-id="<?php echo $docData->doc_id; ?>" data-isactive="<?php echo $docData->is_active; ?>" title="Share" onclick="statusChange(this)" class="btn btn-warning waves-effect waves-light"> Revert </a>
|
||||
<?php } else if( $docData->is_active == 0 ) { ?>
|
||||
<a data-id="<?php echo $docData->doc_id; ?>" data-isactive="<?php echo $docData->is_active; ?>" title="Share" onclick="statusChange(this)" class="btn btn-info waves-effect waves-light"> Share </a>
|
||||
<?php } } ?>
|
||||
|
||||
|
||||
|
||||
<?php if($docData->is_approved != 1){ ?>
|
||||
<a href="#" class="btn btn-danger waves-effect waves-light" data-toggle="modal" data-target="#reject-modal"> Reject </a>
|
||||
<a href="#" data-toggle="modal" data-target="#approve-modal" class="btn btn-primary waves-effect waves-light"> Approve </a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2"> </div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-2">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
@ -68,7 +88,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col-->
|
||||
<div class="col-2"> </div>
|
||||
<div class="col-2 centered-div">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -349,6 +371,40 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function statusChange(params) {
|
||||
console.log(params);
|
||||
var status = params.getAttribute('data-isactive');
|
||||
var doc_id = params.getAttribute('data-id');
|
||||
if(status == 1){
|
||||
var is_active= 0;
|
||||
}else{
|
||||
var is_active= 1;
|
||||
}
|
||||
|
||||
var formData = {
|
||||
doc_id: doc_id,
|
||||
is_active: is_active
|
||||
};
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '<?php echo base_url()."change_doc_status"?>',
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.data) {
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error response here
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100 display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Service</th>
|
||||
<th>Document</th>
|
||||
<th>Shared at</th>
|
||||
<th>Status</th>
|
||||
@ -46,6 +47,7 @@
|
||||
|
||||
<tr>
|
||||
<td> <?php echo $value['service_name']; ?></td>
|
||||
<td> <?php echo $value['document_name']; ?></td>
|
||||
<td> <?php $date = new DateTime($value['created_at']); echo $date->format('d-M-Y h:i A'); ?></td>
|
||||
<td>
|
||||
<?php if ($value['is_approved'] == 1): ?>
|
||||
|
||||
@ -46,7 +46,6 @@
|
||||
<th>PAN</th>
|
||||
<th>Mobile</th>
|
||||
<th>Email</th>
|
||||
<th>Shared Docs</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@ -62,7 +61,6 @@
|
||||
<td> <?php echo $value['pan_no']; ?></td>
|
||||
<td><?php echo $value['mobile_no']; ?></td>
|
||||
<td><?php echo $value['email']; ?></td>
|
||||
<td><?php echo $value['docs_count']; ?></td>
|
||||
<td>
|
||||
<?php if($value['is_active'] == 1): ?>
|
||||
<span style="color:green">Active</span>
|
||||
@ -82,7 +80,7 @@
|
||||
<a class="dropdown-item" data-id="<?php echo $value['client_id']; ?>" data-isactive="<?php echo $value['is_active']; ?>" title="Activate" onclick="statusChange(this)"><i class="ri-shield-user-line" style="margin-right:10px"></i>Activate</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<a class="dropdown-item" href="<?= base_url()."shared_docs_list?client_id=".$value['client_id']; ?>" > <i class='mdi mdi-file-document-outline mr-1' style="margin-right: 16px !important;margin-left: 5px;"></i>Documents</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -271,27 +271,12 @@
|
||||
<?php if(isset($_SESSION['is_staff_logged_in']) && $_SESSION['is_staff_logged_in']) { ?>
|
||||
|
||||
<?php if($_SESSION['logged_in_staff_role'] == 'Admin' || $_SESSION['logged_in_staff_role'] == 'Staff') { ?>
|
||||
<!-- <li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-visa" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="ri-pages-line mr-1"></i> Visa Request <div class="arrow-down"></div>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-visa">
|
||||
<a href="<?= base_url()."visa_request_list"; ?>" class="dropdown-item">Visa Request List</a>
|
||||
<a href="<?= base_url()."create_visa_request"; ?>" class="dropdown-item">Create Visa Request</a>
|
||||
</div>
|
||||
</li> -->
|
||||
<?php } ?>
|
||||
|
||||
<?php if($_SESSION['logged_in_staff_role'] == 'Admin' ) { ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?= base_url()."shared_docs_list"; ?>">
|
||||
<i class="ri-share-line"></i> Share Docs </a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-Service" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@ -306,6 +291,13 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if($_SESSION['logged_in_staff_role'] == 'Admin' ) { ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-my-visa" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@ -318,7 +310,11 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php }else if(isset($_SESSION['is_client_logged_in']) && $_SESSION['is_client_logged_in']) { ?>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
@ -333,21 +329,7 @@
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<?php if(isset($_SESSION['is_staff_logged_in']) && $_SESSION['is_staff_logged_in']) { ?>
|
||||
|
||||
<?php if($_SESSION['logged_in_staff_role'] == 'Super Admin') { ?>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-my-visa" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-building"></i> Business <div class="arrow-down"></div>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-my-visa">
|
||||
<a href="<?= base_url()."business_list"; ?>" class="dropdown-item">Business</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php }} ?>
|
||||
|
||||
|
||||
</ul> <!-- end navbar-->
|
||||
</div> <!-- end .collapsed-->
|
||||
</nav>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100 display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Client Name</th>
|
||||
<th style="width:10px">Client Name</th>
|
||||
<th>Client Branch Name</th>
|
||||
<th>Service Group</th>
|
||||
<th>Service Name</th>
|
||||
@ -60,7 +60,7 @@
|
||||
<?php foreach ($doc_list as $key => $value) { ?>
|
||||
|
||||
<tr>
|
||||
<td> <?php echo $value['client_name']; ?></td>
|
||||
<td style="width:10px"> <?php echo $value['client_name']; ?></td>
|
||||
<td> <?php echo $value['client_branch_name']; ?></td>
|
||||
<td> <?php echo $value['group_name']; ?></td>
|
||||
<td> <?php echo $value['service_name']; ?></td>
|
||||
|
||||
@ -2,7 +2,26 @@
|
||||
<!-- ============================================================== -->
|
||||
<!-- Start Page Content here -->
|
||||
<!-- ============================================================== -->
|
||||
<style>
|
||||
.append-text-button {
|
||||
display: inline-block;
|
||||
padding: 10px 10px;
|
||||
font-size: 13px;
|
||||
color: black; /* Primary color */
|
||||
background-color: transparent;
|
||||
border: 2px solid #85a7c9; /* Border color */
|
||||
border-radius: 4px; /* Rounded corners */
|
||||
text-align: center;
|
||||
cursor: pointer; /* Pointer cursor to indicate it's clickable */
|
||||
transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
|
||||
}
|
||||
|
||||
.append-text-button:hover {
|
||||
background-color: #85a7c9; /* Background color on hover */
|
||||
color: #fff; /* Text color on hover */
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="content-page">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
@ -37,7 +56,6 @@
|
||||
|
||||
<form id="template-form">
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="vs_category">Service Group<span class="text-danger">*</span></label>
|
||||
<select class="select2-dropdown form-control" id="service_group_id" required>
|
||||
@ -65,7 +83,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="vs_category">Template Header<span class="text-danger">*</span></label>
|
||||
<label for="vs_category">Template Header and Footer<span class="text-danger">*</span></label>
|
||||
<select class="select2-dropdown form-control" id="template_header_business" required>
|
||||
<option value="">Select Business </option>
|
||||
<?php if(isset($AllBusinessData)){ foreach ($AllBusinessData as $key => $value) { ?>
|
||||
@ -121,39 +139,43 @@
|
||||
<div class="container">
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Client Name</div>
|
||||
<div class="col-sm-8">%name%</div>
|
||||
<div class="col-sm-8 append-text-button">%name%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">PAN No</div>
|
||||
<div class="col-sm-8">%pan_no%</div>
|
||||
<div class="col-sm-8 append-text-button">%pan_no%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">GST</div>
|
||||
<div class="col-sm-8 append-text-button">%gst_no%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Mobile No</div>
|
||||
<div class="col-sm-8">%mobile_no%</div>
|
||||
<div class="col-sm-8 append-text-button">%mobile_no%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Email</div>
|
||||
<div class="col-sm-8">%email%</div>
|
||||
<div class="col-sm-8 append-text-button">%email%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Address</div>
|
||||
<div class="col-sm-8">%address%</div>
|
||||
<div class="col-sm-8 append-text-button">%address%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Country</div>
|
||||
<div class="col-sm-8">%country%</div>
|
||||
<div class="col-sm-8 append-text-button">%country%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">State</div>
|
||||
<div class="col-sm-8">%state%</div>
|
||||
<div class="col-sm-8 append-text-button">%state%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">City</div>
|
||||
<div class="col-sm-8">%city%</div>
|
||||
<div class="col-sm-8 append-text-button">%city%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">PIN</div>
|
||||
<div class="col-sm-8">%pin_code%</div>
|
||||
<div class="col-sm-8 append-text-button">%pin_code%</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -161,6 +183,56 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="YearsCustomModal" tabindex="-1" role="dialog" aria-labelledby="YearsCustomModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="YearsCustomModalLabel">Place Holder Variables</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container">
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Current Date</div>
|
||||
<div class="col-sm-8 append-text-button">%CD%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Calandar Year</div>
|
||||
<div class="col-sm-8 append-text-button">%CY%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Financial Year</div>
|
||||
<div class="col-sm-8 append-text-button">%FY%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Accessment Year</div>
|
||||
<div class="col-sm-8 append-text-button">%AY%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Q1 Year</div>
|
||||
<div class="col-sm-8 append-text-button">%Q1%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Q2 Year</div>
|
||||
<div class="col-sm-8 append-text-button">%Q2%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Q3 Year</div>
|
||||
<div class="col-sm-8 append-text-button">%Q3%</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-4 font-weight-bold">Q4 Year</div>
|
||||
<div class="col-sm-8 append-text-button">%Q4%</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" id="body_html" value='<?= isset($templateData) ? $templateData->body_html : '' ?>'>
|
||||
<!-- ============================================================== -->
|
||||
@ -174,7 +246,13 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.select2-dropdown').select2();
|
||||
$('.append-text-button').on('click', function() {
|
||||
var textToInsert = $(this).text(); // Get the text content of the clicked element
|
||||
$('#summernote-basic').summernote('focus'); // Focus on the Summernote editor
|
||||
$('#summernote-basic').summernote('editor.insertText', textToInsert); // Insert the text at the cursor position
|
||||
});
|
||||
|
||||
$('.select2-dropdown').select2();
|
||||
|
||||
$("#service_group_id").on("change", function()
|
||||
{
|
||||
@ -212,15 +290,14 @@ $("#service_group_id").on("change", function()
|
||||
|
||||
$("#savedata").on("click", function()
|
||||
{
|
||||
$('.btn-codeview').click();
|
||||
var body_html = $('#summernote-basic').summernote('code');
|
||||
formData ={
|
||||
service_group_id : $('#service_group_id').val(),
|
||||
service_id : $('#service_id').val(),
|
||||
template_id : $('#template_id').val(),
|
||||
template_header_business : $('#template_header_business').val(),
|
||||
template_name : $('#template_name').val(),
|
||||
body_text : $('.note-editable > p:first').text(),
|
||||
body_html : $('.note-codable').val(),
|
||||
body_html : body_html,
|
||||
};
|
||||
|
||||
|
||||
@ -259,18 +336,19 @@ $(document).ready(function() {
|
||||
|
||||
|
||||
$('#summernote-basic').summernote({
|
||||
height: 500,
|
||||
height: 750,
|
||||
toolbar: [
|
||||
// [groupName, [list of button]]
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear' ]],
|
||||
['fontname', ['fontname']],
|
||||
['fontsize', ['fontsize']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph' , 'height']],
|
||||
['table', ['table']],
|
||||
['insert', [ 'picture']],
|
||||
['view', ['fullscreen', 'codeview', 'help']],
|
||||
['mybutton', ['customButton']] // Custom button group
|
||||
['mybutton', ['customButton','Years']] // Custom button group
|
||||
],
|
||||
|
||||
buttons: {
|
||||
@ -278,23 +356,34 @@ $(document).ready(function() {
|
||||
var ui = $.summernote.ui;
|
||||
// create button
|
||||
var button = ui.button({
|
||||
contents: '<i class="fa fa-child"/> Place Holders',
|
||||
contents: 'Client Details',
|
||||
tooltip: 'Client Details Place Holders',
|
||||
click: function() {
|
||||
$('#customModal').modal('show');
|
||||
}
|
||||
});
|
||||
return button.render();
|
||||
},
|
||||
Years: function() {
|
||||
var ui = $.summernote.ui;
|
||||
// create button
|
||||
var button = ui.button({
|
||||
contents: 'Date & Year',
|
||||
tooltip: 'Date & Year Place Holders',
|
||||
click: function() {
|
||||
$('#YearsCustomModal').modal('show');
|
||||
}
|
||||
});
|
||||
return button.render();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() =>
|
||||
{
|
||||
$('.btn-codeview').click();
|
||||
$('.note-codable').val($('#body_html').val());
|
||||
$('.btn-codeview').click();
|
||||
}, 1000);
|
||||
$('#summernote-basic').summernote('code', $('#body_html').val());
|
||||
|
||||
}, 500);
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Service And Templates </h4>
|
||||
<h4 class="page-title">Templates List</h4>
|
||||
<div class="page-title-right">
|
||||
<a href="<?= base_url('template_create'); ?>" class="btn btn-primary waves-effect waves-light">
|
||||
Create New
|
||||
|
||||
@ -4,12 +4,15 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="template-header">
|
||||
<?php echo $businessData->header_html; ?>
|
||||
</div>
|
||||
|
||||
<div class="template-body">
|
||||
<?php echo $body_html; ?>
|
||||
</div>
|
||||
|
||||
<?php echo $body_html; ?>
|
||||
|
||||
<div class="template-footer">
|
||||
<?php echo $businessData->footer_html; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user