Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
VENKATESHWARAN 2025-06-02 12:16:46 +05:30
commit 179bc74ce9
8 changed files with 400 additions and 357 deletions

View File

@ -343,7 +343,7 @@ class EmployeeController extends AdminController
$query->where('cr.user_id', $user_id); $query->where('cr.user_id', $user_id);
} }
// ->where('files.created_by', get_session_userid()) // ->where('files.created_by', get_session_userid())
$data['fileList'] = $query->orderBy('files.created_at', 'desc') $data['fileList'] = $query->groupBy("c.id")->orderBy('files.created_at', 'desc')
->limit(100) ->limit(100)
->find(); ->find();
// dd($data['fileList']); // dd($data['fileList']);

View File

@ -125,13 +125,13 @@ input:checked + .slider:before {
</div> </div>
</div> </div>
<div> <!-- <div>
<label class="switch"> <label class="switch">
<input id="is_download_btn" type="checkbox" name="is_download_btn" <?= (isset($client['is_download_btn']) && $client['is_download_btn'] == 1) ? 'checked' : '' ?>> <input id="is_download_btn" type="checkbox" name="is_download_btn" <?php // echo(isset($client['is_download_btn']) && $client['is_download_btn'] == 1) ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span> <span class="slider round" style="height: 27px;"></span>
</label> </label>
<label for="is_download_btn" style=" position: relative;bottom: 5px;">Enable Client Export Option</label> <label for="is_download_btn" style=" position: relative;bottom: 5px;">Enable Client Export Option</label>
</div> </div> -->

View File

@ -94,16 +94,16 @@ body {
<span class="d-none d-sm-inline-block">API</span> <span class="d-none d-sm-inline-block">API</span>
</a> </a>
</li> --> </li> -->
<li class="nav-item"> <!-- <li class="nav-item">
<a href="#others-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2" id="others_tab"> <a href="#others-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2" id="others_tab">
<span class="mr-1"><i class="mdi mdi-tag-text-outline"></i></span> <span class="mr-1"><i class="mdi mdi-tag-text-outline"></i></span>
<span class="d-none d-sm-inline-block">Others</span> <span class="d-none d-sm-inline-block">Others</span>
</a> </a>
</li> </li> -->
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<?php include("client_api.php"); ?> <?php include("client_api.php"); ?>
<?php include('client_others_tab.php'); ?> <?php // include('client_others_tab.php'); ?>
<?php include('notification.php'); ?> <?php include('notification.php'); ?>
<?php include('client_basic_info.php'); ?> <?php include('client_basic_info.php'); ?>
<?php include('client_kyc.php'); ?> <?php include('client_kyc.php'); ?>

View File

@ -16,7 +16,7 @@
<th>Client Branch</th> <th>Client Branch</th>
<th>TPA</th> <th>TPA</th>
<th>Date</th> <th>Date</th>
<th>Enrolment Status</th> <!-- <th>Enrolment Status</th> -->
<th>Status</th> <th>Status</th>
<th>Action</th> <th>Action</th>
</tr> </tr>
@ -136,7 +136,7 @@
<input type="text" class="form-control" placeholder="GST (%)" id="gst_no" name="gst" required> <input type="text" class="form-control" placeholder="GST (%)" id="gst_no" name="gst" required>
</div> </div>
<div class="form-group col-md-4 EB"> <!-- <div class="form-group col-md-4 EB">
<label class="switch" style="position: relative;top: 43px;left: 20px;"> <label class="switch" style="position: relative;top: 43px;left: 20px;">
<input id="inception_type" type="checkbox" name="inception_type"> <input id="inception_type" type="checkbox" name="inception_type">
<span class="slider round" style="height: 27px;"></span> <span class="slider round" style="height: 27px;"></span>
@ -159,7 +159,7 @@
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="reminder_date">Reminder Date<span class="text-danger">*</span></label> <label for="reminder_date">Reminder Date<span class="text-danger">*</span></label>
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Remainder Dates( eg, 28,29,30 )" name="reminder_date" id="reminder_date" > <input value="" type="text" class="form-control dateofdata" placeholder="Enter Remainder Dates( eg, 28,29,30 )" name="reminder_date" id="reminder_date" >
</div> </div> -->
<div class="form-group col-md-12 EB"> <div class="form-group col-md-12 EB">
<label for="disclaimer">Disclaimer<span class="text-danger">*</span></label> <label for="disclaimer">Disclaimer<span class="text-danger">*</span></label>
@ -239,23 +239,23 @@
<script> <script>
$('#inception_type').change(function () { // $('#inception_type').change(function () {
var open_data = $('#open_date').parent(); // var open_data = $('#open_date').parent();
var close_data = $('#close_date').parent(); // var close_data = $('#close_date').parent();
var reminder_data = $('#reminder_date').parent(); // var reminder_data = $('#reminder_date').parent();
if($(this).prop('checked')){ // if($(this).prop('checked')){
$(open_data).show(); // $(open_data).show();
$(close_data).show(); // $(close_data).show();
$(reminder_data).show(); // $(reminder_data).show();
$('.dateofdata').attr('required', true); // $('.dateofdata').attr('required', true);
}else{ // }else{
$(open_data).hide(); // $(open_data).hide();
$(close_data).hide(); // $(close_data).hide();
$(reminder_data).hide(); // $(reminder_data).hide();
$('.dateofdata').attr('required', false); // $('.dateofdata').attr('required', false);
} // }
}) // })
var policy_PrimaryKey = $('#client_id_policy').val(); var policy_PrimaryKey = $('#client_id_policy').val();
var policy_client = $('#policy_PrimaryKey').val(); var policy_client = $('#policy_PrimaryKey').val();
@ -348,28 +348,28 @@
} }
//console.log('search_term :', search_term) //console.log('search_term :', search_term)
var enrollmentStatus = ''; // var enrollmentStatus = '';
if (item.inception_type == 1) { // if (item.inception_type == 1) {
enrollmentStatus = 'N/A' // enrollmentStatus = 'N/A'
} else if (item.inception_type == 2) { // } else if (item.inception_type == 2) {
if (item.open_for_enrollment == 1) { // if (item.open_for_enrollment == 1) {
enrollmentStatus = '<a href="#" data-id="' + item.id + '" id="' + item.policy_id + // enrollmentStatus = '<a href="#" data-id="' + item.id + '" id="' + item.policy_id +
'" class="btnOpenEnroll" data-toggle="tooltip" data-placement="left" title="Click To Close Enrolment">Open</a>' // '" class="btnOpenEnroll" data-toggle="tooltip" data-placement="left" title="Click To Close Enrolment">Open</a>'
} else if (item.open_for_enrollment == 0) { // } else if (item.open_for_enrollment == 0) {
enrollmentStatus = // enrollmentStatus =
'<a href="#" data-toggle="tooltip" data-placement="top" title="Click To Open Enrolment" data-id="' + // '<a href="#" data-toggle="tooltip" data-placement="top" title="Click To Open Enrolment" data-id="' +
item.id + '" id="' + item.policy_id + '" class="btnOpenEnroll">Closed</a>' // item.id + '" id="' + item.policy_id + '" class="btnOpenEnroll">Closed</a>'
} // }
} // }
var tpaValue = 'TPA Unavailable'; var tpaValue = 'TPA Unavailable';
@ -388,7 +388,7 @@
<td>${item.branch_name ? item.branch_name : ' - '}</td> <td>${item.branch_name ? item.branch_name : ' - '}</td>
<td>${tpaValue}</td> <td>${tpaValue}</td>
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td> <td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
<td style="text-align: center;">${(enrollmentStatus)}</td>
<td>${checkDateStatus(item.policy_end_date, 1)}</td> <td>${checkDateStatus(item.policy_end_date, 1)}</td>
<td> <td>
<div class="btn-group dropdown"> <div class="btn-group dropdown">
@ -434,6 +434,7 @@
$('#policy_form')[0].reset(); $('#policy_form')[0].reset();
$('#add_form').show(); $('#add_form').show();
// console.log("Policy Form Added")
$('#table_list').hide(); $('#table_list').hide();
$('.btnBack').show(); $('.btnBack').show();
$('.btnAdd').hide(); $('.btnAdd').hide();
@ -442,9 +443,9 @@
$('#tpa').val('').change(); $('#tpa').val('').change();
$('#policy_no').val('').change(); $('#policy_no').val('').change();
$('#policy_no').val('').change(); $('#policy_no').val('').change();
$('#start_date').val('').change(); // $('#start_date').val('').change();
$('#end_date').val('').change(); // $('#end_date').val('').change();
$('#close_date').val('').change(); // $('#close_date').val('').change();
// $('#policy').html('<option value="" selected>Select Policy</option>').change(); // $('#policy').html('<option value="" selected>Select Policy</option>').change();
$('#policy_form_action').val('<?= base_url("client/policy/create"); ?>'); $('#policy_form_action').val('<?= base_url("client/policy/create"); ?>');
$('#policy_status_field').hide() $('#policy_status_field').hide()
@ -590,31 +591,31 @@
// //console.log('search_term :', search_term) // //console.log('search_term :', search_term)
var enrollmentStatus = ''; // var enrollmentStatus = '';
if (item.inception_type == 1) { // if (item.inception_type == 1) {
enrollmentStatus = 'N/A' // enrollmentStatus = 'N/A'
} else if (item.inception_type == 2) { // } else if (item.inception_type == 2) {
if (item.open_for_enrollment == 1) { // if (item.open_for_enrollment == 1) {
enrollmentStatus = // enrollmentStatus =
'<a data-toggle="tooltip" data-placement="top" title="Click To Close Enrolment" href="#" data-id="' + // '<a data-toggle="tooltip" data-placement="top" title="Click To Close Enrolment" href="#" data-id="' +
item.id + '" id="' + item.policy_id + // item.id + '" id="' + item.policy_id +
'" class="btnOpenEnroll">Open</a>' // '" class="btnOpenEnroll">Open</a>'
} else if (item.open_for_enrollment == 0) { // } else if (item.open_for_enrollment == 0) {
enrollmentStatus = // enrollmentStatus =
'<a data-toggle="tooltip" data-placement="top" title="Click To Open Enrolment" href="#" data-id="' + // '<a data-toggle="tooltip" data-placement="top" title="Click To Open Enrolment" href="#" data-id="' +
item.id + '" id="' + item.policy_id + // item.id + '" id="' + item.policy_id +
'" class="btnOpenEnroll">Closed</a>' // '" class="btnOpenEnroll">Closed</a>'
} // }
} // }
var tpaValue = 'TPA Unavailable'; var tpaValue = 'TPA Unavailable';
@ -632,7 +633,6 @@
<td>${tpaValue}</td> <td>${tpaValue}</td>
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td> <td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
<td style="text-align: center;">${(enrollmentStatus)}</td>
<td>${checkDateStatus(item.policy_end_date, 1)}</td> <td>${checkDateStatus(item.policy_end_date, 1)}</td>
<td> <td>
<div class="btn-group dropdown"> <div class="btn-group dropdown">
@ -725,10 +725,12 @@
$(document).ready(function() { $(document).ready(function() {
/********* set the Policy_Type_id for Form Submit *******/ /********* set the Policy_Type_id for Form Submit *******/
$('#policy_type').change(function() { $('#policy_type').change(function() {
// alert('policy_type change');
var policy_type_id = $(this).val(); var policy_type_id = $(this).val();
// alert(policy_type_id);
if (policy_type_id == 1 || policy_type_id == 6 || policy_type_id == 7) { if (policy_type_id == 1 || policy_type_id == 6 || policy_type_id == 7 || policy_type_id > 10) {
$('#tpa').prop('required', false); $('#tpa').prop('required', false);
$('#tpa_danger').hide() $('#tpa_danger').hide()
} else { } else {
@ -804,19 +806,19 @@
//Open for enrollment yes or no //Open for enrollment yes or no
if (res.data.inception_type == 2) { // if (res.data.inception_type == 2) {
$('#inception_type').prop('checked', true); // $('#inception_type').prop('checked', true);
$('#open_date').parent().show(); // $('#open_date').parent().show();
$('#close_date').parent().show(); // $('#close_date').parent().show();
$('#reminder_date').parent().show(); // $('#reminder_date').parent().show();
$('.dateofdata').attr('required', true); // $('.dateofdata').attr('required', true);
} else { // } else {
$('#inception_type').prop('checked', false); // $('#inception_type').prop('checked', false);
$('#open_date').parent().hide(); // $('#open_date').parent().hide();
$('#close_date').parent().hide(); // $('#close_date').parent().hide();
$('#reminder_date').parent().hide(); // $('#reminder_date').parent().hide();
$('.dateofdata').attr('required', false); // $('.dateofdata').attr('required', false);
} // }
//Policy Visibility in Web App //Policy Visibility in Web App
if (res.data.enrolment_visibility == 1) { if (res.data.enrolment_visibility == 1) {
@ -904,7 +906,8 @@
$('#third').show(); $('#third').show();
$('#base_policy_id').hide(); $('#base_policy_id').hide();
$('#base_policy').prop('required', false); $('#base_policy').prop('required', false);
$("#tpa").prop('required', false);
$('#tpa_danger').hide();
$(".EB").hide(); $(".EB").hide();
} }
@ -1451,13 +1454,28 @@
$('#base_danger').hide(); $('#base_danger').hide();
} }
if($('#inception_type').prop('checked')){ if ($(this).val() > 7) {
$('#first').show();
$('#second').show();
$('#third').show();
$('#base_policy_id').hide();
$('#base_policy').prop('required', false);
$(".EB").hide();
setTimeout(() => {
$("#tpa").prop('required', false);
$('#tpa_danger').hide();
}, 100);
}else{
$('#open_date').parent().hide();
$('#close_date').parent().hide();
$('#reminder_date').parent().hide();
} }
// if($('#inception_type').prop('checked')){
// }else{
// $('#open_date').parent().hide();
// $('#close_date').parent().hide();
// $('#reminder_date').parent().hide();
// }
}) })
@ -1530,6 +1548,7 @@
$(document).ready(function() { $(document).ready(function() {
$('#base_policy').change(function() { $('#base_policy').change(function() {
// alert('Base Policy Change');
var client_policy_id = $(this).val() ? $(this).val() : 0; var client_policy_id = $(this).val() ? $(this).val() : 0;
var policy_type = $('#policy_type').val() var policy_type = $('#policy_type').val()
@ -1882,19 +1901,19 @@
$('#policy_status_field').show(); $('#policy_status_field').show();
if (res.data.inception_type == 2) { // if (res.data.inception_type == 2) {
$('#inception_type').prop('checked', true); // $('#inception_type').prop('checked', true);
$('#open_date').parent().show(); // $('#open_date').parent().show();
$('#close_date').parent().show(); // $('#close_date').parent().show();
$('#reminder_date').parent().show(); // $('#reminder_date').parent().show();
$('.dateofdata').attr('required', true); // $('.dateofdata').attr('required', true);
} else { // } else {
$('#inception_type').prop('checked', false); // $('#inception_type').prop('checked', false);
$('#open_date').parent().hide(); // $('#open_date').parent().hide();
$('#close_date').parent().hide(); // $('#close_date').parent().hide();
$('#reminder_date').parent().hide(); // $('#reminder_date').parent().hide();
$('.dateofdata').attr('required', false); // $('.dateofdata').attr('required', false);
} // }
if (res.data.enrolment_visibility == 1) { if (res.data.enrolment_visibility == 1) {
@ -2002,7 +2021,8 @@
$('#third').show(); $('#third').show();
$('#base_policy_id').hide(); $('#base_policy_id').hide();
$('#base_policy').prop('required', false); $('#base_policy').prop('required', false);
$("#tpa").prop('required', false);
$('#tpa_danger').hide();
$(".EB").hide(); $(".EB").hide();
} }

View File

@ -87,8 +87,7 @@ label {
<input type="hidden" name="client_policy_id" id="other_client_policy_id" /> <input type="hidden" name="client_policy_id" id="other_client_policy_id" />
<input type="hidden" name="policy_id" id="gpa_policy_id" /> <input type="hidden" name="policy_id" id="gpa_policy_id" />
<input type="hidden" id="emp_count" /> <input type="hidden" id="emp_count" />
<div class="row" style="margin-bottom: 10px;"> <div id="sumInsuredDiv" class="row" style="margin-bottom: 10px;">
<div id="sumInsuredDiv">
<div class="col-md-6"> <div class="col-md-6">
<label for="sumInsured">Sum Insured</label> <label for="sumInsured">Sum Insured</label>
</div> </div>
@ -104,8 +103,8 @@ label {
<div id='numberToWordOthers' class="text-danger-2" ></div> <div id='numberToWordOthers' class="text-danger-2" ></div>
</div> </div>
</div> </div>
<div id="sum_insured_add_more" ></div>
</div> <div style="margin-top: 10px;margin-bottom:15px;" id="sum_insured_add_more" ></div>
<div id="append_html_for_other_policy_terms"></div> <div id="append_html_for_other_policy_terms"></div>
<hr> <hr>
@ -208,6 +207,7 @@ $("#otherPolicyTerms").submit(function(event) {
$('.loader').fadeOut(); $('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow'); $('.loader-mask').delay(350).fadeOut('slow');
}, 1000); }, 1000);
location.reload();
}, },
error: function(xhr, status, error) { error: function(xhr, status, error) {
console.error(xhr.responseText); console.error(xhr.responseText);
@ -240,7 +240,6 @@ $('body').on('click', '.btnPolicyMaster', function() {
$('#other_client_policy_id').val(client_policy_id); $('#other_client_policy_id').val(client_policy_id);
// appendPolicyTermsHTML(policy_type_id);
var gpa_policy_type_id = $(this).attr('id'); var gpa_policy_type_id = $(this).attr('id');
// console.log('gpa_policy_type_id', gpa_policy_type_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 //special conditions fields
let otherTermsJsonObjectSpecialCondition = JSON.parse(res.data); 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 = ` termsHTML = `
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
@ -400,6 +399,10 @@ $('body').on('click', '.btnPolicyMaster', function() {
}); });
} else {
appendPolicyTermsHTML(policy_type_id);
} }
@ -523,11 +526,9 @@ function appendPolicyTermsHTML(policy_type) {
var termsHTML = "" var termsHTML = ""
$('#append_html_for_other_policy_terms').empty(); $('#append_html_for_other_policy_terms').empty();
// if (policy_type == 7) { if (policy_type == 7) {
// termsHTML = `
// <div class="form-group">
// <div class="row" style="margin-bottom: 10px;"> // <div class="row" style="margin-bottom: 10px;">
// <div class="col-md-6"> // <div class="col-md-6">
@ -547,105 +548,105 @@ function appendPolicyTermsHTML(policy_type) {
// </div> // </div>
// <div id="sum_insured_add_more" ></div> // <div id="sum_insured_add_more" ></div>
termsHTML = `
// <div class="row" style="margin-bottom: 10px;"> <div class="form-group">
// <div class="col-md-6"> <div class="row" style="margin-bottom: 10px;">
// <label for="totalSumInsured">Policy Type</label> <div class="col-md-6">
// </div> <label for="totalSumInsured">Policy Type</label>
// <div class="col-md-6"> </div>
// <input type="text" name="policy_type" id="policy_type" class="form-control"> <div class="col-md-6">
// </div> <input type="text" name="policy_type" id="policy_type" class="form-control">
// </div> </div>
</div>
// <div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="totalSumInsured">Existing Insurer</label> <label for="totalSumInsured">Existing Insurer</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="existing_insurer" id="existing_insurer" class="form-control"> <input type="text" name="existing_insurer" id="existing_insurer" class="form-control">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="renewal_lives">Renewal Lives</label> <label for="renewal_lives">Renewal Lives</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="renewal_lives" id="renewal_lives" class="form-control"> <input type="text" name="renewal_lives" id="renewal_lives" class="form-control">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="totalSumInsured">Total Sum Assured</label> <label for="totalSumInsured">Total Sum Assured</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" style="width: 100% !important;" class="form-control" name="total_sum_insured" <input type="text" style="width: 100% !important;" class="form-control" name="total_sum_insured"
// id="total_sum_insured" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)"> id="total_sum_insured" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)">
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <div id='numberToWordTotalSumInsured' class="text-danger-2"></div> <div id='numberToWordTotalSumInsured' class="text-danger-2"></div>
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="lives_at_inception">Lives at Inception</label> <label for="lives_at_inception">Lives at Inception</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="lives_at_inception" id="lives_at_inception" class="form-control"> <input type="text" name="lives_at_inception" id="lives_at_inception" class="form-control">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="totalSumInsured">Total Sum Insured at Inception</label> <label for="totalSumInsured">Total Sum Insured at Inception</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="total_sum_insured_at_inception" id="total_sum_insured_at_inception" <input type="text" name="total_sum_insured_at_inception" id="total_sum_insured_at_inception"
// class="form-control" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)"> class="form-control" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="totalSumInsured">Premium at Inception (Excl GST)</label> <label for="totalSumInsured">Premium at Inception (Excl GST)</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="premium_at_inception" id="premium_at_inception" class="form-control"> <input type="text" name="premium_at_inception" id="premium_at_inception" class="form-control">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="coverage">Coverage</label> <label for="coverage">Coverage</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="coverage " id="coverage" class="form-control"> <input type="text" name="coverage " id="coverage" class="form-control">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="free_cover_limit">Free Cover Limit</label> <label for="free_cover_limit">Free Cover Limit</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="free_cover_limit" id="free_cover_limit" class="form-control"> <input type="text" name="free_cover_limit" id="free_cover_limit" class="form-control">
// </div> </div>
// </div> </div>
// </div> </div>
// ` `
// } else if (policy_type == 6) { } else if (policy_type == 6) {
// termsHTML = `
// <div class="form-group EDLI">
// <div class="row" style="margin-bottom: 10px;"> // <div class="row" style="margin-bottom: 10px;">
// <div class="col-md-6"> // <div class="col-md-6">
@ -665,66 +666,69 @@ function appendPolicyTermsHTML(policy_type) {
// </div> // </div>
// <div id="sum_insured_add_more" ></div> // <div id="sum_insured_add_more" ></div>
termsHTML = `
// <div class="row" style="margin-bottom: 10px;"> <div class="form-group EDLI">
// <div class="col-md-6">
// <label for="totalSumInsured">Existing Insurer</label>
// </div>
// <div class="col-md-6">
// <input type="text" name="existing_insurer" id="existing_insurer" class="form-control">
// </div>
// </div>
// <div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="renewal_lives">Renewal Lives</label> <label for="totalSumInsured">Existing Insurer</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="renewal_lives" id="renewal_lives" class="form-control"> <input type="text" name="existing_insurer" id="existing_insurer" class="form-control">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="lives_at_inception">Lives at Inception</label> <label for="renewal_lives">Renewal Lives</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="lives_at_inception" id="lives_at_inception" class="form-control"> <input type="text" name="renewal_lives" id="renewal_lives" class="form-control">
// </div> </div>
// </div> </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="totalSumInsured">Total Sum Insured at Inception</label> <label for="lives_at_inception">Lives at Inception</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="total_sum_insured_at_inception" id="total_sum_insured_at_inception" <input type="text" name="lives_at_inception" id="lives_at_inception" class="form-control">
// class="form-control" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)"> </div>
// </div> </div>
// </div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="coverage">Coverage</label> <label for="totalSumInsured">Total Sum Insured at Inception</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="coverage " id="coverage" class="form-control"> <input type="text" name="total_sum_insured_at_inception" id="total_sum_insured_at_inception"
// </div> class="form-control" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)">
// </div> </div>
</div>
// <div class="row" style="margin-bottom: 10px;display:true;"> <div class="row" style="margin-bottom: 10px;display:true;">
// <div class="col-md-6"> <div class="col-md-6">
// <label for="free_cover_limit">Free Cover Limit for Base Cover</label> <label for="coverage">Coverage</label>
// </div> </div>
// <div class="col-md-6"> <div class="col-md-6">
// <input type="text" name="free_cover_limit_for_base_cover" id="free_cover_limit_for_base_cover" class="form-control"> <input type="text" name="coverage " id="coverage" class="form-control">
// </div> </div>
// </div> </div>
// </div> <div class="row" style="margin-bottom: 10px;display:true;">
<div class="col-md-6">
<label for="free_cover_limit">Free Cover Limit for Base Cover</label>
</div>
<div class="col-md-6">
<input type="text" name="free_cover_limit_for_base_cover" id="free_cover_limit_for_base_cover" class="form-control">
</div>
</div>
// ` </div>
// }
`
}
$('#append_html_for_other_policy_terms').append(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'); const addMoreContainer = document.getElementById('sum_insured_add_more');
// addMoreContainer.innerHTML = ''; // Clear previous content if needed
console.log(addMoreContainer) console.log(addMoreContainer)
const html = ` const html = `
<div class="row" style="margin-bottom: 10px;"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<label for="sumInsured">Additional Sum Insured</label> <label for="sumInsured">Additional Sum Insured</label>
</div> </div>

View File

@ -169,11 +169,11 @@
style="width: 35%;;" type="number" name="self_max_age" id="self_max_age" style="width: 35%;;" type="number" name="self_max_age" id="self_max_age"
onchange="lowerIsEighteen(this)"></div> onchange="lowerIsEighteen(this)"></div>
</td> </td>
<td style="width: 11%;"><span class="self-age" <!-- <td style="width: 11%;"><span class="self-age"
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td> style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td>
<td style="width: 11%;"><input class="self-age" type="checkbox" <td style="width: 11%;"><input class="self-age" type="checkbox"
style="margin-right: 70px;" name="is_payable_employee_for_self" style="margin-right: 70px;" name="is_payable_employee_for_self"
id="is_payable_employee_for_self"> </td> id="is_payable_employee_for_self"> </td> -->
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -202,11 +202,11 @@
style="width: 35%;;" type="number" name="spouse_max_age" id="spouse_max_age" style="width: 35%;;" type="number" name="spouse_max_age" id="spouse_max_age"
onchange="lowerIsEighteen(this)"></div> onchange="lowerIsEighteen(this)"></div>
</td> </td>
<td style="width: 11%;"><span class="spouse-age" <!-- <td style="width: 11%;"><span class="spouse-age"
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td> style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td>
<td style="width: 11%;"><input class="spouse-age" type="checkbox" <td style="width: 11%;"><input class="spouse-age" type="checkbox"
style="margin-right: 70px;" name="is_payable_employee_for_spouse" style="margin-right: 70px;" name="is_payable_employee_for_spouse"
id="is_payable_employee_for_spouse"> </td> id="is_payable_employee_for_spouse"> </td> -->
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -241,11 +241,11 @@
style="width: 35%;;" type="number" name="child_max_age" id="child_max_age" style="width: 35%;;" type="number" name="child_max_age" id="child_max_age"
oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div> oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div>
</td> </td>
<td style="width: 11%;"><span class="child-age" <!-- <td style="width: 11%;"><span class="child-age"
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td> style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span></td>
<td style="width: 11%;"><input class="child-age" type="checkbox" <td style="width: 11%;"><input class="child-age" type="checkbox"
style="margin-right: 70px;" name="is_payable_employee_for_child" style="margin-right: 70px;" name="is_payable_employee_for_child"
id="is_payable_employee_for_child"> </td> id="is_payable_employee_for_child"> </td> -->
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -304,12 +304,12 @@
name="other_member_max_age" id="other_member_max_age" name="other_member_max_age" id="other_member_max_age"
onchange="lowerIsEighteen(this)"></div> onchange="lowerIsEighteen(this)"></div>
</td> </td>
<td style="width: 11%;"><span class="other-member-age" <!-- <td style="width: 11%;"><span class="other-member-age"
style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span> style="margin-right: 20px;font-size: 12px;">Is Payable by employee:</span>
</td> </td>
<td style="width: 11%;"><input class="other-member-age" type="checkbox" <td style="width: 11%;"><input class="other-member-age" type="checkbox"
style="margin-right: 70px;" name="is_payable_employee_for_elders" style="margin-right: 70px;" name="is_payable_employee_for_elders"
id="is_payable_employee_for_elders"> </td> id="is_payable_employee_for_elders"> </td> -->
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1373,46 +1373,46 @@
$('#other_member_max_age').val(jsonObject[key].elders.max); $('#other_member_max_age').val(jsonObject[key].elders.max);
} }
if (key.includes("is_payable_employee")) { // if (key.includes("is_payable_employee")) {
if (jsonObject[key]) { // if (jsonObject[key]) {
if (jsonObject[key].self == 0) { // if (jsonObject[key].self == 0) {
$('#is_payable_employee_for_self').prop('checked', // $('#is_payable_employee_for_self').prop('checked',
false); // false);
} else { // } else {
$('#is_payable_employee_for_self').prop('checked', // $('#is_payable_employee_for_self').prop('checked',
true); // true);
} // }
if (jsonObject[key].spouse == 0) { // if (jsonObject[key].spouse == 0) {
$('#is_payable_employee_for_spouse').prop('checked', // $('#is_payable_employee_for_spouse').prop('checked',
false); // false);
} else { // } else {
$('#is_payable_employee_for_spouse').prop('checked', // $('#is_payable_employee_for_spouse').prop('checked',
true); // true);
} // }
if (jsonObject[key].childern == 0) { // if (jsonObject[key].childern == 0) {
$('#is_payable_employee_for_child').prop('checked', // $('#is_payable_employee_for_child').prop('checked',
false); // false);
} else { // } else {
$('#is_payable_employee_for_child').prop('checked', // $('#is_payable_employee_for_child').prop('checked',
true); // true);
} // }
if (jsonObject[key].elders == 0) { // // if (jsonObject[key].elders == 0) {
$('#is_payable_employee_for_elders').prop('checked', // // $('#is_payable_employee_for_elders').prop('checked',
false); // // false);
} else { // // } else {
$('#is_payable_employee_for_elders').prop('checked', // // $('#is_payable_employee_for_elders').prop('checked',
true); // // true);
} // // }
} // }
} // }
if (key.includes("enrollment_display_key") && key != "") { if (key.includes("enrollment_display_key") && key != "") {

View File

@ -673,8 +673,12 @@ $('#grid').change(function()
if(unit_length == 1 || unit_length == 0){ if(unit_length == 1 || unit_length == 0){
// $('.unitDiv').hide();
// $('.unitDiv').find('input').removeAttr('required');
setTimeout(() => {
$('.unitDiv').hide(); $('.unitDiv').hide();
$('.unitDiv').find('input').removeAttr('required'); $('.unitDiv input').removeAttr('required');
}, 1000); // Run after DOM updates
}else{ }else{
$('.unitDiv').show(); $('.unitDiv').show();
$('.unitDiv').find('input').attr('required', true); $('.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){ if(unit_length == 1 || unit_length == 0){
// alert("Hello World");
// $('.unitDiv').hide();
// $('.unitDiv').find('input').removeAttr('required');
setTimeout(() => {
$('.unitDiv').hide(); $('.unitDiv').hide();
$('.unitDiv').find('input').removeAttr('required'); $('.unitDiv input').removeAttr('required');
}, 1000); // Run after DOM updates
}else{ }else{
$('.unitDiv').show(); $('.unitDiv').show();
$('.unitDiv').find('input').attr('required', true); $('.unitDiv').find('input').attr('required', true);
@ -1840,8 +1849,12 @@ function appendGridtHtml(ui_type = false, secondary = false, data = false)
// Count++ // Count++
if(unit_length == 1 || unit_length == 0){ if(unit_length == 1 || unit_length == 0){
// $('.unitDiv').hide();
// $('.unitDiv').find('input').removeAttr('required');
setTimeout(() => {
$('.unitDiv').hide(); $('.unitDiv').hide();
$('.unitDiv').find('input').removeAttr('required'); $('.unitDiv input').removeAttr('required');
}, 1000); // Run after DOM updates
}else{ }else{
$('.unitDiv').show(); $('.unitDiv').show();
$('.unitDiv').find('input').attr('required', true); $('.unitDiv').find('input').attr('required', true);
@ -3936,8 +3949,12 @@ function appendFourthAndSixthRackRate(data = null, uniqueId = null)
grid_container.insertAdjacentHTML('beforeend', grid_html); grid_container.insertAdjacentHTML('beforeend', grid_html);
if(unit_length == 1 || unit_length == 0){ if(unit_length == 1 || unit_length == 0){
// $('.unitDiv').hide();
// $('.unitDiv').find('input').removeAttr('required');
setTimeout(() => {
$('.unitDiv').hide(); $('.unitDiv').hide();
$('.unitDiv').find('input').removeAttr('required'); $('.unitDiv input').removeAttr('required');
}, 1000); // Run after DOM updates
}else{ }else{
$('.unitDiv').show(); $('.unitDiv').show();
$('.unitDiv').find('input').attr('required', true); $('.unitDiv').find('input').attr('required', true);

View File

@ -10,9 +10,9 @@ class ExcelMergeHelperTest extends TestCase
{ {
// Use the paths you provided // Use the paths you provided
$filePaths = [ $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' => []], // ['file_path' =>'/home/venba/Downloads/Employee_data.xlsx','sheets' => []],
]; ];