MERGE_CLIENT_ISSUES

This commit is contained in:
velz 2024-03-30 10:56:56 +05:30
commit 8155f7df5c
28 changed files with 159 additions and 88 deletions

View File

@ -1,5 +1,5 @@
---
deployment:
tasks:
- export DEPLOYPATH=home3/venbaehn/public_html/nhance/devauto/
- /bin/cp -R * $DEPLOYPATH
- export DEPLOYPATH=home/venbaehn/public_html/nhance/devauto
- /bin/cp /home/venbaehn/repositories/nhance_dev/* $DEPLOYPATH -r

View File

@ -294,17 +294,19 @@ class ClientController extends AdminController
// print_r($this->request->getFile('client_logo'));die;
$file_name = file_Upload($this->request->getFile('client_logo'), $uploadFilePath);
$id = $this->request->getPost('PrimaryKey');
$data = $this->request->getPost();
$data['updated_by'] = get_session_userid();
$data['client_logo'] = $file_name;
if(!empty($file_name)){
$data['client_logo'] = $file_name;
}
if (!isset($data['is_download_btn'])) {
$data['is_download_btn'] = 0;
} elseif ($data['is_download_btn']) {
$data['is_download_btn'] = 1;
}
// print_r($data);die;
$update = $this->clientModel->update($id,$data);

View File

@ -680,7 +680,7 @@ class MasterController extends AdminController
$insert = $this->kycDocsModel->insert($data);
if($insert){
$kycDocsData = $this->kycDocsModel->where('kyc_type_id', $data['kyc_type_id'])->findAll();
$kycDocsData = $this->kycDocsModel->where('kyc_type_id', $data['kyc_type_id'])->where('is_active',1)->findAll();
echo json_encode(array("status" => true , 'data' => $kycDocsData));
}else{
echo json_encode(array("status" => false));
@ -715,8 +715,7 @@ class MasterController extends AdminController
$this->myLogger->logme('error','Edit KYC Docs Onboarding function called');
// print_r("id");
// print_r($id);die;
$editData['kyc_docs'] = $this->kycDocsModel->where(['kyc_type_id' => $id, 'is_active' => 1])->findAll();
// Return JSON response
@ -862,7 +861,12 @@ class MasterController extends AdminController
$data['created_by'] = get_session_userid();
$insert = $this->policesModel->insert($data);
if($insert){
$policiesData = $this->policesModel->where('policy_type_id', $this->request->getPost('policy_type_id'))->findAll();
$policiesData = $this->policesModel->select('policies.*, insurers.name as insurer_name')
->join('insurers', 'insurers.id = policies.insurer_id')
->where('policies.policy_type_id', $this->request->getPost('policy_type_id'))
->where('policies.is_active', 1)
->findAll();
// $policiesData = $this->policesModel->where('policy_type_id', $this->request->getPost('policy_type_id'))->findAll();
echo json_encode(array("status" => true , 'data' => $policiesData));
}else{
echo json_encode(array("status" => false));
@ -896,7 +900,12 @@ class MasterController extends AdminController
$headerData['page_name'] = 'Edit Policy Type';
$editData['policytype'] = $this->policyTypeModel->where(['id' => $id, 'is_active' => 1])->first();
$editData['policies'] = $this->policesModel->where(['policy_type_id' => $id, 'is_active' => 1])->findAll();
$editData['policies'] = $this->policesModel->select('policies.*, insurers.name as insurer_name')
->join('insurers', 'insurers.id = policies.insurer_id')
->where('policies.policy_type_id', $id)
->where('policies.is_active', 1)
->findAll();
// $editData['policies'] = $this->policesModel->where(['policy_type_id' => $id, 'is_active' => 1])->findAll();
$editData['insurer'] = $this->insurerModel-> findAll();
echo view('layout/header', $headerData);
echo view('policy_type_onboarding', $editData);
@ -933,6 +942,7 @@ class MasterController extends AdminController
// Retrieve the insurer information
$insurer = $this->insurerModel->find($policy['insurer_id']);
// print_r($insurer);die;
// Add the insurer information to the editData array
if ($insurer) {
$editData['policies'][$policy['id']] = [

View File

@ -56,9 +56,6 @@ class ClientModel extends Model
return $this->db->table('clients')
->select('clients.*')
->select('user_profiles.first_name as user_name')
->join('user_profiles', 'user_profiles.id = clients.created_by')
->where('clients.is_active', 1)
->get()
->getResult();

View File

@ -2,7 +2,7 @@
.switch {
position: relative;
display: inline-block;
width: 60px;
width: 54px;
height: 34px;
}
@ -181,7 +181,7 @@ input:checked + .slider:before {
<input id="is_download_btn" type="checkbox" name="is_download_btn" <?= (isset($client['is_download_btn']) && $client['is_download_btn'] == 1) ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="is_download_btn">Enable Client Export Option</label>
<label for="is_download_btn" style=" position: relative;bottom: 5px;">Enable Client Export Option</label>
</div>
@ -254,6 +254,7 @@ input:checked + .slider:before {
var OptionsHTML1 = ''
$.ajax({
data:formData,
url: form_action,
type: "POST",
dataType: 'json',

View File

@ -23,7 +23,7 @@
<div class="col-12">
<div class="card-body">
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
<button type="button" id="btnBranchBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
</div>
<hr>

View File

@ -9,6 +9,9 @@
<?php echo $clientName[0]['client_name'];?></h4>
</div>
<div class="col-6" style="text-align: right;">
<a href="<?= base_url("client/list"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i></a>
</div>
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
<a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
</div> -->

View File

@ -129,7 +129,7 @@
var fileExtension = fileName.split('.').pop().toLowerCase();
if (allowedExtensions.indexOf(fileExtension) === -1) {
form.trigger('reset')
toastr.warning('File type not allowed: ' + fileName, 'Warning');
toastr.warning('File type not allowed: ' + fileName, 'Only Allowed pdf, png, jpg and jpeg');
return;
}
}

View File

@ -66,31 +66,35 @@ table.dataTable tbody td {
</div>
<!-- end row -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> -->
<!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> -->
<!-- Include DataTables JS -->
<!-- <script src="https://cdn.datatables.net/1.11.6/js/jquery.dataTables.min.js"></script> -->
<script>
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" ,
buttons: [
{
extend: 'csv',
text: 'CSV',
title: 'ClientList',
className: 'my_class',
exportOptions: {
columns: ':not(:last-child)'
},
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'ClientList',
className: 'my_class',
exportOptions: {
columns: ':not(:last-child)'
},
});
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true ,
// pagingType: 'full_numbers'
});
})

View File

@ -158,7 +158,9 @@ body {
$('#BtnAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
$('#BtnAdd').show();
if ($('#btnPolicyBack')[0].style.display == 'none') {
$('#BtnAdd').show();
}
}
}
@ -171,7 +173,9 @@ body {
$('#btnBranchAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
$('#btnBranchAdd').show();
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
}
}

View File

@ -5,9 +5,9 @@
<button type="button" id="BtnAdd" class="btn btn-primary waves-effect waves-light btnAdd btn-sm"><span class="fa fa-plus-square" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy</button>
</div>
<div class="table-responsive" id="table_list" style="height:200px">
<div class="table-responsive" id="table_list">
<table class="table table-borderless table-nowrap mb-0">
<table class="table table-borderless table-nowrap mb-0" id="table-client-policy">
<thead class="thead-light">
<tr>
<th>Insurer</th>
@ -28,7 +28,7 @@
<div class="card-body">
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" class="btn btn-primary waves-effect waves-light btn-sm btnBack btn-sm"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
<button type="button" id="btnPolicyBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack btn-sm"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
</div>
<hr>
@ -90,7 +90,7 @@
<input id="is_addon" type="checkbox" name="is_addon" <?= (isset($client['is_addon']) && $client['is_addon'] == 1) ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="is_addon">Is AddOn Policy</label>
<label for="is_addon" style=" position: relative;bottom: 5px;">Is AddOn Policy</label>
</div>
</div>
@ -222,6 +222,12 @@
}
$('#table-client-policy').DataTable({
paging: true ,
searching: false
});
});
/******** for form submit using AJAX *******/

View File

@ -82,6 +82,7 @@ $(document).ready(function(){
var data = <?= isset($client_relation) ? json_encode($client_relation) : '[]' ?>;
if (relation_PrimaryKey !== '') {
console.log('test case k212')
$('#client_rm_edit').show()
$('#client_rm_btnSubmit').hide();
$.each(data, function(index, item) {
@ -91,14 +92,13 @@ $(document).ready(function(){
if ($option.length > 0) {
$option.prop('selected', true);
}
$('#account_manager').multiselect('refresh');
$('#head').prop('disabled', true);
$('#manager').prop('disabled', true);
$('#account_manager').multiselect('disable');
});
$('#account_manager').multiselect('refresh');
$('#head').prop('disabled', true);
$('#manager').prop('disabled', true);
$('#account_manager').multiselect('disable');
}

View File

@ -23,7 +23,7 @@
<div class="col-12">
<div class="card-body">
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
<button type="button" id="btnBranchBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
</div>
<hr>

View File

@ -50,7 +50,9 @@
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" ,
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
extend: 'csv',
@ -67,7 +69,7 @@
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true ,
});
})

View File

@ -79,7 +79,9 @@ body {
$('#btnBranchAdd').hide();
toastr.warning('First Add the Insurer!', 'warning',{timeOut: 2000});
}else{
$('#btnBranchAdd').show();
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
}
}

View File

@ -6,7 +6,7 @@
<div class="table-responsive" id="branch_table" >
<table class="table table-borderless table-nowrap mb-0">
<table class="table table-borderless table-nowrap mb-0" id="table-kyc-docs">
<thead class="thead-light">
<tr>
<th>File Name</th>
@ -22,7 +22,7 @@
<div class="col-12">
<div class="card-body">
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
<button type="button" id="btnBranchBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
</div>
<hr>
@ -249,10 +249,12 @@ $(document).ready(function () {
$('body').on('click', '#btnSubmit', function() {
$('#kyc_docs_list').html(" ");
$('#kyc_docs_list').html("");
console.log($('#kyc_docs_list')[0]);
setTimeout(function() {
loadKYCDocsList();
}, 100) });
console.log("hjknjkhiulhjulihj----------------------");
// loadKYCDocsList();
}, 1000) });
function loadKYCDocsList() {
var base_url = '<?= base_url("master/kyc/kycdocs/list/"); ?>';
@ -292,6 +294,7 @@ $(document).ready(function () {
</tr>
`;
});
console.log($('#kyc_docs_list')[0]);
$('#kyc_docs_list').append(insurerBranchTableInsert);
},
error: function (xhr, status, error) {
@ -307,6 +310,14 @@ $(document).ready(function () {
});
}
}
setTimeout(() => {
$('#table-kyc-docs').DataTable({
paging: true ,
searching: false
});
}, 2000);
});

View File

@ -48,7 +48,9 @@
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" ,
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
extend: 'csv',
@ -65,7 +67,7 @@
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true ,
});
})

View File

@ -77,7 +77,9 @@ body {
$('#btnBranchAdd').hide();
toastr.warning('First Add the KYC Entity Type!', 'warning',{timeOut: 2000});
}else{
$('#btnBranchAdd').show();
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
}
}

View File

@ -6,7 +6,7 @@
<div class="table-responsive" id="branch_table" >
<table class="table table-borderless table-nowrap mb-0">
<table class="table table-borderless table-nowrap mb-0" id="table-policies">
<thead class="thead-light">
<tr>
<th>Insurer</th>
@ -23,7 +23,7 @@
<div class="col-12">
<div class="card-body">
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
<button type="button" id="btnBranchBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
</div>
<hr>
@ -81,7 +81,12 @@ $(document).ready(function () {
loadPoliciesList();
setTimeout(() => {
$('#table-policies').DataTable({
paging: true ,
searching: false
});
}, 2000);
// var insurer_branch_action = '<?= base_url("master/insurer/list/"); ?>';
// if ($('#policy_type_id').val() != '') {
@ -183,9 +188,10 @@ $(document).ready(function () {
var branchTable = '';
var data = <?= isset($policies) ? json_encode($policies) : '[]' ?>;
$.each(data, function(index, item) {
branchTable += `
<tr>
<td>${item.insurer_id}</td>
<td>${item.insurer_name}</td>
<td>${item.name}</td>
<td>
<a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
@ -229,7 +235,7 @@ $(document).ready(function () {
$.each(res.data, function(index, item) {
tpaBranchTableInsert += `
<tr>
<td>${item.insurer_id}</td>
<td>${item.insurer_name}</td>
<td>${item.name}</td>
<td>
<a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
@ -241,6 +247,8 @@ $(document).ready(function () {
$('#policies_list').append(tpaBranchTableInsert);
// $('#policies_list').html("");
// loadPoliciesList();
$('#add_branch').hide();
$('#branch_table').show();
$('.btnBack').hide();

View File

@ -596,7 +596,8 @@ var grid_html = '';
processData: false,
contentType: false,
success: function(res) {
$('#policyJsonForm')[0].reset();
$('.text-danger-2').html('');
if (res.status === false) {
toastr.error('Policy Dose Not Create', 'Error');
return;
@ -871,6 +872,9 @@ var grid_html = '';
$('#police-tab').css('display', '');
$('.nav.nav-pills.navtab-bg').css('display','');
$('.nav.nav-pills.navtab-bg').prev().css('display','');
$('#policyJsonForm')[0].reset();
$('.text-danger-2').html('');
});
// function formatNumber(input) {

View File

@ -52,14 +52,6 @@
.jodit-status-bar{
display:none;
}
.jodit-container{
/* width: 690px !important; */
/* margin-top: 3px; */
/* margin-bottom: 3px; */
/* margin-left: 30px; */
/* height: 0px !important; */
/* min-height: 100px !important; */
}
.input-group {
width: 64.5% !important;
}
@ -409,7 +401,8 @@
processData: false,
contentType: false,
success: function(res) {
$('#policyGPATerms')[0].reset();
$('.text-danger-2').html('');
console.log(res);
if (res.status === false) {
@ -569,6 +562,9 @@
$('#police-tab').css('display', '');
$('.nav.nav-pills.navtab-bg').css('display','');
$('.nav.nav-pills.navtab-bg').prev().css('display','');
$('#policyGPATerms')[0].reset();
$('.text-danger-2').html('');
});

View File

@ -54,7 +54,9 @@
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" ,
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
extend: 'csv',
@ -71,7 +73,7 @@
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true ,
});
})

View File

@ -76,7 +76,9 @@ body {
$('#btnBranchAdd').hide();
toastr.warning('First Add the Policy Type!', 'warning',{timeOut: 2000});
}else{
$('#btnBranchAdd').show();
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
}
}

View File

@ -9,10 +9,8 @@
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-4">
<label for="tpa_name">TPA Name<span
class="text-danger">*</span></label>
<input type="text" class="form-control" id="name"
placeholder="Enter TPA Name" value="<?= isset($tpa['name']) ? $tpa['name'] : '' ?>" name="name" required>
<label for="tpa_name">TPA Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="tpa_name" placeholder="Enter TPA Name" value="<?= isset($tpa['name']) ? $tpa['name'] : '' ?>" name="name" required>
</div>
<div class="form-group col-md-4">
<label for="short_name">TPA Short Name<span class="text-danger">*</span></label>

View File

@ -23,7 +23,7 @@
<div class="col-12">
<div class="card-body">
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
<button type="button" id="btnBranchBack" class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="fa fa-list" aria-hidden="true" style="padding: 5px 10px;"></span>Back To List</button>
</div>
<hr>

View File

@ -48,7 +48,9 @@
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" ,
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
extend: 'csv',
@ -65,7 +67,7 @@
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true ,
});
})

View File

@ -70,13 +70,15 @@ body {
<script>
function tpa_branch_contact() {
var check_tpa_id = $('#tpa_General_PrimaryKey');
if(check_tpa_id[0].value == '' || check_tpa_id[0].value == null || check_tpa_id[0].value == 0){
$('#btnBranchAdd').hide();
toastr.warning('First Add the TPA!', 'warning',{timeOut: 2000});
}else{
$('#btnBranchAdd').show();
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
}
}

View File

@ -2,7 +2,9 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="text-center">
<div class="row">
<div class="col-md-6 col-xl-5">
@ -19,6 +21,8 @@
</div>
</div>
</div>
<div class="row mt-3 text-center">
@ -72,10 +76,17 @@
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12" style="text-align: right;">
<a href="<?= base_url("client/deposit/$clientData->id"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i></a>
</div>
</div>
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 class="header-title" style="position: relative;">Transaction Details</h4>
</div>
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
data-toggle="modal" data-target="#addTransactionModal">New</button>