diff --git a/app/Views/kyc_docs.php b/app/Views/kyc_docs.php index 0ec33c05..6567df7c 100644 --- a/app/Views/kyc_docs.php +++ b/app/Views/kyc_docs.php @@ -324,6 +324,7 @@ $(document).ready(function () { function removeKYCDocs(element) { + var kyc_docs_id_for_reload = $('#kyc_type_id').val(); var id = element.getAttribute('data-id'); var form_action = '= base_url("master/kyc/kycdocs/remove/") ?>' + id; $.ajax({ @@ -338,7 +339,8 @@ $(document).ready(function () { if (res.status == true) { toastr.success('Remove Done!', 'success'); - location.reload(); + // location.reload(); + window.location.href = '= base_url("master/kyc/list/") ?>' + kyc_docs_id_for_reload; } else { toastr.warning('Remove Not Done!', 'warning'); diff --git a/app/Views/policies.php b/app/Views/policies.php index 83560c37..6ae8f361 100644 --- a/app/Views/policies.php +++ b/app/Views/policies.php @@ -340,57 +340,58 @@ $(document).ready(function () { function loadPoliciesList() { var base_url = '= base_url("master/policy/policies/list/"); ?>'; - var insurer_branch_action = base_url + policy_type_PrimaryKey; + var insurer_branch_action = base_url + policy_type_PrimaryKey; - if ($('#policy_type_id').val() != '') { - - $('.loader').fadeIn(); - $('.loader-mask').fadeIn(); - $.ajax({ - url: insurer_branch_action, - type: 'GET', - success: function(response) { + if ($('#policy_type_id').val() != '') { + + $('.loader').fadeIn(); + $('.loader-mask').fadeIn(); + $.ajax({ + url: insurer_branch_action, + type: 'GET', + success: function(response) { - console.log("response", response); + console.log("response", response); - setTimeout(function() { - $('.loader').fadeOut(); - $('.loader-mask').delay(350).fadeOut('slow'); - }, 1000); - var branchTable = ''; - $.each(response.policies, function(index, item) { - console.log(item); - branchTable += ` -