From bc3642e4043f121d9d344e02ec391f533d7b30df Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 29 Apr 2024 12:33:06 +0530 Subject: [PATCH 1/5] FIX_CLIENT_LIST_HIDE_DELETED_CLIENT_AND_CLIENT_POLICY_FILTERS : RV --- app/Config/Routes.php | 114 ++++++++++++------------- app/Controllers/ClientController.php | 10 ++- app/Models/ClientModel.php | 4 +- app/Models/ClientPolicyModel.php | 19 +++-- app/Views/client_policy.php | 119 +++++++++++++++++++++------ 5 files changed, 171 insertions(+), 95 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 2f5af3e2..744e04a0 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -7,12 +7,12 @@ use CodeIgniter\Router\RouteCollection; * @var RouteCollection $routes */ - $routes->get('/swagger', 'SwaggerController::index', ['filter' => 'authMVC']); +$routes->get('/swagger', 'SwaggerController::index', ['filter' => 'authMVC']); // $routes->get('/', 'LoginController::index'); $routes->get('/test', 'Home::index'); -$routes->get('/login', 'LoginController::index');///auth/google +$routes->get('/login', 'LoginController::index'); ///auth/google $routes->get('/logout', 'LoginController::logout'); $routes->get('/oauth2callback', 'LoginController::receiveGoogleOAuthResponse'); $routes->get('/auth/google', 'LoginController::initiateGoogleOAuth'); @@ -21,7 +21,7 @@ $routes->get('download-e-card/(:segment)', 'EmployeeController::generateIDCardFo -$routes->group("/user", ["filter" => "authMVC"], function($routes){ +$routes->group("/user", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "UserController::create"); $routes->get("create", "UserController::create"); $routes->post("edit", "UserController::edit"); @@ -32,12 +32,12 @@ $routes->group("/user", ["filter" => "authMVC"], function($routes){ }); -$routes->group("/dashboard", ["filter" => "authMVC"], function($routes){ +$routes->group("/dashboard", ["filter" => "authMVC"], function ($routes) { $routes->get("view", "DashboardController::dashboard"); }); -$routes->group("/client", ["filter" => "authMVC"], function($routes){ +$routes->group("/client", ["filter" => "authMVC"], function ($routes) { $routes->get("list", "ClientController::index"); $routes->get("create", "ClientController::clientOnboarding"); @@ -45,11 +45,11 @@ $routes->group("/client", ["filter" => "authMVC"], function($routes){ $routes->get('remove/(:num)', 'ClientController::removeClient/$1'); // application/config/routes.php -// Add a route for the view_Deposit method -$routes->get('view_deposit/(:num)', 'ClientController::view_Deposit/$1'); -$routes->get('createtransaction', 'ClientController::createtransaction'); + // Add a route for the view_Deposit method + $routes->get('view_deposit/(:num)', 'ClientController::view_Deposit/$1'); + $routes->get('createtransaction', 'ClientController::createtransaction'); -$routes->post('save_deposit', 'ClientController::saveDeposit'); + $routes->post('save_deposit', 'ClientController::saveDeposit'); @@ -63,25 +63,25 @@ $routes->post('save_deposit', 'ClientController::saveDeposit'); $routes->get("list/(:any)", "ClientController::editClientOnboarding/$1"); - - $routes->group("general", ["filter" => "authMVC"], function($routes){ + + $routes->group("general", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "ClientController::createClientGeneralInfo"); $routes->post("edit", "ClientController::editClientGeneralInfo"); - }); + }); - $routes->group("branch", ["filter" => "authMVC"], function($routes){ + $routes->group("branch", ["filter" => "authMVC"], function ($routes) { $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){ + $routes->group("relation", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "ClientController::createClientRelation"); $routes->post("edit", "ClientController::editClientRelation"); - }); + }); - $routes->group("policy", ["filter" => "authMVC"], function($routes){ + $routes->group("policy", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "ClientController::createClientPolicy"); $routes->post("edit", "ClientController::editClientPolicy"); $routes->get("list/(:any)", "ClientController::getClientPolicyById/$1"); @@ -89,27 +89,26 @@ $routes->post('save_deposit', 'ClientController::saveDeposit'); $routes->get("getterms", "ClientController::getterms"); }); - $routes->group("kyc", ["filter" => "authMVC"], function($routes){ + $routes->group("kyc", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "ClientController::createClientKYCInfo"); $routes->post("edit", "ClientController::editClientKYCInfo"); $routes->get("list/(:any)", "ClientController::getKycDocsById/$1"); $routes->get("delete/(:any)", "ClientController::deleteClientKycDocs/$1"); }); - $routes->group("premimum", ["filter" => "authMVC"], function($routes){ + $routes->group("premimum", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "ClientController::createClientPolicyPremium"); $routes->post("edit", "ClientController::editClientPolicyPremium"); }); - $routes->group("terms", ["filter" => "authMVC"], function($routes){ + $routes->group("terms", ["filter" => "authMVC"], function ($routes) { $routes->post("gpa_create", "ClientController::policyGPATerms"); $routes->post("edit", "ClientController::editClientPolicyPremium"); }); - }); -$routes->group("/employee", ["filter" => "authMVC"], function($routes){ +$routes->group("/employee", ["filter" => "authMVC"], function ($routes) { $routes->get("list", "EmployeeController::list"); $routes->get("search", "EmployeeController::search"); $routes->get("upload", "EmployeeController::employeesUplodWithEvents"); @@ -120,10 +119,10 @@ $routes->group("/employee", ["filter" => "authMVC"], function($routes){ }); -$routes->group("/master", ["filter" => "authMVC"], function($routes){ +$routes->group("/master", ["filter" => "authMVC"], function ($routes) { - $routes->group("insurer", ["filter" => "authMVC"], function($routes){ + $routes->group("insurer", ["filter" => "authMVC"], function ($routes) { $routes->get("list", "MasterController::insurerList"); @@ -133,17 +132,16 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->post("edit", "MasterController::editInsurerGeneralInfo"); $routes->get("list/(:any)", "MasterController::editInsurerOnboarding/$1"); - $routes->group("branch", ["filter" => "authMVC"], function($routes){ + $routes->group("branch", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "MasterController::createInsurerBranch"); $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"); }); + }); - }); - - $routes->group("tpa", ["filter" => "authMVC"], function($routes){ + $routes->group("tpa", ["filter" => "authMVC"], function ($routes) { $routes->get("list", "MasterController::tpaList"); $routes->get("create", "MasterController::tpaOnboarding"); $routes->post("createpost", "MasterController::createTPAGeneralInfo"); @@ -151,16 +149,16 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->get("list/(:any)", "MasterController::editTPAOnboarding/$1"); $routes->get("remove/(:any)", "MasterController::tpaRemove/$1"); - $routes->group("branch", ["filter" => "authMVC"], function($routes){ + $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"); }); - }); - - $routes->group("kyc", ["filter" => "authMVC"], function($routes){ + }); + + $routes->group("kyc", ["filter" => "authMVC"], function ($routes) { $routes->get("list", "MasterController::kycList"); $routes->get("create", "MasterController::kycOnboarding"); $routes->post("createpost", "MasterController::createKYCInfo"); @@ -170,18 +168,17 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->get("delete/(:any)", "MasterController::deleteClientKycDocs/$1"); - $routes->group("kycdocs", ["filter" => "authMVC"], function($routes){ + $routes->group("kycdocs", ["filter" => "authMVC"], function ($routes) { $routes->post("createpost", "MasterController::createKycDocs"); $routes->get("editget/(:any)", "MasterController::editKYCGet/$1"); $routes->post("edit", "MasterController::editKYCDocs"); // $routes->get("list", "MasterController::tpaBranchList"); $routes->get("list/(:any)", "MasterController::kycDocsList/$1"); $routes->get("remove/(:any)", "MasterController::removeKYCDocs/$1"); - }); }); - $routes->group("policy", ["filter" => "authMVC"], function($routes){ + $routes->group("policy", ["filter" => "authMVC"], function ($routes) { $routes->get("list", "MasterController::policyTypeList"); $routes->get("create", "MasterController::policyTypeOnboarding"); $routes->post("createpost", "MasterController::createPolicyType"); @@ -190,7 +187,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->get("remove/(:any)", "MasterController::policyTypeRemove/$1"); - $routes->group("policies", ["filter" => "authMVC"], function($routes){ + $routes->group("policies", ["filter" => "authMVC"], function ($routes) { $routes->post("createpost", "MasterController::createPolicies"); $routes->get("editget/(:any)", "MasterController::editPoliciesGet/$1"); $routes->post("edit", "MasterController::editPolicies"); @@ -198,30 +195,29 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){ $routes->get("list/(:any)", "MasterController::policesList/$1"); $routes->get("remove/(:any)", "MasterController::removePolicyPolicies/$1"); }); - }); }); -$routes->group("/util", ["filter" => "authMVC"], function($routes){ - $routes->get("clients-with-policies", "EmployeeController::getClientWithPolicies"); - $routes->get("police-by-insurer/(:any)", "ClientController::getPolicesByInsurerId/$1"); - $routes->get("get-file-error/(:any)", "EmployeeController::getUploadedFileError/$1"); - $routes->get("kyc-other-docs-delete/(:any)", "ClientController::deleteClientKycOtherDocs/$1"); - $routes->get("policy-premium", "ClientController::getpolicyGridData/$1"); - $routes->get("update-policy-status", "ClientController::updateClientPolicyStatus/$1"); - $routes->get("download-excel/(:any)", "EmployeeController::downloadSampleExcelFile/$1"); - $routes->get("get-emp-endorsement/(:any)", "EmployeeController::getEmpEndoresmentEntry/$1"); - $routes->post("import-export", "EmployeeController::importExport"); - $routes->get("featch-client-policy-list/(:any)", "ClientController::getClientPolicyList/$1"); - $routes->get("download-file-list/(:any)", "EmployeeController::downloadFileList/$1"); - $routes->get("featch-emp-list", "EmployeeController::featchEmpList/$1"); - $routes->get("view-success-emp-list", "EmployeeController::viewUploadedEmployeeList/$1"); - $routes->get("fetch-policy-for-policy-type", "ClientController::fetchPolicyDataForPolicyType/$1"); - $routes->get("fetch-emp-count/(:any)", "EmployeeController::getEmpCount/$1"); - $routes->get("init-Emp-onboard/(:any)", "EmployeeController::initiateManualEmployeesOnboardProcess/$1"); - $routes->get("full-excel-error-file/(:any)", "EmployeeController::downloadFullExcelErrorFile/$1"); - $routes->get("id-card", "EmployeeController::viewECard/$1"); +$routes->group("/util", ["filter" => "authMVC"], function ($routes) { + $routes->get("clients-with-policies", "EmployeeController::getClientWithPolicies"); + $routes->get("police-by-insurer/(:any)", "ClientController::getPolicesByInsurerId/$1"); + $routes->get("get-file-error/(:any)", "EmployeeController::getUploadedFileError/$1"); + $routes->get("kyc-other-docs-delete/(:any)", "ClientController::deleteClientKycOtherDocs/$1"); + $routes->get("policy-premium", "ClientController::getpolicyGridData/$1"); + $routes->get("update-policy-status", "ClientController::updateClientPolicyStatus/$1"); + $routes->get("download-excel/(:any)", "EmployeeController::downloadSampleExcelFile/$1"); + $routes->get("get-emp-endorsement/(:any)", "EmployeeController::getEmpEndoresmentEntry/$1"); + $routes->post("import-export", "EmployeeController::importExport"); + $routes->get("featch-client-policy-list/(:any)", "ClientController::getClientPolicyList/$1"); + $routes->get("download-file-list/(:any)", "EmployeeController::downloadFileList/$1"); + $routes->get("featch-emp-list", "EmployeeController::featchEmpList/$1"); + $routes->get("view-success-emp-list", "EmployeeController::viewUploadedEmployeeList/$1"); + $routes->get("fetch-policy-for-policy-type", "ClientController::fetchPolicyDataForPolicyType/$1"); + $routes->get("fetch-emp-count/(:any)", "EmployeeController::getEmpCount/$1"); + $routes->get("init-Emp-onboard/(:any)", "EmployeeController::initiateManualEmployeesOnboardProcess/$1"); + $routes->get("full-excel-error-file/(:any)", "EmployeeController::downloadFullExcelErrorFile/$1"); + $routes->get("id-card", "EmployeeController::viewECard/$1"); }); $routes->cli('cli/processjob', 'JobWorker::processJob'); @@ -236,7 +232,7 @@ $routes->post("/employeeRest/getVerifiedUserData", "RestAuthenticationController $routes->post("/employeeRest/verifyHrWithMobileNumber", "RestAuthenticationController::verifyHrWithMobileNumber"); $routes->post("/employeeRest/getVerifiedHrData", "RestAuthenticationController::getVerifiedHrData"); -$routes->group("/api", ["filter" => "authJWT"], function($routes){ +$routes->group("/api", ["filter" => "authJWT"], function ($routes) { $routes->post("logined", "RestAuthenticationController::logined"); $routes->post("getId", "RestAuthenticationController::getUserIdFromToken"); }); @@ -250,7 +246,7 @@ $routes->post("/calculatePremium", "EmployeeRestController::calculatePremium"); -$routes->group("employeeRest", ["filter" => "authJWT"], function($routes){ +$routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) { $routes->get("getEmployeeProfile", "EmployeeRestController::getEmployeeProfile"); $routes->post("employeeUpload", "EmployeeRestController::employeeUpload"); @@ -273,8 +269,6 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function($routes){ $routes->get("exportCashDepositData", "EmployeeRestController::exportCashDepositData"); $routes->get("removeEmpAndEmpPolicyData", "EmployeeRestController::removeEmpAndEmpPolicyData"); - - }); $routes->post("sendEmail", "EmployeeRestController::send_email"); diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 370e16d3..3a058335 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -573,6 +573,9 @@ class ClientController extends AdminController public function createClientPolicy() { + // print_r($this->request->getPost()); die; + + $this->myLogger->logme('error','Client policy CREATE function called'); $insurerValue = (string) $this->request->getPost('insurer'); @@ -607,6 +610,8 @@ class ClientController extends AdminController $data['base_policy'] = $this->request->getPost('base_policy'); $data['policy_status'] = 1; + + $policy_terms = $this->clientPolicyModel->where('id', $this->request->getPost('base_policy'))->first(); if ( $this->request->getPost('is_addon') == 2 || $this->request->getPost('is_addon') == 3) { @@ -992,7 +997,10 @@ class ClientController extends AdminController { $this->myLogger->logme('error','getPolicesByInsurerId function called'); if($id){ - $police_data = $this->policesModel->where(['insurer_id' => $id, 'is_active' => 1])->findAll(); + $police_data = $this->policesModel + ->select('policies.*, policy_type.policy_type') + ->join('policy_type', 'policy_type.id = policies.policy_type_id') + ->where(['insurer_id' => $id, 'policies.is_active' => 1])->findAll(); return $this->respond(['status' => true,'code' => 200,'data' => $police_data], 200); }else{ return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200); diff --git a/app/Models/ClientModel.php b/app/Models/ClientModel.php index fae413f9..af579498 100644 --- a/app/Models/ClientModel.php +++ b/app/Models/ClientModel.php @@ -56,10 +56,10 @@ class ClientModel extends Model return $this->db->table('clients') ->select('clients.*') + ->where('is_active', 1) ->get() ->getResult(); - - + } } diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php index e5b4e591..d0d80b54 100644 --- a/app/Models/ClientPolicyModel.php +++ b/app/Models/ClientPolicyModel.php @@ -276,17 +276,18 @@ public function updateStatus(){ public function getpolicyWithPattern($client_id){ - $query = " - SELECT client_policy.*, policies.name, policies.policy_type_id - FROM client_policy - JOIN policies ON policies.id = client_policy.policy_id - JOIN policy_type ON policy_type.id = policies.policy_type_id - WHERE policy_type.policy_type = 'GMC' - AND client_policy.client_id = {$client_id}"; + $query = $this->db->table('client_policy') + ->select('client_policy.*, policies.name, policies.policy_type_id, policy_type.policy_type') + ->join('policies', 'policies.id = client_policy.policy_id') + ->join('policy_type', 'policy_type.id = policies.policy_type_id') + // ->where('policy_type.policy_type', 'GMC') + ->whereIn('policy_type.id', [2, 3]) + ->where('client_policy.client_id', $client_id) + ->get() + ->getResult(); - $result = $this->db->query($query)->getResult(); - return $result; + return $query; } public function getTopUpPolicy($client_id, $type){ diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 298094bc..d47726fb 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -399,11 +399,11 @@ $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); if (xhr.status === 404) { - toastr.warning('Resource not found', 'Warning'); + console.log('Resource not found', 'Warning'); } else if (xhr.status === 500) { - toastr.warning('Internal server error', 'Warning'); + console.log('Internal server error', 'Warning'); } else { - toastr.warning('Unknown error occurred', 'Warning'); + console.log('Unknown error occurred', 'Warning'); } }, 1000); } @@ -418,6 +418,11 @@ var secondPart = parts[1]; var url = "" + secondPart; + var selectedOption = $('#base_policy').find(':selected'); + var base_policy_data_id = selectedOption.data('id'); + console.log('base_policy_data_id', base_policy_data_id); + + $.get(url, function(res) { // res = JSON.parse(res)// // console.log(res) @@ -427,29 +432,46 @@ $.each(res.data, function(index, item) { if ($policy_type_value == 3) { - if (item.policy_type_id == 5 || item.policy_type_id == 3) { - OptionsHTML += ''; + + if (base_policy_data_id == 3) { + + if (item.policy_type_id == 5) { + + OptionsHTML += ''; + } + + } else { + + if (item.policy_type_id == 5 || item.policy_type_id == 3) { + + OptionsHTML += ''; + } + } + + } else if ($policy_type_value == 2) { - if (item.policy_type_id == 4) { + if (item.policy_type_id == 4 || item.policy_type_id == 5) { OptionsHTML += ''; + '">' + item.name + '( ' + item.policy_type + ' )'; } } else if ($policy_type_value == 1) { if (item.policy_type_id == 1 || item.policy_type_id == 2) { OptionsHTML += ''; + '">' + item.name + '( ' + item.policy_type + ' )'; } } else { OptionsHTML += ''; + '">' + item.name + '( ' + item.policy_type + ' )'; } }); @@ -553,11 +575,35 @@ } if (res.data.is_addon == 2 || res.data.is_addon == 3) { - $('#insurer').prop('disabled', true); - $('#tpa').prop('disabled', true); + $("#insurer").next(".select2-container").css({ + 'pointer-events': 'none', + }); + $('#select2-insurer-container').css({ + 'background-color': '#ebebe0', + }); + + $("#tpa").next(".select2-container").css({ + 'pointer-events': 'none', + }); + $('#select2-tpa-container').css({ + 'background-color': '#ebebe0', + }); + } else { - $('#insurer').prop('disabled', false); - $('#tpa').prop('disabled', false); + + $("#insurer").next(".select2-container").css({ + 'pointer-events': 'auto', + }); + $('#select2-insurer-container').css({ + 'background-color': 'transparent', + }); + + $("#tpa").next(".select2-container").css({ + 'pointer-events': 'auto', + }); + $('#select2-tpa-container').css({ + 'background-color': 'transparent', + }); } var policeOptionHTML = ''; @@ -672,11 +718,11 @@ $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); if (xhr.status === 404) { - toastr.warning('Resource not found', 'Warning'); + console.log('Resource not found', 'Warning'); } else if (xhr.status === 500) { - toastr.warning('Internal server error', 'Warning'); + console.log('Internal server error', 'Warning'); } else { - toastr.warning('Unknown error occurred', 'Warning'); + console.log('Unknown error occurred', 'Warning'); } }, 1000); } @@ -1044,11 +1090,35 @@ $('#base_policy').val('').change(); if ($(this).val() == 2 || $(this).val() == 3) { - $('#insurer').prop('disabled', true); - $('#tpa').prop('disabled', true); + + $("#insurer").next(".select2-container").css({ + 'pointer-events': 'none', + }); + $('#select2-insurer-container').css({ + 'background-color': '#ebebe0', + }); + + $("#tpa").next(".select2-container").css({ + 'pointer-events': 'none', + }); + $('#select2-tpa-container').css({ + 'background-color': '#ebebe0', + }); } else { - $('#insurer').prop('disabled', false); - $('#tpa').prop('disabled', false); + + $("#insurer").next(".select2-container").css({ + 'pointer-events': 'auto', + }); + $('#select2-insurer-container').css({ + 'background-color': 'transparent', + }); + + $("#tpa").next(".select2-container").css({ + 'pointer-events': 'auto', + }); + $('#select2-tpa-container').css({ + 'background-color': 'transparent', + }); } @@ -1107,7 +1177,8 @@ OptionsHTML += ''; $.each(res.data, function(index, item) { OptionsHTML += ''; + '">' + item.name + '( ' + item.policy_type + ' )'; + }); $('#base_policy').html(OptionsHTML); }, @@ -1176,6 +1247,8 @@ // if (item.policy_type_id == 5) { console.log(item); + + policeOptionHTML += ''; From 9dd0bd2b250994bdc9604e2348ad1c1c3787a26b Mon Sep 17 00:00:00 2001 From: bitbucket Date: Mon, 29 Apr 2024 14:11:39 +0530 Subject: [PATCH 2/5] CHANGE_ in mail App_Url in env file : GWM --- app/Controllers/EmployeeRestController.php | 1 + app/Views/mail_welcome.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 1a66028d..29ec4c2a 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -970,6 +970,7 @@ class EmployeeRestController extends AdminController // $message = 'Dear ' . $dataToInsert[$a]['name'] . ",
We are glad to welcome you to the employee benefit program ," .$policy_name['name'] ."offered by your employer,


Click on the link below to review your personal and family details:
Review Details" ; $data['employee_name']=$dataToInsert[$a]['name']; $data['policy_name']=$policy['name']; + $data['App_Url'] = $_ENV['App_Url']; $message = view('mail_welcome', $data); diff --git a/app/Views/mail_welcome.php b/app/Views/mail_welcome.php index 9ebdd64b..7b0ba18e 100644 --- a/app/Views/mail_welcome.php +++ b/app/Views/mail_welcome.php @@ -14,7 +14,7 @@

We are glad to welcome you to the employee benefit program, offered by your employer.

From 6f255a4cfb781f06bf31995420ec120b873d2798 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Mon, 29 Apr 2024 16:48:25 +0530 Subject: [PATCH 3/5] FIX_ addEmployeeAndDependence API : GWM --- app/Controllers/EmployeeRestController.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 29ec4c2a..33db711e 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -209,13 +209,26 @@ class EmployeeRestController extends AdminController if ($Count > 0) { - if(!isset($data[0]->is_addon_value)) + if(isset($data[0]->id)) { - $this->createEmployeePolicyData($employee , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id); + if(!isset($data[0]->is_addon_value)) + { + $this->createEmployeePolicyData($data[0]->id , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id); + }else{ + $this->createEmployeePolicyData($data[0]->id , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id , $data[0]->basic_cover_si); + } + }else{ - $this->createEmployeePolicyData($data[0]->id , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id , $data[0]->basic_cover_si); + if(!isset($data[0]->is_addon_value)) + { + $this->createEmployeePolicyData($employee , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id); + }else{ + $this->createEmployeePolicyData($employee , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id , $data[0]->basic_cover_si); + } } + + $this->updatePremiumAmount($data[0]->client_policy_id , $data[0]->emp_code); From 02becbcba4ae687bb38387d7c1501f16edeb3f69 Mon Sep 17 00:00:00 2001 From: velz Date: Tue, 30 Apr 2024 08:42:28 +0530 Subject: [PATCH 4/5] CHNAGE_INCEPTION_COLUMNS_RESTORED --- app/Controllers/EmployeeServiceController.php | 3 +-- public/sample_excel/sample_inception.xls | Bin 9216 -> 9728 bytes 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php index e57a84db..855db866 100644 --- a/app/Controllers/EmployeeServiceController.php +++ b/app/Controllers/EmployeeServiceController.php @@ -34,8 +34,7 @@ class EmployeeServiceController extends AdminController protected $policiesModel; protected $empEndorsementModel; protected $general_relationships = ['self' => ['name' => 'Self', 'gender' => 'M','age_min' => 18,'age_max' => null], 'spouse' => ['name' => 'Spouse', 'gender' => 'F','age_min' => 18,'age_max' => null], 'son' => ['name' => 'Son', 'gender' => 'M','age_min' => null,'age_max' => 25], 'daughter' => ['name' => 'Daughter', 'gender' => 'F','age_min' => null,'age_max' => 25], 'father' => ['name' => 'Father', 'gender' => 'M','age_min' => 18,'age_max' => null], 'mother' => ['name' => 'Mother', 'gender' => 'F','age_min' => 18,'age_max' => null], 'father-in-law' => ['name' => 'Father in Law', 'gender' => 'M','age_min' => 18,'age_max' => null], 'mother-in-law' => ['name' => 'Mother in Law', 'gender' => 'F','age_min' => 18,'age_max' => null]]; - - protected $inception_excel_columns = ['sno'=>['col_idx'=>0,'col_cell_name'=>'A','col_name'=>'S.No','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'emp_id'=>['col_idx'=>1,'col_cell_name'=>'B','col_name'=>'EMP ID','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'name_of_emp_dep'=>['col_idx'=>2,'col_cell_name'=>'C','col_name'=>'NAME OF EMP/DEP','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'dob'=>['col_idx'=>3,'col_cell_name'=>'D','col_name'=>'DOB','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'custom'=>'check_dob_diff','params'=>['row','relationship']],'gender'=>['col_idx'=>4,'col_cell_name'=>'E','col_name'=>'Gender','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>['M','F']],'relationship'=>['col_idx'=>5,'col_cell_name'=>'F','col_name'=>'RELATIONSHIP','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_relationship','params'=>['row','relationship','policy_terms']],'basic_cover_si'=>['col_idx'=>6,'col_cell_name'=>'G','col_name'=>'BASIC COVER SI','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom' => 'check_si','params' => ['row','policy_terms','slab_details']],'doc'=>['col_idx'=>7,'col_cell_name'=>'H','col_name'=>'Date of Coverage','is_mandatory'=>['A','DA'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'params'=>['row']],'doj'=>['col_idx'=>8,'col_cell_name'=>'I','col_name'=>'DOJ','is_mandatory'=>false,'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'custom'=>'check_doj','params'=>['row']],'basic_pay'=>['col_idx'=>9,'col_cell_name'=>'J','col_name'=>'Basic Pay','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_basic_pay','params'=>['row','policy_terms','slab_details']],'band_grade'=>['col_idx'=>10,'col_cell_name'=>'K','col_name'=>'Band/Grade','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_employee_band','params'=>['row','policy_terms','slab_details']],'designation'=>['col_idx'=>11,'col_cell_name'=>'L','col_name'=>'Designation','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'phone'=>['col_idx'=>12,'col_cell_name'=>'M','col_name'=>'Phone','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'email'=>['col_idx'=>13,'col_cell_name'=>'N','col_name'=>'Email','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'pre_existing_ailments'=>['col_idx'=>14,'col_cell_name'=>'O','col_name'=>'PRE EXISTING AILMENTS','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>['0','1']],'change_event'=>['col_idx'=>15,'col_cell_name'=>'P','col_name'=>'Change event','is_mandatory'=>['A','DA','D'],'data_type'=>'str','format'=>null,'allowed_values'=>null]]; + protected $inception_excel_columns = ['sno'=>['col_idx'=>0,'col_cell_name'=>'A','col_name'=>'S.No','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'emp_id'=>['col_idx'=>1,'col_cell_name'=>'B','col_name'=>'EMP ID','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'name_of_emp_dep'=>['col_idx'=>2,'col_cell_name'=>'C','col_name'=>'NAME OF EMP/DEP','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'dob'=>['col_idx'=>3,'col_cell_name'=>'D','col_name'=>'DOB','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'custom'=>'check_dob_diff','params'=>['row','relationship']],'gender'=>['col_idx'=>4,'col_cell_name'=>'E','col_name'=>'Gender','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>['M','F']],'relationship'=>['col_idx'=>5,'col_cell_name'=>'F','col_name'=>'RELATIONSHIP','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_relationship','params'=>['row','relationship','policy_terms']],'basic_cover_si'=>['col_idx'=>6,'col_cell_name'=>'G','col_name'=>'BASIC COVER SI','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom' => 'check_si','params' => ['row','policy_terms','slab_details']],'doc'=>['col_idx'=>7,'col_cell_name'=>'H','col_name'=>'Date of Coverage','is_mandatory'=>['A','DA'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'params'=>['row']],'doj'=>['col_idx'=>8,'col_cell_name'=>'I','col_name'=>'DOJ','is_mandatory'=>false,'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null,'custom'=>'check_doj','params'=>['row']],'basic_pay'=>['col_idx'=>9,'col_cell_name'=>'J','col_name'=>'Basic Pay','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_basic_pay','params'=>['row','policy_terms','slab_details']],'band_grade'=>['col_idx'=>10,'col_cell_name'=>'K','col_name'=>'Band/Grade','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null,'custom'=>'check_employee_band','params'=>['row','policy_terms','slab_details']],'designation'=>['col_idx'=>11,'col_cell_name'=>'L','col_name'=>'Designation','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'phone'=>['col_idx'=>12,'col_cell_name'=>'M','col_name'=>'Phone','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'email'=>['col_idx'=>13,'col_cell_name'=>'N','col_name'=>'Email','is_mandatory'=>false,'data_type'=>'str','format'=>null,'allowed_values'=>null],'pre_existing_ailments'=>['col_idx'=>14,'col_cell_name'=>'O','col_name'=>'PRE EXISTING AILMENTS','is_mandatory'=>['I','A','DA'],'data_type'=>'str','format'=>null,'allowed_values'=>['0','1']],'change_event'=>['col_idx'=>15,'col_cell_name'=>'P','col_name'=>'Change event','is_mandatory'=>['A','DA','D'],'data_type'=>'str','format'=>null,'allowed_values'=>null],'date_of_exit'=>['col_idx'=>16,'col_cell_name'=>'Q','col_name'=>'Date of exit','is_mandatory'=>['D'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null],'reason_for_exit'=>['col_idx'=>17,'col_cell_name'=>'R','col_name'=>'Reason for exit','is_mandatory'=>['D'],'data_type'=>'str','format'=>null,'allowed_values'=>null]]; protected $deletion_excel_columns = ['sno'=>['col_idx'=>0,'col_cell_name'=>'A','col_name'=>'S.No','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'emp_id'=>['col_idx'=>1,'col_cell_name'=>'B','col_name'=>'EMP ID','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'name_of_emp_dep'=>['col_idx'=>2,'col_cell_name'=>'C','col_name'=>'NAME OF EMP/DEP','is_mandatory'=>true,'data_type'=>'str','format'=>null,'allowed_values'=>null],'change_event'=>['col_idx'=>3,'col_cell_name'=>'D','col_name'=>'Change event','is_mandatory'=>['D'],'data_type'=>'str','format'=>null,'allowed_values'=>null],'date_of_exit'=>['col_idx'=>4,'col_cell_name'=>'E','col_name'=>'Date of exit','is_mandatory'=>['D'],'data_type'=>'str','format'=>'d-M-Y','allowed_values'=>null],'reason_for_exit'=>['col_idx'=>5,'col_cell_name'=>'F','col_name'=>'Reason for exit','is_mandatory'=>['D'],'data_type'=>'str','format'=>null,'allowed_values'=>null]]; diff --git a/public/sample_excel/sample_inception.xls b/public/sample_excel/sample_inception.xls index 2c3ab4e3dce179b06c1ed435e76464af19243977..a8e2aeb15c20e00ca60e044e538801bcfbb8e5fd 100644 GIT binary patch delta 2224 zcmZ{lONbn05XbB5?&-($yxk=3>|=U%vzy(#l%O6W3md`U!HXb14x)oINd{zA*NK{g z_82`0LP&cGc-SBcxw&)At^q*^9s@auhn#W{1;LyY9sgBdcTe|WyXl_(x@xL^_4uks zFN|Ki_GGz6@qvfR_ZxqydKoYNn@lFjRUdB{Kd4>nzB$*VKOvliw+;N@DyVa`O?~Rn zJL7xK>*kD0-;tsvqWRb=-3g*Ke}2}ZZ|EhpO!W9v@PKB>i{9{`P+s(I^RSg5C$c z!7vC)MBUD?7i?V!dLQ+NRif=)=l!igaA9j(-i%LG&Z{MtsMGEChyASq64LGU-W^`* z2iv`F_sWEdbee9Bzo>qy-mK79K5XFlm`YT|xl^C6YgB{$NGh)rsYIU)u;I|!4LrGq zu113D9;6jb;xSlGmZn9-{mR%}SG>R7=o?NI}zA!?B= z_httyqN7mC08*k)j3VBd)TZWUBC{ZS3^KN+sDRZ>s%eL)_0`W8Nf|bT4lTzfTslhE zA1d0HKY6r*vlyH3@q7p-OvJB{vlTpFD;tm0bJ|6jR_So+qJkB78{_kDO9F0@#+UdF z;pZeXzmelN$f9E@zXASZ(t=vkhB?OHM@$Cr*ANb)^0`Xo*j^UF6a+4uAcTm3sZBwc zjS);ixOpX!F+vkEt;q;;sb&_zJOII@EP^G@xm+y@r&Y8Bf%hH9W(mTXnjuat$wGo) zNfj4T%`Ad-0D>h5+&Nr`f;dN!LY;;<3k5+~j13nA;rw-tP{<(^q!6uCGmB6-0HKh} zf^OoFV@jHV(`ySt5F54yVfSl|VCQoeZ90+V6~B#DK5T$=Eu70b2M7h5R$6^@a8ngiPz_XniCd zJpvh<^97d25X1T@>~adrZ#8Uw9{RvK0Y74A2}%hUyTr#8>t}H1>Qw-6GJ0$Fsx_HZ z>*I&BO(WWzyMyc1-TAYo|1@nvlQuql>SFYKD{yw^?%ulbi;CLTOf+geQq|~k@R`v( KJpMbd&Hn*fMitip delta 2001 zcmZ{k&ubG=5Xa}ew?DJpq`%Wf-6pC1DOf9_APB8sQSjoWcvNXcK}5tJdU0d*52#%P z5d;-cPm0OaRzVOwdGjC&o;-OGdr~yc%-d|T)nwV-%)a+#K5yR4w{pC4bajuPgZS48 z;6Fd~L->E{^?Kv(tj)@o;^rx%YJ5<&O?zHNXS{(y2Oh!+F$^%!SpBN_1$x1WB5&$| z9xeVm3XgCVe&4=j6+FT3<>-5+C+g_vKj5-==RfNyY8l{Uyxwqqj>>+AdHscss(k83 zMZaR_<$jzu89nx2)NWZJ5YobRHk4xz4h+NER{4WH7U9!7KtJ?s;!DQwjaSGNz61kC89yZF5==DvlBpIt zBK{4m3W@w%5ELWy$9@$fJXqElRE&@hagY!cBTz+BvK1ai z6G62>P$>k1gHr}uvtTg7VC>gmguR`TV;YDMjzS&>3Bf>wAt)qMTM>*l2nHii<;88gP&hOwIyz7-hjsWx;HNV5YJV7x5MZixGCjel13* z-X(-EgFza_KnNBi1j*FaELbtZI5aL@3l<`bV+frEn}d^w)-2dKK92d-TeBJA%{LM9 zzU>r(%?QP0YAb@>2Ek4tp!{HP6q^)+!&xZBejP>#KL~viPU;{WMj!`t5KihKoHhtf z3c=;zqx=jKO>r3kwU_<6ph6UtJ4z$Ch|m-j7ZIAG;wA_rDlQ{X$+-wuhU#mH%~`&v z(56Fl@uqgwRpkO{%LrPeEpDtWUzR>S_%+M@?_y7npaL|gT02|I$|Q~j(A)=U#t`a) zUO^38g!%irv#FDs+n_QYVr?N@sxRHxW6=E$wIyURq!g3HX!;D(kE8PqWX&M`1oP`+ z%cSa^lstglTkt%_n~3qe6rP88LDKZI9`lj#5TBRul{FtC&{vI@RzMFyCP7A1g+Z|^ zI#yUg1 Date: Tue, 30 Apr 2024 09:14:13 +0530 Subject: [PATCH 5/5] CHANGE_ calculatePremium route : GWM --- app/Config/Routes.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 744e04a0..34c19b5b 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -269,6 +269,8 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) { $routes->get("exportCashDepositData", "EmployeeRestController::exportCashDepositData"); $routes->get("removeEmpAndEmpPolicyData", "EmployeeRestController::removeEmpAndEmpPolicyData"); + + $routes->post("calculatePremium", "EmployeeRestController::calculatePremium"); }); $routes->post("sendEmail", "EmployeeRestController::send_email");