diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 31a86c45..fb5cd99f 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -444,6 +444,7 @@ }, 1000); } }); + }); $(document).ready(function() { @@ -1101,6 +1102,10 @@ gpaSumInsureMultiplier(input); } + if (input.id == 'gpa_sum_si2') { + gpaSumInsureMultiplier(input); + } + // if(input.id == 'basic_pay'){ // var inputNumber = input.value; // if (inputNumber) { @@ -1284,7 +1289,7 @@ } - + var dataId = 0; $(document).ready(function() { $('#base_policy').change(function() { @@ -1293,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, @@ -1344,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); diff --git a/app/Views/policy_grid.php b/app/Views/policy_grid.php index dbbfe035..7a80de32 100644 --- a/app/Views/policy_grid.php +++ b/app/Views/policy_grid.php @@ -69,7 +69,6 @@ $('.close').click(function() { for (var i = 1; i <= 13; i++) { $('#grid_' + i).remove(); } - }); @@ -86,7 +85,6 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa var selectElement = event.target; var selectedOption = selectElement.options[selectElement.selectedIndex]; dataIdValue = selectedOption.getAttribute('data-id'); - // console.log('dataIdValue', dataIdValue) } @@ -99,20 +97,59 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa grid_html = `
-
+ +
-
- + +