From eadd03c45b874a5b452674f3519e86d4f192219b Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 9 May 2024 09:44:11 +0530 Subject: [PATCH] FIX_EMPLOYEE_POLICY_AUTO_SELCTE_POLICY_TYPE_3 : RV --- app/Views/client_policy.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 153628d5..fb5cd99f 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -444,6 +444,7 @@ }, 1000); } }); + }); $(document).ready(function() { @@ -1288,7 +1289,7 @@ } - + var dataId = 0; $(document).ready(function() { $('#base_policy').change(function() { @@ -1297,9 +1298,12 @@ var policy_type = $('#policy_type').val() console.log(client_policy_id); - var dataId = $('#policy').children('option:selected').attr('data-id'); + dataId = $('#policy').children('option:selected').attr('data-id'); console.log('dataId', dataId) + base_policy_data_id = $(this).children('option:selected').attr('data-id'); + console.log('base_policy_data_id', base_policy_data_id); + var queryParams = { client_policy_id: client_policy_id, policy_type: policy_type, @@ -1348,12 +1352,18 @@ $('#policy').html(policeOptionHTML); - if (dataId == 3) { + if (dataId == 3 || policy_type == 1) { + + console.log('step 1') + setTimeout(function() { + console.log('step 2') var $option = $('#policy').find('option[data-id="3"]'); if ($option.length > 0) { + console.log('step 3') $option.prop('selected', true).change(); } else { + console.log('step 4'); toastr.warning('The insurer does not have a GMC-Parents policy.', 'Warning'); } }, 1500);