From dc8e9d1e74c58d161593d6180fd757520498bd55 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Sat, 27 Apr 2024 14:40:32 +0530 Subject: [PATCH 1/7] CHANGE_ in getEmployeeProfile API : GWM --- app/Controllers/EmployeeRestController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index f53e2808..50672f49 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -69,9 +69,11 @@ class EmployeeRestController extends AdminController { try { $emp_code = $this->request->getGet('emp_code'); + $client_id = $this->request->getGet('client_id'); if ($emp_code) { $relationship = 'self'; $employee = $this->employeeModel->where('emp_code', $emp_code) + ->where('client_id', $client_id) ->where('is_active', 1 ) ->where('relationship', $relationship) ->first(); From 23be63e50e537650edfe435ede7f6f1a389dd69b Mon Sep 17 00:00:00 2001 From: bitbucket Date: Sat, 27 Apr 2024 14:50:33 +0530 Subject: [PATCH 2/7] CHANGE_ in addEmployeeAndDependence API : GWM --- app/Controllers/EmployeeRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 50672f49..cc062a75 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -213,7 +213,7 @@ class EmployeeRestController extends AdminController { $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->createEmployeePolicyData($data[0]->id , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id , $data[0]->basic_cover_si); } From 386fe7fa8a4369603d5e0c23eb7876586e1284fb Mon Sep 17 00:00:00 2001 From: velz Date: Sat, 27 Apr 2024 14:59:00 +0530 Subject: [PATCH 3/7] FIX_ADDON_SI_AMT_FOR_DEPTS --- app/Helpers/excel_util_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index a0c7f2c6..1e98e9fb 100644 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -571,7 +571,8 @@ if (!function_exists('calculate_premimum')) $transformed_familiy_member_data['temp']['band'] = $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['band']; $transformed_familiy_member_data['temp']['maxage'] = $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['maxage']; $transformed_familiy_member_data['temp']['maxcount'] = $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['maxcount']; - $transformed_familiy_member_data['policy_details']['basic_cover_si'] = $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si']; + + $transformed_familiy_member_data['policy_details']['basic_cover_si'] = isset($emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si']) ? $emp_details_with_empband_max_age_max_count[ $transformed_familiy_member_data['emp_code'] ]['si'] : $transformed_familiy_member_data['policy_details']['basic_cover_si']; if( $fileArr['id'] == null || (in_array($grid_type,[10,11]) || $transformed_familiy_member_data['temp']['source'] == 'excel'))//if file id is null then data coming from enrollment (from DB) otherwise data coming from xcel, so calculate only data from excel (new entry) note: even data coming from excel for event dependet additon we fetch other dependts from db and calculate premium for whole family { From b7ddb87b4692c179c152321a26f64fefbbcb830d Mon Sep 17 00:00:00 2001 From: bitbucket Date: Sat, 27 Apr 2024 15:01:45 +0530 Subject: [PATCH 4/7] CHANGE_ in iAgreeForAddOn API : GWM --- app/Controllers/EmployeeRestController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index cc062a75..1a66028d 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -1448,11 +1448,14 @@ public function getAddOnPolicy() public function iAgreeForAddOn() { - $emp_code = $this->request->getPost('emp_code'); + $postData = json_decode($this->request->getBody(), true); $client_policy_id = $postData['client_policy_id']; + $emp_code = $postData['emp_code']; + $client_id = $postData['client_id']; $this->employeeModel->where('emp_code', $emp_code ) + ->where('client_id', $client_id ) ->where('is_active', 1 ) ->set(array('emp_status'=>'enrolled')) ->update(); From 8e3a62e540aab2d0fc4684c27dd17fc20e9f64c7 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Sat, 27 Apr 2024 15:24:35 +0530 Subject: [PATCH 5/7] FIX_FILTER_IN_CLIENT_POLICY : RV --- app/Views/client_policy.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 353f30c6..0dce634e 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -434,11 +434,19 @@ } } else if ($policy_type_value == 2) { if (item.policy_type_id == 4) { + OptionsHTML += ''; + } + } else if ($policy_type_value == 1) { + if (item.policy_type_id == 1 || item.policy_type_id == 2) { + OptionsHTML += ''; } } else { + OptionsHTML += ''; @@ -572,7 +580,7 @@ setTimeout(function() { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); - toastr.warning('Something Wrong!', 'warning'); + console.log('Something Wrong!', 'warning'); }, 1000); } }); @@ -1025,10 +1033,20 @@ $('#tpa').val('').change(); $('#start_date').val(''); $('#end_date').val(''); - $('#base_policy').val('0'); + $('#base_policy').val('').change(); + + if ($(this).val() == 2 || $(this).val() == 3) { + $('#insurer').prop('disabled', true); + $('#tpa').prop('disabled', true); + } else { + $('#insurer').prop('disabled', false); + $('#tpa').prop('disabled', false); + } + + if ($(this).val() == 3) { - toastr.warning('Please Change the Policy Terms after Submit the Policy!', 'warning'); + toastr.warning('Please Change the Policy Terms after Submit the Policy!', 'INFO'); } if ($(this).val() != '1' && $(this).val() != '0') { @@ -1091,7 +1109,7 @@ setTimeout(function() { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); - toastr.warning('Something Wrong!', 'warning'); + console.log('Something Wrong!', 'warning'); }, 1000); } }); @@ -1166,7 +1184,7 @@ setTimeout(function() { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); - toastr.warning('Something Wrong!', 'warning'); + console.log('Something Wrong!', 'warning'); }, 500); } }); From 36dd429b579588d45414872cfcf7d28a721ee0e6 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Sat, 27 Apr 2024 15:43:51 +0530 Subject: [PATCH 6/7] FIX_INSURER_TPA_DISABLE_IN_EDIT_CLIENT_POLICY : RV --- app/Views/client_policy.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 0dce634e..298094bc 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -552,6 +552,14 @@ $('#base_policy').prop('required', false); } + if (res.data.is_addon == 2 || res.data.is_addon == 3) { + $('#insurer').prop('disabled', true); + $('#tpa').prop('disabled', true); + } else { + $('#insurer').prop('disabled', false); + $('#tpa').prop('disabled', false); + } + var policeOptionHTML = ''; $.each(res.policy, function(index, item) { policeOptionHTML += '