Merge branch 'main' of bitbucket.org:venbainformationtechnology/bb_sign
This commit is contained in:
commit
22241e2ae2
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
/writable
|
/writable
|
||||||
/public/uploads
|
/public/uploads
|
||||||
|
|
||||||
|
/.env
|
||||||
|
|||||||
@ -5,7 +5,7 @@ class BranchModel extends Model
|
|||||||
{
|
{
|
||||||
protected $table = 'branches';
|
protected $table = 'branches';
|
||||||
protected $primaryKey = 'branch_id';
|
protected $primaryKey = 'branch_id';
|
||||||
protected $allowedFields = ['business_id','branch_id','branch_name','gstno','email','contact','address','city','state','country','postal_code','state_code','isactive'];
|
protected $allowedFields = ['business_id','branch_id','branch_name','gstno','email','contact','address','city','state','country','pin_code','state_code','isactive'];
|
||||||
|
|
||||||
public function getBranchesByBusinessId($business_id)
|
public function getBranchesByBusinessId($business_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -187,7 +187,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group text-right">
|
<div class="form-group text-right">
|
||||||
<button class="btn btn-info waves-effect waves-light" type="submit" onclick="submitBranch(this)">Submit</button>
|
<button class="btn btn-info waves-effect waves-light" type="submit" id="business_branch_submit" onclick="submitBranch(this)">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
@ -215,6 +215,11 @@
|
|||||||
}else{
|
}else{
|
||||||
var url = '<?= base_url("add_branch"); ?>';
|
var url = '<?= base_url("add_branch"); ?>';
|
||||||
}
|
}
|
||||||
|
var formDataValidate = $('#model_form_data').serialize(); // Serialize form data
|
||||||
|
|
||||||
|
if(!formDataValidate){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
var formData = {
|
var formData = {
|
||||||
business_id: $('#business').val(),
|
business_id: $('#business').val(),
|
||||||
@ -246,6 +251,7 @@
|
|||||||
var business_id = $('#business_id').val();
|
var business_id = $('#business_id').val();
|
||||||
// console.log(formData);
|
// console.log(formData);
|
||||||
|
|
||||||
|
$('#business_branch_submit').attr('disabled','true');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
@ -253,6 +259,8 @@
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
$('#business_branch_submit').removeAttr('disabled');
|
||||||
|
|
||||||
$('#bike_model_login-modal').modal('hide');
|
$('#bike_model_login-modal').modal('hide');
|
||||||
|
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|||||||
@ -103,7 +103,7 @@
|
|||||||
<div class="modal-body" style="margin-top: -29px;">
|
<div class="modal-body" style="margin-top: -29px;">
|
||||||
<div class="text-center mt-2 mb-4">
|
<div class="text-center mt-2 mb-4">
|
||||||
</div>
|
</div>
|
||||||
<form id="model_form_data" class="px-4">
|
<form id="client_branch_model_form_data" class="px-4">
|
||||||
|
|
||||||
<input type="text" id="id" hidden>
|
<input type="text" id="id" hidden>
|
||||||
|
|
||||||
@ -123,7 +123,7 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="branchname">Branch Name</label>
|
<label for="branchname">Branch Name</label>
|
||||||
<input class="form-control" name="branch_name" type="text" id="branch_name" required="" placeholder="Branch Name">
|
<input class="form-control" name="branch_name" type="text" id="branch_name" required="true" placeholder="Branch Name">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -181,7 +181,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group text-right">
|
<div class="form-group text-right">
|
||||||
<button class="btn btn-info waves-effect waves-light" type="submit" onclick="submitBranch(event,this)">Submit</button>
|
<button class="btn btn-info waves-effect waves-light" type="submit" id="client_branch_submit" onclick="submitBranch(event,this)">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
@ -235,9 +235,8 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function submitBranch(event,params) {
|
function submitBranch(event,params) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
|
|
||||||
console.log($('#client').val());
|
|
||||||
if ($('#client').val() == 0) {
|
if ($('#client').val() == 0) {
|
||||||
toastr.warning('Select Client');
|
toastr.warning('Select Client');
|
||||||
return;
|
return;
|
||||||
@ -265,6 +264,11 @@
|
|||||||
var url = '<?= base_url("add_client_branch"); ?>';
|
var url = '<?= base_url("add_client_branch"); ?>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var formDataValidate = $('#client_branch_model_form_data').serialize(); // Serialize form data
|
||||||
|
|
||||||
|
if(!formDataValidate){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
var form = $(params).parent().parent();
|
var form = $(params).parent().parent();
|
||||||
var isValid = true;
|
var isValid = true;
|
||||||
@ -277,7 +281,7 @@
|
|||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$('#client_branch_submit').attr('disabled','true');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
@ -285,6 +289,7 @@
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
$('#client_branch_submit').removeAttr('disabled');
|
||||||
if(response == true){
|
if(response == true){
|
||||||
toastr.success('Branch Added Successfully');
|
toastr.success('Branch Added Successfully');
|
||||||
$('#client_branch_modal').modal('hide');
|
$('#client_branch_modal').modal('hide');
|
||||||
|
|||||||
@ -12,6 +12,23 @@
|
|||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
|
||||||
|
.row > .col-2 {
|
||||||
|
flex: 0 0 0%;
|
||||||
|
max-width: 0%;
|
||||||
|
}
|
||||||
|
.row > .col-8 {
|
||||||
|
flex: 0 0 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767.98px) {
|
||||||
|
.pro-user-name {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -19,6 +36,11 @@
|
|||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
|
||||||
|
|
||||||
<div class="content-page">
|
<div class="content-page">
|
||||||
|
<div class="loader-mask modal-loader-mask" style="display:none;">
|
||||||
|
<div class="loader modal-loader" style="display:none;">
|
||||||
|
Please Wait <img src="<?= base_url() . "public" ?>/assets/images/simple_loader.gif" height="30" width="30" alt="Loading...">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Start Content-->
|
<!-- Start Content-->
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
@ -41,7 +63,7 @@
|
|||||||
|
|
||||||
<?php if(isset($_SESSION['is_staff_logged_in']) && $_SESSION['is_staff_logged_in']) {
|
<?php if(isset($_SESSION['is_staff_logged_in']) && $_SESSION['is_staff_logged_in']) {
|
||||||
if( $docData->is_active == 1 && $docData->is_approved == 0){ ?>
|
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>
|
<a data-id="<?php echo $docData->doc_id; ?>" data-isactive="<?php echo $docData->is_active; ?>" title="revert" onclick="statusChange(this)" class="btn btn-warning waves-effect waves-light"> Revert </a>
|
||||||
<?php } else if( $docData->is_active == 0 ) { ?>
|
<?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>
|
<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 } } ?>
|
||||||
@ -67,30 +89,30 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-2"> </div>
|
<div class="col-2"></div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<div class="template-header">
|
|
||||||
<?php echo $header_html; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="template-body">
|
|
||||||
<?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 class="template-footer">
|
|
||||||
<?php echo $footer_html; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div class="template-header">
|
||||||
|
<?php echo $header_html; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="template-body">
|
||||||
|
<?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 class="template-footer">
|
||||||
|
<?php echo $footer_html; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end col-->
|
</div>
|
||||||
<div class="col-2 centered-div">
|
</div><!-- end col-->
|
||||||
|
<div class="col-2 centered-div"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -333,7 +355,8 @@
|
|||||||
|
|
||||||
// Get the HTML content of the element as a string
|
// Get the HTML content of the element as a string
|
||||||
var htmlContent = element.innerHTML;
|
var htmlContent = element.innerHTML;
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url()."download_doc"?>',
|
url: '<?php echo base_url()."download_doc"?>',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -370,15 +393,20 @@
|
|||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
|
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').fadeOut('slow');
|
||||||
console.error('Error : ' + error);
|
console.error('Error : ' + error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').fadeOut('slow');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function statusChange(params) {
|
function statusChange(params) {
|
||||||
console.log(params);
|
// console.log(params);
|
||||||
var status = params.getAttribute('data-isactive');
|
var status = params.getAttribute('data-isactive');
|
||||||
var doc_id = params.getAttribute('data-id');
|
var doc_id = params.getAttribute('data-id');
|
||||||
if(status == 1){
|
if(status == 1){
|
||||||
@ -387,6 +415,11 @@
|
|||||||
var is_active= 1;
|
var is_active= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($(params).attr('title') == 'Share'){
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
|
}
|
||||||
|
|
||||||
var formData = {
|
var formData = {
|
||||||
doc_id: doc_id,
|
doc_id: doc_id,
|
||||||
is_active: is_active
|
is_active: is_active
|
||||||
@ -397,11 +430,15 @@
|
|||||||
data: formData,
|
data: formData,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').fadeOut('slow');
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').fadeOut('slow');
|
||||||
// Handle error response here
|
// Handle error response here
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,7 +151,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group text-right">
|
<div class="form-group text-right">
|
||||||
<button class="btn btn-info waves-effect waves-light" type="submit" onclick="submitBranch(this)">Submit</button>
|
<button class="btn btn-info waves-effect waves-light" type="submit" id="client_submit_button" onclick="submitBranch(this)">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
@ -215,6 +215,7 @@
|
|||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$('#client_submit_button').attr('disabled','true')
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@ -145,7 +145,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group text-right m-b-0">
|
<div class="form-group text-right m-b-0">
|
||||||
<button class="btn btn-primary waves-effect waves-light mr-1" type="button">
|
<button class="btn btn-primary waves-effect waves-light mr-1" type="button">
|
||||||
Submit
|
Submit
|
||||||
</button>
|
</button>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -182,7 +182,6 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
var staffData = <?php echo isset($staffData) ? json_encode($staffData) : '0'; ?>;
|
var staffData = <?php echo isset($staffData) ? json_encode($staffData) : '0'; ?>;
|
||||||
var action = staffData ? '<?php echo base_url("staff_edit"); ?>' : '<?php echo base_url("staff_create"); ?>';
|
var action = staffData ? '<?php echo base_url("staff_edit"); ?>' : '<?php echo base_url("staff_create"); ?>';
|
||||||
console.log(action);
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
|||||||
@ -6,37 +6,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4 col-xl-4">
|
|
||||||
<div class="card text-center">
|
|
||||||
<div class="card-body">
|
|
||||||
<h4 class="mt-3 mb-0"><?php echo $staff->name; ?></h4>
|
|
||||||
<p class="text-muted">@<?php echo $staff->role; ?></p>
|
|
||||||
<div class="text-left mt-3" style=" margin-bottom: 16px;">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-borderless table-sm">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Full Name :</th>
|
|
||||||
<td class="text-muted"><?php echo $staff->name; ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Mobile :</th>
|
|
||||||
<td class="text-muted"><?php echo $staff->mobile_no; ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Email :</th>
|
|
||||||
<td class="text-muted"><?php echo $staff->email; ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> <!-- end card -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-lg-8 col-xl-8">
|
<div class="col-lg-12 col-xl-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="tab-pane show active" id="settings">
|
<div class="tab-pane show active" id="settings">
|
||||||
@ -44,28 +16,28 @@
|
|||||||
<h5 class="mb-3 text-uppercase bg-light p-2"><i class="mdi mdi-account-circle mr-1"></i> Personal Info</h5>
|
<h5 class="mb-3 text-uppercase bg-light p-2"><i class="mdi mdi-account-circle mr-1"></i> Personal Info</h5>
|
||||||
<input type="text" class="form-control" id="staff_id" name="staff_id" value="<?php echo $staff->staff_id; ?>" hidden>
|
<input type="text" class="form-control" id="staff_id" name="staff_id" value="<?php echo $staff->staff_id; ?>" hidden>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
<input type="text" class="form-control" id="name" name="name" value="<?php echo $staff->name; ?>">
|
<input type="text" class="form-control" id="name" name="name" value="<?php echo $staff->name; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="mobile_no">Mobile Number</label>
|
<label for="mobile_no">Mobile Number</label>
|
||||||
<input type="text" class="form-control" id="mobile_no" name="mobile_no" value="<?php echo $staff->mobile_no; ?>">
|
<input type="text" class="form-control" id="mobile_no" name="mobile_no" value="<?php echo $staff->mobile_no; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
|
|
||||||
<div class="row">
|
<!-- <div class="row"> -->
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="useremail">Email Address</label>
|
<label for="useremail">Email Address</label>
|
||||||
<input type="email" class="form-control" id="email" name="email" value="<?php echo $staff->email; ?>">
|
<input type="email" class="form-control" id="email" name="email" value="<?php echo $staff->email; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-12">
|
||||||
<div class="form-group" style="margin-top: 28px;">
|
<div class="form-group" style="margin-top: 28px;">
|
||||||
<button type="submit" class="btn btn-primary" style="float: inline-end;" >Update</button>
|
<button type="submit" class="btn btn-primary" style="float: inline-end;" >Update</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user