From 22a97d335db398512490c14c8c52806b8495691b Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Fri, 30 May 2025 17:13:46 +0530 Subject: [PATCH 1/4] FIX_DEFAULT_TERMS_FOR_EDLI,GDLI --- app/Views/other_policy_terms.php | 430 ++++++++++++++++--------------- 1 file changed, 218 insertions(+), 212 deletions(-) diff --git a/app/Views/other_policy_terms.php b/app/Views/other_policy_terms.php index c65dd325..b3caf451 100755 --- a/app/Views/other_policy_terms.php +++ b/app/Views/other_policy_terms.php @@ -87,25 +87,24 @@ label { -
-
-
- +
+
+ +
+
+ +
+
+
-
- -
-
- -
-
-
-
-
+
+
+
+
-
-
-
+
+ +

@@ -208,6 +207,7 @@ $("#otherPolicyTerms").submit(function(event) { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); }, 1000); + location.reload(); }, error: function(xhr, status, error) { console.error(xhr.responseText); @@ -240,7 +240,6 @@ $('body').on('click', '.btnPolicyMaster', function() { $('#other_client_policy_id').val(client_policy_id); - // appendPolicyTermsHTML(policy_type_id); var gpa_policy_type_id = $(this).attr('id'); // console.log('gpa_policy_type_id', gpa_policy_type_id) @@ -285,7 +284,7 @@ $('body').on('click', '.btnPolicyMaster', function() { } - if (res) { + if (res.data) { //special conditions fields let otherTermsJsonObjectSpecialCondition = JSON.parse(res.data); @@ -320,7 +319,7 @@ $('body').on('click', '.btnPolicyMaster', function() { } - if (!key.startsWith("special_condition") && !key.startsWith("sum_insured") && !key.startsWith("enrollment_display_key") ) { + if (!key.startsWith("special_condition") && !key.startsWith('multiple_sum_insured') && !key.startsWith("sum_insured") && !key.startsWith("enrollment_display_key") ) { termsHTML = `
@@ -400,6 +399,10 @@ $('body').on('click', '.btnPolicyMaster', function() { }); + } else { + + appendPolicyTermsHTML(policy_type_id); + } @@ -523,208 +526,209 @@ function appendPolicyTermsHTML(policy_type) { var termsHTML = "" $('#append_html_for_other_policy_terms').empty(); - // if (policy_type == 7) { + if (policy_type == 7) { - // termsHTML = ` - //
- //
- //
- // - //
- //
- // - //
- //
- // - //
- //
- //
- //
- //
- //
- //
+ //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ //
+ //
+ //
+ //
+ //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- //
- //
- //
- //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
+ //
+ termsHTML = ` - // ` +
+
+
+ +
+
+ +
+
- // } else if (policy_type == 6) { +
+
+ +
+
+ +
+
- // termsHTML = ` +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
- //
+ ` - //
- //
- // - //
- //
- // - //
- //
- // - //
- //
- //
- //
- //
- //
- //
+ } else if (policy_type == 6) { - //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- //
- // - //
- //
- // - //
- //
- - //
- // ` - // } + + //
+ //
+ // + //
+ //
+ // + //
+ //
+ // + //
+ //
+ //
+ //
+ //
+ //
+ //
+ + //
+ termsHTML = ` + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + ` + } $('#append_html_for_other_policy_terms').append(termsHTML); } @@ -734,10 +738,12 @@ function appendOtherSIAddMore(data = null) { const addMoreContainer = document.getElementById('sum_insured_add_more'); + // addMoreContainer.innerHTML = ''; // Clear previous content if needed + console.log(addMoreContainer) const html = ` -
+
From aa67f3dcf96cdc2260cf5f80462343b09566ee4b Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Sat, 31 May 2025 10:08:47 +0530 Subject: [PATCH 2/4] FIX_RACK_RATE --- app/Views/policy_grid.php | 33 ++++++++++++++++++++++------- tests/unit/ExcelMergeHelperTest.php | 4 ++-- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/app/Views/policy_grid.php b/app/Views/policy_grid.php index 69e8e3db..99062cfa 100755 --- a/app/Views/policy_grid.php +++ b/app/Views/policy_grid.php @@ -673,8 +673,12 @@ $('#grid').change(function() if(unit_length == 1 || unit_length == 0){ - $('.unitDiv').hide(); - $('.unitDiv').find('input').removeAttr('required'); + // $('.unitDiv').hide(); + // $('.unitDiv').find('input').removeAttr('required'); + setTimeout(() => { + $('.unitDiv').hide(); + $('.unitDiv input').removeAttr('required'); + }, 1000); // Run after DOM updates }else{ $('.unitDiv').show(); $('.unitDiv').find('input').attr('required', true); @@ -1341,8 +1345,13 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa } if(unit_length == 1 || unit_length == 0){ - $('.unitDiv').hide(); - $('.unitDiv').find('input').removeAttr('required'); + // alert("Hello World"); + // $('.unitDiv').hide(); + // $('.unitDiv').find('input').removeAttr('required'); + setTimeout(() => { + $('.unitDiv').hide(); + $('.unitDiv input').removeAttr('required'); + }, 1000); // Run after DOM updates }else{ $('.unitDiv').show(); $('.unitDiv').find('input').attr('required', true); @@ -1840,8 +1849,12 @@ function appendGridtHtml(ui_type = false, secondary = false, data = false) // Count++ if(unit_length == 1 || unit_length == 0){ - $('.unitDiv').hide(); - $('.unitDiv').find('input').removeAttr('required'); + // $('.unitDiv').hide(); + // $('.unitDiv').find('input').removeAttr('required'); + setTimeout(() => { + $('.unitDiv').hide(); + $('.unitDiv input').removeAttr('required'); + }, 1000); // Run after DOM updates }else{ $('.unitDiv').show(); $('.unitDiv').find('input').attr('required', true); @@ -3936,8 +3949,12 @@ function appendFourthAndSixthRackRate(data = null, uniqueId = null) grid_container.insertAdjacentHTML('beforeend', grid_html); if(unit_length == 1 || unit_length == 0){ - $('.unitDiv').hide(); - $('.unitDiv').find('input').removeAttr('required'); + // $('.unitDiv').hide(); + // $('.unitDiv').find('input').removeAttr('required'); + setTimeout(() => { + $('.unitDiv').hide(); + $('.unitDiv input').removeAttr('required'); + }, 1000); // Run after DOM updates }else{ $('.unitDiv').show(); $('.unitDiv').find('input').attr('required', true); diff --git a/tests/unit/ExcelMergeHelperTest.php b/tests/unit/ExcelMergeHelperTest.php index f543d43a..7220e6c9 100755 --- a/tests/unit/ExcelMergeHelperTest.php +++ b/tests/unit/ExcelMergeHelperTest.php @@ -10,9 +10,9 @@ class ExcelMergeHelperTest extends TestCase { // Use the paths you provided $filePaths = [ - ['file_path' =>WRITEPATH.'uploads/lead_files/Member_Data.xlsx','sheets' => []], + ['file_path' =>'/home/venba/Downloads/RFQ_qw_Office Package_20250326112828.xlsx','sheets' => []], - ['file_path' =>WRITEPATH.'/tmp/RFQ_ABC_GMC_20241220140640.xlsx','sheets' => []], + ['file_path' =>'/home/venba/Downloads/RFQ_qw_Office Package_20250326112828 (copy).xlsx','sheets' => []], // ['file_path' =>'/home/venba/Downloads/Employee_data.xlsx','sheets' => []], ]; From 005345768cd3a48e054d2e1662686df7e428c295 Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Sat, 31 May 2025 11:22:39 +0530 Subject: [PATCH 3/4] HIDE_FIELDS_IN_POST --- app/Views/client_basic_info.php | 6 +- app/Views/client_onboarding.php | 6 +- app/Views/client_policy.php | 196 ++++++++++++++++++-------------- app/Views/policy_gmc_terms.php | 80 ++++++------- 4 files changed, 154 insertions(+), 134 deletions(-) diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index 9e41c616..220164b8 100755 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -125,13 +125,13 @@ input:checked + .slider:before {
-
+ diff --git a/app/Views/client_onboarding.php b/app/Views/client_onboarding.php index 6b4210a4..5327b58b 100755 --- a/app/Views/client_onboarding.php +++ b/app/Views/client_onboarding.php @@ -94,16 +94,16 @@ body { API --> -