diff --git a/.cpanel.yml b/.cpanel.yml index 944de66e..b33925c0 100644 --- a/.cpanel.yml +++ b/.cpanel.yml @@ -1,5 +1,5 @@ --- deployment: tasks: - - export DEPLOYPATH=/home/example/public_html/ + - export DEPLOYPATH=home3/venbaehn/public_html/nhance/devauto/ - /bin/cp . $DEPLOYPATH \ No newline at end of file diff --git a/app/Config/Routes.php b/app/Config/Routes.php index e2cb0a26..5c613da1 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -39,6 +39,7 @@ $routes->group("/client", ["filter" => "authMVC"], function($routes){ $routes->get("list", "ClientController::index"); $routes->get("create", "ClientController::clientOnboarding"); $routes->get('deposit/(:num)', 'ClientController::deposit/$1'); + $routes->get('remove/(:num)', 'ClientController::removeClient/$1'); // application/config/routes.php // Add a route for the view_Deposit method @@ -58,7 +59,6 @@ $routes->post('save_deposit', 'ClientController::saveDeposit'); $routes->get("list/(:any)", "ClientController::editClientOnboarding/$1"); - $routes->get("remove/(:any)", "ClientController::removeClientOnboarding/$1"); $routes->group("general", ["filter" => "authMVC"], function($routes){ @@ -70,6 +70,7 @@ $routes->post('save_deposit', 'ClientController::saveDeposit'); $routes->post("create", "ClientController::createClientBranch"); $routes->post("edit", "ClientController::editClientBranch"); $routes->get("list/(:any)", "ClientController::getSingleBranchDataById/$1"); + $routes->get("remove/(:any)", "ClientController::removeClientBranch/$1"); }); $routes->group("relation", ["filter" => "authMVC"], function($routes){ @@ -132,6 +133,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->post("edit", "MasterController::editInsurerBranch"); $routes->get("editget/(:any)", "MasterController::editInsurerGet/$1"); $routes->get("list/(:any)", "MasterController::insurerBranchList/$1"); + $routes->get("remove/(:any)", "MasterController::removeInsurerBranch/$1"); }); }); @@ -142,12 +144,14 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->post("createpost", "MasterController::createTPAGeneralInfo"); $routes->post("edit", "MasterController::editTPAGeneralInfo"); $routes->get("list/(:any)", "MasterController::editTPAOnboarding/$1"); + $routes->get("remove/(:any)", "MasterController::tpaRemove/$1"); $routes->group("branch", ["filter" => "authMVC"], function($routes){ $routes->post("create", "MasterController::createTPABranch"); $routes->get("editget/(:any)", "MasterController::editTPAGet/$1"); $routes->post("edit", "MasterController::editTPABranch"); $routes->get("list/(:any)", "MasterController::tpaBranchList/$1"); + $routes->get("remove/(:any)", "MasterController::removeTPABranch/$1"); }); }); @@ -157,6 +161,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->post("createpost", "MasterController::createKYCInfo"); $routes->post("edit", "MasterController::editKYCInfo"); $routes->get("list/(:any)", "MasterController::editKYCOnboarding/$1"); + $routes->get("remove/(:any)", "MasterController::kycRemove/$1"); $routes->get("delete/(:any)", "MasterController::deleteClientKycDocs/$1"); @@ -166,6 +171,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->post("edit", "MasterController::editKYCDocs"); // $routes->get("list", "MasterController::tpaBranchList"); $routes->get("list/(:any)", "MasterController::kycDocsList/$1"); + $routes->get("remove/(:any)", "MasterController::removeKYCDocs/$1"); }); }); @@ -176,6 +182,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->post("createpost", "MasterController::createPolicyType"); $routes->post("edit", "MasterController::editPolicyType"); $routes->get("list/(:any)", "MasterController::editPolicyTypeOnboarding/$1"); + $routes->get("remove/(:any)", "MasterController::policyTypeRemove/$1"); $routes->group("policies", ["filter" => "authMVC"], function($routes){ @@ -184,6 +191,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->post("edit", "MasterController::editPolicies"); $routes->get("list", "MasterController::tpaBranchList"); $routes->get("list/(:any)", "MasterController::policesList/$1"); + $routes->get("remove/(:any)", "MasterController::removePolicyPolicies/$1"); }); }); diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index e96d1057..0511b7d5 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -103,27 +103,36 @@ class ClientController extends AdminController } - public function removeClientOnboarding($id = null) -{ - $this->myLogger->logme('error', 'Edit Client Onboarding function called'); - $headerData['page_name'] = 'Edit Client Onboarding'; - - $this->clientModel->update($id, ['is_active' => 0]); - - // $this->clientBranchModel->where('client_id', $id)->update(['is_active' => 0]); - // $this->clientRMModel->where('client_id', $id)->update(['is_active' => 0]); - - - $data['clientList'] = $this->clientModel->getCreatedByUserName(); - $data['client_rm'] = $this->clientRMModel->getAllClientRM(); - - echo view('layout/header', $headerData); - echo view('client_list', $data); - echo view('layout/footer'); -} + public function removeClient($id = null) + { + $this->myLogger->logme('error','Client Remove function called'); + // $data = $this->request->getPost(); + $data['updated_by'] = get_session_userid(); + $data['is_active'] = 0; + $update = $this->clientModel->update($id,$data); + if($update){ + return $this->respond(['status' => true,'code' => 200], 200); + }else{ + return $this->respond(['status' => false,'code' => 404], 200); + } + } + public function removeClientBranch($id = null) + { + $this->myLogger->logme('error','Client Branch Remove function called'); + // $id = $this->request->getPost('PrimaryKey'); + // $data = $this->request->getPost(); + $data['updated_by'] = get_session_userid(); + $data['is_active'] = 0; + $update = $this->clientBranchModel->update($id,$data); + if($update){ + return $this->respond(['status' => true,'code' => 200], 200); + }else{ + return $this->respond(['status' => false,'code' => 404], 200); + } + } public function clientOnboarding() { diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 33222923..b28833e2 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -553,12 +553,12 @@ class EmployeeRestController extends AdminController } if (count($check_miss_match) > 0) { - return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Column Name's are miss Match's!", 'data'=> $check_miss_match], 404); + return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Column Name's are miss Match's!", 'data'=> $check_miss_match], 200); } } if(count($data[0]) != 10){ - return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Uploaded file row count is Not Match!" ], 404); + return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Uploaded file row count is Not Match!" ], 200); } //this change the column name into index number @@ -593,7 +593,7 @@ class EmployeeRestController extends AdminController } if (count($new_array) > 0) { $count =count($new_array); - return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "$count Employee Sum Insured is Not Match.. " , 'data' => $new_array], 404); + return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "$count Employee Sum Insured is Not Match.. " , 'data' => $new_array], 200); } } foreach ($extra['0'] as $index => $id) { diff --git a/app/Controllers/LoginController.php b/app/Controllers/LoginController.php index 1d646d01..4e677e88 100644 --- a/app/Controllers/LoginController.php +++ b/app/Controllers/LoginController.php @@ -15,8 +15,8 @@ class LoginController extends BaseController public function index(){ - $session_data = ['isLoggedIn' => True ,'userid' => '25']; - set_session_data($session_data); + //$session_data = ['isLoggedIn' => True ,'userid' => '25']; + //set_session_data($session_data); // $isLoggedIn = check_session(); $isLoggedIn = check_session(); diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index 36f4976a..b4e37e53 100644 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -73,7 +73,7 @@ class MasterController extends AdminController { $this->myLogger->logme('error','Insurer list function called'); $headerData['page_name'] = 'Insurer List'; - $data['insurerList'] = $this->insurerModel->findAll(); + $data['insurerList'] = $this->insurerModel->where('is_active',1)->findAll(); $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM(); // echo '
';
         // print_r($data['insurerList']); die;
@@ -89,27 +89,36 @@ class MasterController extends AdminController
     {   
         $this->myLogger->logme('error','Insurer Remove function called');
         // $id                 = $this->request->getPost('PrimaryKey');
-        $data               = $this->request->getPost();
+        // $data               = $this->request->getPost();
         $data['updated_by'] = get_session_userid();
         $data['is_active'] = 0;
         $update             = $this->insurerModel->update($id,$data);
         if($update){
-            echo "";
-            // echo json_encode(array("status" => true , 'data' => $data));
-            // exit();
+            return $this->respond(['status' => true,'code' => 200], 200);
         }else{
-            echo "";
-            // toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
-
-            // echo json_encode(array("status" => false));
-            // exit();
+            return $this->respond(['status' => false,'code' => 404], 200);
         }
     }
 
+
+    public function removeInsurerBranch($id = null)
+    {   
+        $this->myLogger->logme('error','Insurer Branch Remove function called');
+        // $id                 = $this->request->getPost('PrimaryKey');
+        // $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $data['is_active'] = 0;
+        $update             = $this->insurerBranchModel->update($id,$data);
+        if($update){
+            return $this->respond(['status' => true,'code' => 200], 200);
+        }else{
+            return $this->respond(['status' => false,'code' => 404], 200);
+        }
+    }
+
+
+
+
     public function editInsurerOnboarding($id = null)
     {
 
@@ -315,7 +324,7 @@ class MasterController extends AdminController
     {   
         $this->myLogger->logme('error','TPA list function called');
         $headerData['page_name'] = 'TPA List';
-        $data['tpaList'] = $this->tpaModel->findAll();
+        $data['tpaList'] = $this->tpaModel->where('is_active',1)->findAll();
         // $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
         // echo '
';
         // print_r($data['insurerList']); die;
@@ -328,8 +337,37 @@ class MasterController extends AdminController
     }
     
 
+    public function tpaRemove($id = null)
+    {   
+        $this->myLogger->logme('error','TPA Remove function called');
+        $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $data['is_active'] = 0;
+        $update             = $this->tpaModel->update($id,$data);
+        if($update){
+            return $this->respond(['status' => true,'code' => 200], 200);
+        }else{
+            return $this->respond(['status' => false,'code' => 404], 200);
+        }
+    }
 
 
+    
+    public function removeTPABranch($id = null)
+    {   
+        $this->myLogger->logme('error','TPA Branch Remove function called');
+        // $id                 = $this->request->getPost('PrimaryKey');
+        // $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $data['is_active'] = 0;
+        $update             = $this->tpaBranchModel->update($id,$data);
+        if($update){
+            return $this->respond(['status' => true,'code' => 200], 200);
+        }else{
+            return $this->respond(['status' => false,'code' => 404], 200);
+        }
+    }
+
     public function tpaOnboarding()
     {
         
@@ -536,7 +574,7 @@ class MasterController extends AdminController
     {   
         $this->myLogger->logme('error','KYC list function called');
         $headerData['page_name'] = 'KYC List';
-        $data['kycList'] = $this->kycEntityTypeModel->findAll();
+        $data['kycList'] = $this->kycEntityTypeModel->where('is_active',1)->findAll();
         // $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
         // echo '
';
         // print_r($data['insurerList']); die;
@@ -548,9 +586,36 @@ class MasterController extends AdminController
         // $this->loadLayout('insurer_onboarding', $data);
     }
 
-    
+    public function kycRemove($id = null)
+    {   
+        $this->myLogger->logme('error','KYC Remove function called');
+        // $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $data['is_active'] = 0;
+        $update             = $this->kycEntityTypeModel->update($id,$data);
+        if($update){
+            return $this->respond(['status' => true,'code' => 200], 200);
+        }else{
+            return $this->respond(['status' => false,'code' => 404], 200);
+        }
+    }
 
 
+    public function removeKYCDocs($id = null)
+    {   
+        $this->myLogger->logme('error','KYC Docs Remove function called');
+        // $id                 = $this->request->getPost('PrimaryKey');
+        // $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $data['is_active'] = 0;
+        $update             = $this->kycDocsModel->update($id,$data);
+        if($update){
+            return $this->respond(['status' => true,'code' => 200], 200);
+        }else{
+            return $this->respond(['status' => false,'code' => 404], 200);
+        }
+    }
+
     public function kycOnboarding()
     {
         
@@ -718,7 +783,7 @@ class MasterController extends AdminController
     {   
         $this->myLogger->logme('error','Policy Type list function called');
         $headerData['page_name'] = 'Policy Type List';
-        $data['policyList'] = $this->policyTypeModel->findAll();
+        $data['policyList'] = $this->policyTypeModel->where('is_active',1)->findAll();
         // $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
         // echo '
';
         // print_r($data['insurerList']); die;
@@ -730,7 +795,35 @@ class MasterController extends AdminController
         // $this->loadLayout('insurer_onboarding', $data);
     }
 
+
+    public function policyTypeRemove($id = null)
+    {   
+        $this->myLogger->logme('error','Policy Type Remove function called');
+        // $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $data['is_active'] = 0;
+        $update             = $this->policyTypeModel->update($id,$data);
+        if($update){
+            return $this->respond(['status' => true,'code' => 200], 200);
+        }else{
+            return $this->respond(['status' => false,'code' => 404], 200);
+        }
+    }
     
+    public function removePolicyPolicies($id = null)
+    {   
+        $this->myLogger->logme('error','Policies Remove function called');
+        // $id                 = $this->request->getPost('PrimaryKey');
+        // $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $data['is_active'] = 0;
+        $update             = $this->policesModel->update($id,$data);
+        if($update){
+            return $this->respond(['status' => true,'code' => 200], 200);
+        }else{
+            return $this->respond(['status' => false,'code' => 404], 200);
+        }
+    }
 
     public function policyTypeOnboarding()
     {
diff --git a/app/Models/ClientModel.php b/app/Models/ClientModel.php
index 25a5249d..108eb9a2 100644
--- a/app/Models/ClientModel.php
+++ b/app/Models/ClientModel.php
@@ -58,8 +58,10 @@ class ClientModel extends Model
         ->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();
+
     
     }
 
diff --git a/app/Models/PolicesModel.php b/app/Models/PolicesModel.php
index a6194255..d6a8182e 100644
--- a/app/Models/PolicesModel.php
+++ b/app/Models/PolicesModel.php
@@ -1,12 +1,11 @@
 ( Image dimensions 100 x 100 pixels and size of 200KB. ) 
                                                     
                         
- " width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/> + " width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/>
@@ -254,7 +254,6 @@ input:checked + .slider:before { var OptionsHTML1 = '' $.ajax({ - data: formData, url: form_action, type: "POST", dataType: 'json', @@ -364,77 +363,70 @@ input:checked + .slider:before { return false; } - function PreviewImage() { - var file = document.getElementById("client_logo").files[0]; - - if (file) { - if (file.size <= 200 * 1024) { // 200kb in bytes - var oFReader = new FileReader(); - oFReader.readAsDataURL(file); - oFReader.onload = function (oFREvent) { - document.getElementById("uploadPreview").src = oFREvent.target.result; + function PreviewImage() { + console.log('function called'); + var fileInput = document.getElementById("client_logo"); + var file = fileInput.files[0]; + + if (file) { + var allowedExtensions = ["jpg", "jpeg", "png"]; + var fileExtension = file.name.split('.').pop().toLowerCase(); + + if (!allowedExtensions.includes(fileExtension) || file.size > 200 * 1024) { + toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.'); + fileInput.value = ""; // Clear the file input + document.getElementById("uploadPreview").src = "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"; // Remove the preview image + } else { + var reader = new FileReader(); + reader.readAsDataURL(file); + + reader.onload = function (event) { + document.getElementById("uploadPreview").src = event.target.result; }; } - } - }; + } + } - - // function validateFile(input) { - // const file = input.files[0]; - // const allowedExtensions = ["jpg", "jpeg", "png"]; - // const fileExtension = file.name.split(".").pop().toLowerCase(); - - // if (!allowedExtensions.includes(fileExtension)) { - // toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.'); - // document.getElementById("uploadPreview").src = "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"; - // input.value = ""; - // return; - // } - // } - function validateFile(input) { - const file = input.files[0]; - const allowedExtensions = ["jpg", "jpeg", "png"]; - const fileExtension = file.name.split(".").pop().toLowerCase(); - // Check if the file extension is allowed - if (!allowedExtensions.includes(fileExtension)) { - toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.'); - document.getElementById("uploadPreview").src = ""; - $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); - // input.value = ""; - // return; - } + const file = input.files[0]; + const allowedExtensions = ["jpg", "jpeg", "png"]; + const fileExtension = file.name.split(".").pop().toLowerCase(); - // Check file size - const fileSize = file.size / 1024; // in KB - if (fileSize > 200) { - toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.'); - $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); - // input.value = ""; - // return; - } - - // Check image dimensions - const img = new Image(); - img.onload = function() { - if (this.width !== 100 || this.height !== 100) { - toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.'); - $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); - // input.value = ""; - // return; + // Check if the file extension is allowed + if (!allowedExtensions.includes(fileExtension)) { + toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.'); + $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); + input.value = ""; } - // If both size and dimensions are valid, you can proceed with your logic here - // For example, you can display the image - const reader = new FileReader(); - reader.onload = function(e) { - document.getElementById("uploadPreview").src = e.target.result; + + + // Check file size + const fileSize = file.size / 1024; // in KB + if (fileSize > 200) { + toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.'); + $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); + input.value = ""; + } + + // Check image dimensions + const img = new Image(); + img.onload = function() { + if (this.width !== 100 || this.height !== 100) { + toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.'); + $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); + } + // If both size and dimensions are valid, you can proceed with your logic here + // For example, you can display the image + const reader = new FileReader(); + reader.onload = function(e) { + document.getElementById("uploadPreview").src = e.target.result; + }; + reader.readAsDataURL(file); }; - reader.readAsDataURL(file); - }; - img.src = URL.createObjectURL(file); + img.src = URL.createObjectURL(file); } diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index ddcb9670..aab529c9 100644 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -140,7 +140,11 @@ $(document).ready(function () { ${item.branch_name} ${item.branch_code} - + + + + + `; }); @@ -281,7 +285,10 @@ $(document).ready(function () { ${item.branch_name} ${item.branch_code} - + + + + `; }); @@ -504,4 +511,42 @@ $(document).ready(function () { return false; } + function removeClientBranch(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + } + + + + + \ No newline at end of file diff --git a/app/Views/client_deposit_list.php b/app/Views/client_deposit_list.php index 00a734eb..5d839d1a 100644 --- a/app/Views/client_deposit_list.php +++ b/app/Views/client_deposit_list.php @@ -2,16 +2,17 @@
-
-
- -

Client Deposit -

- -
- -
+
@@ -21,44 +22,41 @@ - + - + - + - insurer_name;?> - - - + insurer_id}?client_id={$value->client_id}"); ?>"> + View Deposit + + + - - + - +
Action
- + insurer_name;?> + ₹ - insurer_id; + insurer_id; + // Check if the balance information exists for the insurer + if (isset($balances[$insurerId])) { + $balance = $balances[$insurerId]->balance; + echo $balance; + } else { + echo "N/A"; // Display "Not Available" if balance information is not present + } + ?> - // Check if the balance information exists for the insurer - if (isset($balances[$insurerId])) { - $balance = $balances[$insurerId]->balance; - echo $balance; - } else { - echo "N/A"; // Display "Not Available" if balance information is not present - } - ?> - - insurer_id}?client_id={$value->client_id}"); ?>"> - View Deposit - -
@@ -67,22 +65,19 @@ \ No newline at end of file diff --git a/app/Views/client_list.php b/app/Views/client_list.php index 353dba76..69e2ceba 100644 --- a/app/Views/client_list.php +++ b/app/Views/client_list.php @@ -39,7 +39,7 @@ @@ -83,4 +83,42 @@ }) + + + function removeClient(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + + +} + \ No newline at end of file diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 44064255..bf79dc22 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -5,7 +5,7 @@ -
+
@@ -820,4 +820,9 @@ } + + function removeClientPolicy(element) { + console.log(element); + } + \ No newline at end of file diff --git a/app/Views/insurer_branch.php b/app/Views/insurer_branch.php index ab4c23e4..e2739700 100644 --- a/app/Views/insurer_branch.php +++ b/app/Views/insurer_branch.php @@ -123,9 +123,9 @@ \ No newline at end of file diff --git a/app/Views/insurer_list.php b/app/Views/insurer_list.php index 344f04bd..0375fd77 100644 --- a/app/Views/insurer_list.php +++ b/app/Views/insurer_list.php @@ -30,7 +30,7 @@ @@ -131,4 +131,41 @@ class csvExport { } + function removeInsurer(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + + + } + + \ No newline at end of file diff --git a/app/Views/kyc_docs.php b/app/Views/kyc_docs.php index c71f90a8..518fab5d 100644 --- a/app/Views/kyc_docs.php +++ b/app/Views/kyc_docs.php @@ -137,7 +137,10 @@ $(document).ready(function () { branchTable += ` - + `; }); @@ -178,7 +181,10 @@ $(document).ready(function () { insurerBranchTableInsert += ` - + `; }); @@ -279,7 +285,10 @@ $(document).ready(function () { insurerBranchTableInsert += ` - + `; }); @@ -300,4 +309,41 @@ $(document).ready(function () { } }); + + + + function removeKYCDocs(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + } + \ No newline at end of file diff --git a/app/Views/kyc_list.php b/app/Views/kyc_list.php index af6668a2..420e0b5e 100644 --- a/app/Views/kyc_list.php +++ b/app/Views/kyc_list.php @@ -28,7 +28,7 @@ @@ -129,4 +129,44 @@ class csvExport { } + +function removeKYC(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + + +} + + + + \ No newline at end of file diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 7e5a8568..f229cb95 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -206,12 +206,12 @@ /* color: #02a8b5 !important; */ font-size: 12px; } - .form-group { - /* margin-bottom: -0.2rem !important; */ + /* .form-group { + margin-bottom: -0.2rem !important; } .form-row{ - /* width: 84%; */ - } + width: 84%; + } */ @@ -375,7 +375,7 @@
-
+ composer create-project laravel/laravel:^11.0 example-app

Carlos Crouch liked Admin 13 days ago @@ -502,7 +502,7 @@

@@ -135,4 +135,42 @@ class csvExport { } +function removePolciyType(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + + +} + + + \ No newline at end of file diff --git a/app/Views/tpa_branch.php b/app/Views/tpa_branch.php index 7c99a4d3..f098fe6c 100644 --- a/app/Views/tpa_branch.php +++ b/app/Views/tpa_branch.php @@ -243,7 +243,10 @@ $(document).ready(function () { - + `; @@ -347,7 +350,10 @@ $(document).ready(function () { - + `; }); @@ -496,4 +502,38 @@ function validateForm() { return isValid; } + + function removeTPABranch(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + } \ No newline at end of file diff --git a/app/Views/tpa_list.php b/app/Views/tpa_list.php index 1ad72245..a1bfb7c9 100644 --- a/app/Views/tpa_list.php +++ b/app/Views/tpa_list.php @@ -28,7 +28,7 @@ @@ -129,4 +129,41 @@ class csvExport { } +function removeTPA(element) { + var id = element.getAttribute('data-id'); + var form_action = '' + id; + $.ajax({ + url: form_action, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + // console.log(res.status == true); + if(res){ + if (res.status == true) { + toastr.success('Remove Done!', 'success'); + + location.reload(); + + } else { + toastr.warning('Remove Not Done!', 'warning'); + } + } + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + setTimeout(function() { + $('.loader').fadeOut(); + $('.loader-mask').delay(350).fadeOut('slow'); + toastr.warning('Something Wrong!', 'warning'); + }, 1000); + } + }); + + + } + + \ No newline at end of file diff --git a/app/Views/view_deposit.php b/app/Views/view_deposit.php index 2e75f579..53176555 100644 --- a/app/Views/view_deposit.php +++ b/app/Views/view_deposit.php @@ -1,55 +1,63 @@ - -
-
-
-
-
-
-
-
- -

Deposit Summary Of short_name?>

- -
-
- -
-
- - - -

name; ?>

-
-
- -
-
-
-

Deposits

-

total_credit?>

-
- -
-

Consumed

-

total_withdraw?>

-
-
-

Refund

-

total_refund?>

-
-
-

Current Balance

-

balance?>

-
-
-
-
-
+
+
+
+
+
+ +
+
+ +

Deposit Summary Of short_name?>

+ +
+
+ +

name; ?>

+
+
+ +
+
+ +
+

Deposits

+

total_credit?> +

+
+ +
+

Consumed

+

total_withdraw?> +

+
+ +
+

Refund

+

total_refund?> +

+
+ +
+

Current Balance

+

balance?> +

+
+ +
+
+
+
+
+
-
+ +
--> +
-
-
-
-
-
-

Transaction Details

-
-
- +
+
+
- -
- +
+
+

Transaction Details

-
${item.file_name} + + +
${item.file_name} + + +
${item.file_name} + + +
${item.insurer_id} ${item.name} + + +
${item.insurer_id} ${item.name} + + +
${item.insurer.name} ${item.policy.name} + + +
${item.branch_name} ${item.branch_code} + + +
${item.branch_name} ${item.branch_code} + + +
- +
+ +
+ + +
+ - + - - - - - - - - - + - - - - - - - - - - - - - - -
Date User Description Sub Type Credit DebitBalnce
created_at)); ?>Balanceusername; ?>description; ?>sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>transaction_type == 'Credit') ? $row->amount : ''; ?>transaction_type == 'Debit') ? $row->amount : ''; ?>balance; ?>
-
+ + + + + + created_at)); ?> + username; ?> + description; ?> + sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?> + + transaction_type == 'Credit') ? $row->amount : ''; ?> + transaction_type == 'Debit') ? $row->amount : ''; ?> + balance; ?> + + + + +
- - - + + + + -