diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 67bbb728..ee3da98d 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -297,7 +297,10 @@ class ClientController extends AdminController $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; diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index b28833e2..973a5d3c 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -499,6 +499,8 @@ class EmployeeRestController extends AdminController $client_id = $this->request->getPost('client_id'); // $client_id = $this->request->getJSON('client_id'); $policy_id = $this->request->getPost('policy_id'); + + $employee_id = $this->request->getPost('employee_id'); // $policy_id = $this->request->getJSON('policy_id'); $client_policy = $this->clientPolicyModel->where('id', $policy_id)->where('client_id', $client_id)->first(); @@ -538,7 +540,7 @@ class EmployeeRestController extends AdminController $extractData['status']= 'success'; $extractData['policy_id']= $policy_id; $extractData['action']= 'enrollment'; - // $extractData['created_by']=set_session_context('Employee'); + $extractData['created_by']=$employee_id; $file_data =$this->fileModel->insert($extractData); @@ -696,6 +698,7 @@ class EmployeeRestController extends AdminController $emp_id =$employee['id']; $id =$emp_id; $data_after_gpa_or_gmc['id'] = $id; + $data_after_gpa_or_gmc['updated_by'] = $employee_id; $data_after_gpa_or_gmc['updated_at'] = $formatted_date_time; $result = $this->employeeModel->save($data_after_gpa_or_gmc); if ($result) { @@ -706,6 +709,7 @@ class EmployeeRestController extends AdminController if ($dataToInsert[$a]['emp_code'] != 0) { $result =false; if (count($data_after_gpa_or_gmc) != 0) { + $data_after_gpa_or_gmc['created_by'] = $employee_id; $result = $this->employeeModel->insert($data_after_gpa_or_gmc); } $emp_id =$result; diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index d2034521..9d562f2b 100644 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -2,7 +2,7 @@ .switch { position: relative; display: inline-block; - width: 60px; + width: 54px; height: 34px; } @@ -181,7 +181,7 @@ input:checked + .slider:before { > - + diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index aab529c9..c788731c 100644 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -23,7 +23,7 @@
- +

@@ -172,6 +172,11 @@ $(document).ready(function () { $('.ac').css('display', 'block'); contactCount = 1 + var addButton = document.getElementById('add'); + if (addButton.style.display === 'none') { + addButton.style.display = 'block'; + } + var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || []; for (var i = 0; i < buttonIds.length; i++) { var firstElement = buttonIds[i].split('_')[0]; @@ -205,12 +210,7 @@ $(document).ready(function () { $('#branch_form')[0].reset(); $('.ac').css('display', 'block'); $('.parsley-errors-list').remove(); - $('#branch_form').parsley().reset(); - - - - contactCount = 1 var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || []; @@ -282,14 +282,14 @@ $(document).ready(function () { var branchTableInsert = '' $.each(res.data, function(index, item) { branchTableInsert += ` - - ${item.branch_name} - ${item.branch_code} - + + ${item.branch_name} + ${item.branch_code} + - - + + `; }); $('#branch_list').append(branchTableInsert); @@ -311,6 +311,22 @@ $(document).ready(function () { $('body').on('click', '.btnBranchEdit', function () { + var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || []; + for (var i = 0; i < buttonIds.length; i++) { + var firstElement = buttonIds[i].split('_')[0]; + console.log(firstElement); + + // Find the element by its ID + var elementToRemove = document.getElementById(firstElement); + console.log(elementToRemove); + + if (elementToRemove) { + console.log(elementToRemove); + elementToRemove.parentNode.removeChild(elementToRemove); + } + localStorage.removeItem('buttonIds') + } + contactCount = 1 $('.loader').fadeIn(); $('.loader-mask').fadeIn(); diff --git a/app/Views/client_kyc.php b/app/Views/client_kyc.php index af301c6c..d842b1f4 100644 --- a/app/Views/client_kyc.php +++ b/app/Views/client_kyc.php @@ -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; } } diff --git a/app/Views/client_onboarding.php b/app/Views/client_onboarding.php index 116003ea..668cbb35 100644 --- a/app/Views/client_onboarding.php +++ b/app/Views/client_onboarding.php @@ -132,7 +132,9 @@ body { $('#btnBranchAdd').hide(); toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000}); }else{ - $('#btnBranchAdd').show(); + if ($('#btnBranchBack')[0].style.display == 'none') { + $('#btnBranchAdd').show(); + } } } @@ -158,7 +160,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 +175,9 @@ body { $('#btnBranchAdd').hide(); toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000}); }else{ - $('#btnBranchAdd').show(); + if ($('#btnBranchBack')[0].style.display == 'none') { + $('#btnBranchAdd').show(); + } } } diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 187a8ea1..9018586c 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -28,7 +28,7 @@
- +

@@ -90,7 +90,7 @@ > - +
diff --git a/app/Views/client_rm.php b/app/Views/client_rm.php index 2cbc2be6..539a0c8f 100644 --- a/app/Views/client_rm.php +++ b/app/Views/client_rm.php @@ -82,6 +82,7 @@ $(document).ready(function(){ var data = ; 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'); + } diff --git a/app/Views/insurer_branch.php b/app/Views/insurer_branch.php index e2739700..dd2e5a6f 100644 --- a/app/Views/insurer_branch.php +++ b/app/Views/insurer_branch.php @@ -23,7 +23,7 @@
- +

@@ -132,71 +132,7 @@ insurer_Branch_PrimaryKey = $('#insurer_id_branch').val(); $('#add_branch').hide(); - $('.btnBack').hide(); - - - $('#btnBranchAdd').click(function(){ - - insurer_branch_form_action = ''; - - $('#add_branch').show(); - $('#branch_table').hide(); - $('.btnBack').show(); - $('#btnBranchAdd').hide(); - - $('#branch_name').val(''); - $('#branch_code').val(''); - $('#state').val(''); - $('#district').val(''); - $('#branch_city').val(''); - - $('#name').val(''); - $('#email').val(''); - $('#mobile').val(''); - $('#designation').val(''); - - - contactCount = 1 - - - var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || []; - for (var i = 0; i < buttonIds.length; i++) { - var firstElement = buttonIds[i].split('_')[0]; - console.log(firstElement); - - // Find the element by its ID - var elementToRemove = document.getElementById(firstElement); - console.log(elementToRemove); - - if (elementToRemove) { - console.log(elementToRemove); - elementToRemove.parentNode.removeChild(elementToRemove); - } - localStorage.removeItem('buttonIds') - } - }) - - $('.btnBack').click(function(){ - - $('#add_branch').hide(); - $('#branch_table').show(); - $('.btnBack').hide(); - $('#btnBranchAdd').show(); - - $('#branch_name').val(''); - $('#branch_code').val(''); - $('#state').val(''); - $('#district').val(''); - $('#branch_city').val(''); - - $('#name').val(''); - $('#email').val(''); - $('#mobile').val(''); - $('#designation').val(''); - - - }) - + $('.btnBack').hide(); if(insurer_Branch_PrimaryKey !== ''){ @@ -204,12 +140,12 @@ var data = ; $.each(data, function(index, item) { branchTable += ` - + ${item.branch_name} ${item.branch_code} - - + + `; @@ -220,6 +156,73 @@ }); + $('#btnBranchAdd').click(function(){ + + $("#insurer_branch_form")[0].reset(); + contactCount = 1 + insurer_branch_form_action = ''; + $('#add_branch').show(); + $('#branch_table').hide(); + $('.btnBack').show(); + $('#btnBranchAdd').hide(); + + $('#branch_name').val(''); + $('#branch_code').val(''); + $('#state').val(''); + $('#district').val(''); + $('#branch_city').val(''); + + $('#name').val(''); + $('#email').val(''); + $('#mobile').val(''); + $('#designation').val(''); + contactCount = 1 + + var addButton = document.getElementById('add'); + if (addButton.style.display === 'none') { + addButton.style.display = 'block'; + } + + var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || []; + for (var i = 0; i < buttonIds.length; i++) { + var firstElement = buttonIds[i].split('_')[0]; + console.log(firstElement); + + // Find the element by its ID + var elementToRemove = document.getElementById(firstElement); + console.log(elementToRemove); + + if (elementToRemove) { + console.log(elementToRemove); + elementToRemove.parentNode.removeChild(elementToRemove); + } + localStorage.removeItem('buttonIds') + } + }) + + $('.btnBack').click(function(){ + + $("#insurer_branch_form")[0].reset(); + contactCount = 1 + $('#add_branch').hide(); + $('#branch_table').show(); + $('.btnBack').hide(); + $('#btnBranchAdd').show(); + + $('#branch_name').val(''); + $('#branch_code').val(''); + $('#state').val(''); + $('#district').val(''); + $('#branch_city').val(''); + + $('#name').val(''); + $('#email').val(''); + $('#mobile').val(''); + $('#designation').val(''); + + }) + + $("#insurer_branch_form").submit(function(events) { console.log(1, insurer_branch_form_action); events.preventDefault(); @@ -238,6 +241,7 @@ processData: false, contentType: false, success: function(res) { + $("#insurer_branch_form")[0].reset(); setTimeout(function() { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); @@ -254,7 +258,6 @@ - `; }); @@ -284,7 +287,7 @@ $('body').on('click', '.btnBranchEdit', function () { $('#container').html(""); - contactCount =1; + contactCount = 1; var branch_id = $(this).attr('data-id'); $('#insurer_Branch_PrimaryKey').val(branch_id); @@ -469,8 +472,6 @@ } - - function removeInsurerBranch(element) { var id = element.getAttribute('data-id'); var form_action = '' + id; diff --git a/app/Views/insurer_onboarding.php b/app/Views/insurer_onboarding.php index 53c2f080..f7520d25 100644 --- a/app/Views/insurer_onboarding.php +++ b/app/Views/insurer_onboarding.php @@ -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(); + } } } diff --git a/app/Views/kyc_docs.php b/app/Views/kyc_docs.php index d27ae100..0ec33c05 100644 --- a/app/Views/kyc_docs.php +++ b/app/Views/kyc_docs.php @@ -22,7 +22,7 @@
- +

diff --git a/app/Views/kyc_onboarding.php b/app/Views/kyc_onboarding.php index 531f86e7..0db36ce1 100644 --- a/app/Views/kyc_onboarding.php +++ b/app/Views/kyc_onboarding.php @@ -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(); + } } } diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index af40c828..e3998fbe 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -554,6 +554,9 @@
  • Upload +
  • +
  • + Endorsement List
  • diff --git a/app/Views/policies.php b/app/Views/policies.php index 59a7eba9..83560c37 100644 --- a/app/Views/policies.php +++ b/app/Views/policies.php @@ -23,7 +23,7 @@
    - +

    diff --git a/app/Views/policy_gmc_terms.php b/app/Views/policy_gmc_terms.php index 25f21abe..0f556978 100644 --- a/app/Views/policy_gmc_terms.php +++ b/app/Views/policy_gmc_terms.php @@ -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) { diff --git a/app/Views/policy_gpa_terms.php b/app/Views/policy_gpa_terms.php index c448e10e..9797867c 100644 --- a/app/Views/policy_gpa_terms.php +++ b/app/Views/policy_gpa_terms.php @@ -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(''); + }); diff --git a/app/Views/policy_type_onboarding.php b/app/Views/policy_type_onboarding.php index 4d6d9c39..f1c3075d 100644 --- a/app/Views/policy_type_onboarding.php +++ b/app/Views/policy_type_onboarding.php @@ -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(); + } } } diff --git a/app/Views/tpa_basic_info.php b/app/Views/tpa_basic_info.php index 86db92e2..32487206 100644 --- a/app/Views/tpa_basic_info.php +++ b/app/Views/tpa_basic_info.php @@ -9,10 +9,8 @@
    - - + +
    diff --git a/app/Views/tpa_branch.php b/app/Views/tpa_branch.php index f098fe6c..1015d36e 100644 --- a/app/Views/tpa_branch.php +++ b/app/Views/tpa_branch.php @@ -23,7 +23,7 @@
    - +

    @@ -153,7 +153,10 @@ $(document).ready(function () { $('#mobile').val(''); $('#designation').val(''); - + var addButton = document.getElementById('add'); + if (addButton.style.display === 'none') { + addButton.style.display = 'block'; + } contactCount = 1 @@ -407,7 +410,7 @@ var html = `
    - +
    diff --git a/app/Views/tpa_onboarding.php b/app/Views/tpa_onboarding.php index ce73876c..1e14dabe 100644 --- a/app/Views/tpa_onboarding.php +++ b/app/Views/tpa_onboarding.php @@ -70,13 +70,15 @@ body {