CODE_MERGE : RV
This commit is contained in:
commit
d5befa4529
@ -55,8 +55,8 @@ $routes->group("/client", ["filter" => "authMVC"], function($routes){
|
|||||||
$routes->post("create", "ClientController::createClientPolicy");
|
$routes->post("create", "ClientController::createClientPolicy");
|
||||||
$routes->post("edit", "ClientController::editClientPolicy");
|
$routes->post("edit", "ClientController::editClientPolicy");
|
||||||
$routes->get("list/(:any)", "ClientController::getClientPolicyById/$1");
|
$routes->get("list/(:any)", "ClientController::getClientPolicyById/$1");
|
||||||
$routes->post("jsonPost", "ClientController::jsonPost");
|
$routes->post("policyGMCTerms", "ClientController::policyGMCTerms");
|
||||||
$routes->get("getjson", "ClientController::getjson");
|
$routes->get("getterms", "ClientController::getterms");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->group("kyc", ["filter" => "authMVC"], function($routes){
|
$routes->group("kyc", ["filter" => "authMVC"], function($routes){
|
||||||
|
|||||||
@ -661,15 +661,15 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function jsonPost()
|
public function policyGMCTerms()
|
||||||
{
|
{
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->myLogger->logme('error','JSon CREATE function called');
|
$this->myLogger->logme('error','Terms CREATE function called');
|
||||||
// print_r($this->request->getPost());
|
// print_r($this->request->getPost());
|
||||||
$client_id = $this->request->getPost("client_id");
|
$client_id = $this->request->getPost("client_id");
|
||||||
$policy_id = $this->request->getPost("policy_id");
|
$policy_id = $this->request->getPost("policy_id");
|
||||||
$data['sumInsured'] =$this->request->getPost("sumInsured");
|
$data['sum_insured'] =$this->request->getPost("sum_insured");
|
||||||
$data['family_floater'] =$this->request->getPost("family_floater");
|
$data['family_floater'] =$this->request->getPost("family_floater");
|
||||||
// print_r($data['familyfloater']);
|
// print_r($data['familyfloater']);
|
||||||
if (!$data['family_floater'] || $data['family_floater'] == 0) {
|
if (!$data['family_floater'] || $data['family_floater'] == 0) {
|
||||||
@ -697,7 +697,9 @@ class ClientController extends AdminController
|
|||||||
$data['waiverof1,2,3&4thyearexclusions'] =$this->request->getPost("waiverof1,2,3&4thyearexclusions");
|
$data['waiverof1,2,3&4thyearexclusions'] =$this->request->getPost("waiverof1,2,3&4thyearexclusions");
|
||||||
$data['waiverof30dayswaitingperiod'] =$this->request->getPost("waiverof30dayswaitingperiod");
|
$data['waiverof30dayswaitingperiod'] =$this->request->getPost("waiverof30dayswaitingperiod");
|
||||||
$data['prehospitalizationcover'] =$this->request->getPost("prehospitalizationcover");
|
$data['prehospitalizationcover'] =$this->request->getPost("prehospitalizationcover");
|
||||||
|
// $data['posthospitalizationcover'] =$this->request->getPost("posthospitalizationcover");
|
||||||
$data['congenitaldiseasesinternal'] =$this->request->getPost("congenitaldiseasesinternal");
|
$data['congenitaldiseasesinternal'] =$this->request->getPost("congenitaldiseasesinternal");
|
||||||
|
// $data['congenitaldiseasesexternal'] =$this->request->getPost("congenitaldiseasesexternal");
|
||||||
$data['copayzonewisecopay'] =$this->request->getPost("copayzonewisecopay");
|
$data['copayzonewisecopay'] =$this->request->getPost("copayzonewisecopay");
|
||||||
$data['bioabsorbablestenttoriclensmultifocallens'] =$this->request->getPost("bioabsorbablestenttoriclensmultifocallens");
|
$data['bioabsorbablestenttoriclensmultifocallens'] =$this->request->getPost("bioabsorbablestenttoriclensmultifocallens");
|
||||||
$data['roomrentlimit'] =$this->request->getPost("roomrentlimit");
|
$data['roomrentlimit'] =$this->request->getPost("roomrentlimit");
|
||||||
@ -721,13 +723,13 @@ class ClientController extends AdminController
|
|||||||
$data['Wellness'] =$this->request->getPost("Wellness");
|
$data['Wellness'] =$this->request->getPost("Wellness");
|
||||||
$data['days_of_discharge'] =$this->request->getPost("days_of_discharge");
|
$data['days_of_discharge'] =$this->request->getPost("days_of_discharge");
|
||||||
$data['days_from_dod'] =$this->request->getPost("days_from_dod");
|
$data['days_from_dod'] =$this->request->getPost("days_from_dod");
|
||||||
$data['specialConditionLabel'] = $this->request->getPost("specialConditionLabel") ?? [];
|
$data['special_condition_label'] = $this->request->getPost("special_condition_label") ?? [];
|
||||||
$data['specialConditionInput'] = $this->request->getPost("specialConditionInput") ?? [];
|
$data['special_condition_input'] = $this->request->getPost("special_condition_input") ?? [];
|
||||||
|
|
||||||
|
|
||||||
$jsonData = json_encode($data);
|
$jsonData = json_encode($data);
|
||||||
$dataa = array(
|
$dataa = array(
|
||||||
'json' => $jsonData,
|
'policy_terms' => $jsonData,
|
||||||
'client_id' => $client_id,
|
'client_id' => $client_id,
|
||||||
'policy_id' => $policy_id
|
'policy_id' => $policy_id
|
||||||
);
|
);
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
.jodit-container{
|
.jodit-container{
|
||||||
width: 690px !important;
|
width: 821px !important;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
@ -70,15 +70,10 @@
|
|||||||
width: 689px;
|
width: 689px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="modal fade" id="bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
||||||
<div class="modal-dialog modal-full-width">
|
|
||||||
<div class="modal-content" style="border-radius: 10px;">
|
|
||||||
<div class="modal-header" style="background-color: #02a8b5; border-top-right-radius: 10px;border-top-left-radius: 10px;">
|
|
||||||
<h4 class="modal-title" id="myLargeModalLabel" style="color: white;">Client Policy Master</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
|
<div id="policyGMCTerms" style="display:none">
|
||||||
|
<span id="policyGMCTermsClose" style="float: right;font-size: 26px;color: red;margin-top: -42px;margin-left: 3px;margin-right: 7px;">x</span>
|
||||||
|
<h5><label for="gmcTerms" style="margin-bottom: 20px;">Policy GMC Terms</label></h5>
|
||||||
<form role="form" class="parsley-examples" method="post" id="policyJsonForm" enctype="multipart/form-data" >
|
<form role="form" class="parsley-examples" method="post" id="policyJsonForm" enctype="multipart/form-data" >
|
||||||
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
|
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
|
||||||
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
|
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
|
||||||
@ -89,7 +84,7 @@
|
|||||||
<div class="form-column">
|
<div class="form-column">
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Sum Insured</label>
|
<label for="emp_code" class=" " style="width: 400px;">Sum Insured</label>
|
||||||
<input type="text" name="sumInsured" id="sumInsured" class="form-control form-control-client-policy-master">
|
<input type="text" name="sum_insured" id="sum_insured" class="form-control form-control-client-policy-master">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
<label class=" " style="width: 400px;">Family Floater</label><br>
|
<label class=" " style="width: 400px;">Family Floater</label><br>
|
||||||
@ -99,14 +94,20 @@
|
|||||||
<input type="radio" name="family_floater" value="0" style="margin-left:10px"> No
|
<input type="radio" name="family_floater" value="0" style="margin-left:10px"> No
|
||||||
</div>
|
</div>
|
||||||
<div style="display:none; margin-top: 27px;margin-bottom: 7px; margin-left: 31px;">
|
<div style="display:none; margin-top: 27px;margin-bottom: 7px; margin-left: 31px;">
|
||||||
|
<div>
|
||||||
<input type="checkbox" name="family_floaters[]" value="Self" id="Self"> Self
|
<input type="checkbox" name="family_floaters[]" value="Self" id="Self"> Self
|
||||||
<input type="checkbox" name="family_floaters[]" value="Spouse" id="Spouse"> Spouse
|
<input type="checkbox" name="family_floaters[]" value="Spouse" id="Spouse"> Spouse
|
||||||
<input type="checkbox" name="family_floaters[]" value="Child1" id="Child1"> Child 1
|
<input type="checkbox" name="family_floaters[]" value="Child1" id="Child1"> Child 1
|
||||||
<input type="checkbox" name="family_floaters[]" value="Child2" id="Child2"> Child 2
|
<input type="checkbox" name="family_floaters[]" value="Child2" id="Child2"> Child 2
|
||||||
<input type="checkbox" name="family_floaters[]" value="Child3" id="Child3"> Child 3
|
<input type="checkbox" name="family_floaters[]" value="Child3" id="Child3"> Child 3
|
||||||
<input type="checkbox" name="family_floaters[]" value="Child4" id="Child4"> Child 4
|
<input type="checkbox" name="family_floaters[]" value="Child4" id="Child4"> Child 4
|
||||||
|
</div>
|
||||||
|
<div style="margin-top:10px">
|
||||||
<input type="checkbox" name="family_floaters[]" value="Parent1" id="Parent1"> Parent 1
|
<input type="checkbox" name="family_floaters[]" value="Parent1" id="Parent1"> Parent 1
|
||||||
<input type="checkbox" name="family_floaters[]" value="Parent2" id="Parent2"> Parent 2
|
<input type="checkbox" name="family_floaters[]" value="Parent2" id="Parent2"> Parent 2
|
||||||
|
<input type="checkbox" name="family_floaters[]" value="Parent_In_Law1" id="Parent_In_Law1"> Parent-In-Law 1
|
||||||
|
<input type="checkbox" name="family_floaters[]" value="Parent_In_Law2" id="Parent_In_Law2"> Parent-In-Law 2
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -170,6 +171,10 @@
|
|||||||
<label for="emp_code" class=" " style="width: 400px;">Pre Hospitalization Cover</label>
|
<label for="emp_code" class=" " style="width: 400px;">Pre Hospitalization Cover</label>
|
||||||
<input type="text" name="prehospitalizationcover" id="prehospitalizationcover" class="form-control form-control-client-policy-master">
|
<input type="text" name="prehospitalizationcover" id="prehospitalizationcover" class="form-control form-control-client-policy-master">
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Post Hospitalization Cover</label>
|
||||||
|
<input type="text" name="posthospitalizationcover" id="posthospitalizationcover" class="form-control form-control-client-policy-master">
|
||||||
|
</div> -->
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
<label class="form-check-label " for="congenitaldiseasesinternal" style="width: 400px;">Congenital Diseases - Internal</label>
|
<label class="form-check-label " for="congenitaldiseasesinternal" style="width: 400px;">Congenital Diseases - Internal</label>
|
||||||
<div class="radiobuttondiv">
|
<div class="radiobuttondiv">
|
||||||
@ -177,6 +182,10 @@
|
|||||||
<input type="radio" name="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No
|
<input type="radio" name="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="congenitaldiseasesexternal" style="width: 400px;">Congenital Diseases - External</label>
|
||||||
|
<input type="text" name="congenitaldiseasesexternal" id="congenitaldiseasesexternal" class="form-control form-control-client-policy-master">
|
||||||
|
</div> -->
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
<label for="copayzonewisecopay" class=" " style="width: 400px;">Co-Pay/Zone wise Co Pay</label>
|
<label for="copayzonewisecopay" class=" " style="width: 400px;">Co-Pay/Zone wise Co Pay</label>
|
||||||
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control form-control-client-policy-master">
|
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control form-control-client-policy-master">
|
||||||
@ -319,8 +328,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- <hr> -->
|
<!-- <hr> -->
|
||||||
|
|
||||||
<!-- <div class="form-row" id="grid_content_input">
|
<!-- <div class="form-row" id="grid_content_input">
|
||||||
@ -333,9 +344,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.modal-content -->
|
|
||||||
</div><!-- /.modal-dialog -->
|
|
||||||
</div><!-- /.modal -->
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -346,7 +355,7 @@ var grid_html = '';
|
|||||||
$('#btnGridSubmit').hide();
|
$('#btnGridSubmit').hide();
|
||||||
$('.close').click(function(){
|
$('.close').click(function(){
|
||||||
|
|
||||||
$('#sumInsured').val("");
|
$('#sum_insured').val("");
|
||||||
$('#familyfloater').val("");
|
$('#familyfloater').val("");
|
||||||
$('#waiverofpreexistingdiseases').prop('checked', false);
|
$('#waiverofpreexistingdiseases').prop('checked', false);
|
||||||
$('#maternitycoverage').val("");
|
$('#maternitycoverage').val("");
|
||||||
@ -357,6 +366,9 @@ var grid_html = '';
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('input[name="family_floater"]').change(function() {
|
$('input[name="family_floater"]').change(function() {
|
||||||
console.log($(this).val());
|
console.log($(this).val());
|
||||||
if ($(this).val() == '1') {
|
if ($(this).val() == '1') {
|
||||||
@ -372,47 +384,44 @@ var grid_html = '';
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// $(document).ready(function() {
|
||||||
|
|
||||||
$(document).ready(function() {
|
// if ($('input[name="waiverofpreexistingdiseases"]').val() == '1') {
|
||||||
|
// var element = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next()[0];
|
||||||
if ($('input[name="waiverofpreexistingdiseases"]').val() == '1') {
|
// $(element).css("display", "");
|
||||||
var element = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next()[0];
|
// var element2 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next()[0];
|
||||||
$(element).css("display", "");
|
// $(element2).css("display", "");
|
||||||
var element2 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next()[0];
|
// var element3 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next()[0];
|
||||||
$(element2).css("display", "");
|
// $(element3).css("display", "");
|
||||||
var element3 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next()[0];
|
// var element4 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next().next()[0];
|
||||||
$(element3).css("display", "");
|
// $(element4).css("display", "");
|
||||||
var element4 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next().next()[0];
|
// } else {
|
||||||
$(element4).css("display", "");
|
// var element = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next()[0];
|
||||||
} else {
|
// $(element).css("display", "none");
|
||||||
var element = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next()[0];
|
// var element2 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next()[0];
|
||||||
$(element).css("display", "none");
|
// $(element2).css("display", "none");
|
||||||
var element2 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next()[0];
|
// var element3 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next()[0];
|
||||||
$(element2).css("display", "none");
|
// $(element3).css("display", "none");
|
||||||
var element3 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next()[0];
|
// var element4 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next().next()[0];
|
||||||
$(element3).css("display", "none");
|
// $(element4).css("display", "none");
|
||||||
var element4 = $('input[name="waiverofpreexistingdiseases"]').parent().parent().next().next().next().next()[0];
|
// }
|
||||||
$(element4).css("display", "none");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($('input[name="family_floater"]').val() == '1') {
|
|
||||||
var element = $('input[name="family_floater"]').parent().next()[0];
|
|
||||||
$(element).css("display", "");
|
|
||||||
var element2 = $('input[name="family_floater"]').parent().parent().parent().next()[0];
|
|
||||||
$(element2).css("display", "");
|
|
||||||
} else {
|
|
||||||
var element = $('input[name="family_floater"]').parent().next()[0];
|
|
||||||
$(element).css("display", "none");
|
|
||||||
var element2 = $('input[name="family_floater"]').parent().parent().parent().next()[0];
|
|
||||||
$(element2).css("display", "none");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
// console.log("Family_floater");
|
||||||
|
// console.log($('input[name="family_floater"]').val());
|
||||||
|
// if ($('input[name="family_floater"]').val() == '1') {
|
||||||
|
// var element = $('input[name="family_floater"]').parent().next()[0];
|
||||||
|
// $(element).css("display", "");
|
||||||
|
// var element2 = $('input[name="family_floater"]').parent().parent().parent().next()[0];
|
||||||
|
// $(element2).css("display", "");
|
||||||
|
// } else {
|
||||||
|
// var element = $('input[name="family_floater"]').parent().next()[0];
|
||||||
|
// $(element).css("display", "none");
|
||||||
|
// var element2 = $('input[name="family_floater"]').parent().parent().parent().next()[0];
|
||||||
|
// $(element2).css("display", "none");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
$('input[name="waiverofpreexistingdiseases"]').change(function() {
|
$('input[name="waiverofpreexistingdiseases"]').change(function() {
|
||||||
console.log("test 739 line.....");
|
|
||||||
console.log($(this).val());
|
|
||||||
if ($(this).val() == '1') {
|
if ($(this).val() == '1') {
|
||||||
var element = $(this).parent().parent().next()[0];
|
var element = $(this).parent().parent().next()[0];
|
||||||
$(element).css("display", "");
|
$(element).css("display", "");
|
||||||
@ -435,6 +444,10 @@ var grid_html = '';
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#policyJsonForm").submit(function(event) {
|
$("#policyJsonForm").submit(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var isValid = $('#policyJsonForm').parsley().validate();
|
var isValid = $('#policyJsonForm').parsley().validate();
|
||||||
@ -444,7 +457,7 @@ var grid_html = '';
|
|||||||
}
|
}
|
||||||
|
|
||||||
var formData = new FormData($('#policyJsonForm')[0]);
|
var formData = new FormData($('#policyJsonForm')[0]);
|
||||||
var policy_form_action = '<?= base_url("client/policy/jsonPost") ?>';
|
var policy_form_action = '<?= base_url("client/policy/policyGMCTerms") ?>';
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: formData,
|
data: formData,
|
||||||
@ -459,7 +472,7 @@ var grid_html = '';
|
|||||||
toastr.error('Policy Dose Not Create', 'Error');
|
toastr.error('Policy Dose Not Create', 'Error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.querySelectorAll('.specialConditionLabel\\[\\]').forEach(element => {
|
document.querySelectorAll('.special_condition_label\\[\\]').forEach(element => {
|
||||||
element.parentNode.remove();
|
element.parentNode.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -474,37 +487,38 @@ var grid_html = '';
|
|||||||
console.error(status, error);
|
console.error(status, error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('#policyGMCTerms').css('display', 'none');
|
||||||
|
$('#police-tab').css('display', '');
|
||||||
|
$('.nav.nav-pills.navtab-bg').css('display','');
|
||||||
|
$('.nav.nav-pills.navtab-bg').prev().css('display','');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('body').on('click', '.btnPolicyMaster', function () {
|
$('body').on('click', '.btnPolicyMaster', function () {
|
||||||
|
|
||||||
var policy_id = $(this).data('id');
|
var policy_id = $(this).data('id');
|
||||||
// console.log('policy_id :' ,policy_id);
|
|
||||||
$('#policy_id').val(policy_id);
|
$('#policy_id').val(policy_id);
|
||||||
|
|
||||||
var client_id = $('#Client_id').val();
|
var client_id = $('#Client_id').val();
|
||||||
$('#client_policy_id').val(policy_id);
|
$('#client_policy_id').val(policy_id);
|
||||||
|
|
||||||
// console.log('client_id :' ,client_id);
|
|
||||||
|
$('#policyGMCTerms').css('display', '');
|
||||||
|
$('#police-tab').css('display', 'none');
|
||||||
|
$('.nav.nav-pills.navtab-bg').css('display','none');
|
||||||
|
$('.nav.nav-pills.navtab-bg').prev().css('display','none');
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url("client/policy/getjson") ?>',
|
url: '<?= base_url("client/policy/getterms") ?>',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { policy_id : policy_id , client_id: client_id},
|
data: { policy_id : policy_id , client_id: client_id},
|
||||||
|
|
||||||
// dataType: 'json',
|
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
|
||||||
// let jsonString = response.substring(response.indexOf('{'), response.lastIndexOf('}') + 1);
|
|
||||||
// console.log(jsonString);
|
|
||||||
if (response) {
|
if (response) {
|
||||||
let jsonObject = JSON.parse(response);
|
let jsonObject = JSON.parse(response);
|
||||||
// console.log(jsonObject);
|
|
||||||
Object.keys(jsonObject).forEach(function(key) {
|
Object.keys(jsonObject).forEach(function(key) {
|
||||||
|
if (key.includes("special_condition_label") || key.includes("special_condition_input")) {
|
||||||
if (key.includes("specialConditionLabel") || key.includes("specialConditionInput")) {
|
if (key.includes("special_condition_label")) {
|
||||||
if (key.includes("specialConditionLabel")) {
|
|
||||||
for (let index = 0; index < jsonObject[key].length; index++) {
|
for (let index = 0; index < jsonObject[key].length; index++) {
|
||||||
specialCondition();
|
specialCondition();
|
||||||
}
|
}
|
||||||
@ -520,6 +534,7 @@ var grid_html = '';
|
|||||||
|
|
||||||
if (key.includes("family_floaters")) {
|
if (key.includes("family_floaters")) {
|
||||||
let checkboxes = document.querySelectorAll(`input[name="${key}[]"]`);
|
let checkboxes = document.querySelectorAll(`input[name="${key}[]"]`);
|
||||||
|
if (jsonObject[key]) {
|
||||||
jsonObject[key].forEach(element => {
|
jsonObject[key].forEach(element => {
|
||||||
let checkbox = $(`#${element}`);
|
let checkbox = $(`#${element}`);
|
||||||
if (checkbox.is(":checkbox")) {
|
if (checkbox.is(":checkbox")) {
|
||||||
@ -528,16 +543,38 @@ var grid_html = '';
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let elements = document.getElementsByName(key);
|
let elements = document.getElementsByName(key);
|
||||||
if (elements && elements.length > 0) {
|
if (elements && elements.length > 0) {
|
||||||
let element = elements[0]; // Assuming you want to update the first element with the name
|
let element = elements[0]; // Assuming you want to update the first element with the name
|
||||||
|
|
||||||
|
|
||||||
if (element.tagName === 'INPUT' && (element.type === 'checkbox' || element.type === 'radio')) {
|
if (element.tagName === 'INPUT' && (element.type === 'checkbox' || element.type === 'radio')) {
|
||||||
|
|
||||||
if (element.type === 'checkbox') {
|
if (element.type === 'checkbox') {
|
||||||
element.checked = jsonObject[key] === '1'; // Assuming jsonObject[key] is '1' or '0' for checkbox
|
element.checked = jsonObject[key] === '1'; // Assuming jsonObject[key] is '1' or '0' for checkbox
|
||||||
} else if (element.type === 'radio') {
|
} else if (element.type === 'radio') {
|
||||||
|
|
||||||
|
if (element.value === jsonObject[key]) {
|
||||||
element.checked = element.value === jsonObject[key];
|
element.checked = element.value === jsonObject[key];
|
||||||
|
|
||||||
|
if(element.name === "family_floater") {
|
||||||
|
element.parentElement.nextElementSibling.style.display='';
|
||||||
|
element.parentElement.parentElement.parentElement.nextElementSibling.style.display='';
|
||||||
|
}else if(element.name === "waiverofpreexistingdiseases"){
|
||||||
|
element.parentElement.parentElement.nextElementSibling.style.display='';
|
||||||
|
element.parentElement.parentElement.nextElementSibling.nextElementSibling.style.display='';
|
||||||
|
element.parentElement.parentElement.nextElementSibling.nextElementSibling.nextElementSibling.style.display='';
|
||||||
|
element.parentElement.parentElement.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.style.display='';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
element.nextElementSibling.checked = element.value ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else if(key === "Wellness" || key === "additionalsicknessbenefit"){
|
}else if(key === "Wellness" || key === "additionalsicknessbenefit"){
|
||||||
let wysiwygElement = element.previousElementSibling.querySelector('.jodit-wysiwyg');
|
let wysiwygElement = element.previousElementSibling.querySelector('.jodit-wysiwyg');
|
||||||
@ -557,6 +594,13 @@ var grid_html = '';
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$('.jodit-wysiwyg').each(function() {
|
||||||
|
$(this).click();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
@ -564,27 +608,356 @@ var grid_html = '';
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// $.ajax({
|
||||||
|
// url: '<?= base_url("util/policy-premium") ?>' ,
|
||||||
|
// type: "GET",
|
||||||
|
// data: { policy_id: policy_id, client_id: client_id },
|
||||||
|
// dataType: 'json',
|
||||||
|
// success: function (res) {
|
||||||
|
// console.log('responce :', res);
|
||||||
|
|
||||||
|
// if (res.status === false) {
|
||||||
|
// toastr.error(res.status);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// var policy_grid_id_value = '';
|
||||||
|
// if (res.premiumData && res.premiumData.length > 0 && res.premiumData[0].policy_grid_id) {
|
||||||
|
// policy_grid_id_value = res.premiumData[0].policy_grid_id;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $('#grid_content_input').empty();
|
||||||
|
// var policeGridOptionHTML = '';
|
||||||
|
// policeGridOptionHTML += ` <option value="">Select Premium Type</option>`;
|
||||||
|
// $.each(res.data, function(index, item) {
|
||||||
|
// policeGridOptionHTML += '<option data-id="'+ item.ui_type +'" value="' + item.id + '" ' + (policy_grid_id_value === item.id ? 'selected="selected"' : '') + '>' + item.policy_grid_type + '</option>';
|
||||||
|
// });
|
||||||
|
// $('#grid').html(policeGridOptionHTML);
|
||||||
|
|
||||||
|
|
||||||
|
// console.log('Length', res.premiumData.length)
|
||||||
|
// if (res.premiumData && res.premiumData.length > 0) {
|
||||||
|
|
||||||
|
// addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id);
|
||||||
|
|
||||||
|
// res.premiumData.shift();
|
||||||
|
// console.log(res.premiumData)
|
||||||
|
// $.each(res.premiumData, function(index, item){
|
||||||
|
// console.log('premiumData index :',index)
|
||||||
|
// appendGridtHtml(item.policy_grid_id, item);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// } else {
|
||||||
|
// console.log("res.premiumData is undefined, null, or empty.");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $('#bs-example-modal-sm').modal('show');
|
||||||
|
// },
|
||||||
|
// error: function (xhr, status, error) {
|
||||||
|
// console.error(xhr.responseText);
|
||||||
|
// console.error(status, error);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var Count = 1
|
||||||
|
function appendGridtHtml(ui_type = false, data = false,) {
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
console.log('appendGridtHtml function called ');
|
||||||
|
// console.log('Grid Content',data)
|
||||||
|
console.log('UI TYPE :', ui_type);
|
||||||
|
Count++;
|
||||||
|
var container = document.getElementById('grid_content_input');
|
||||||
|
|
||||||
|
if(ui_type == '3'){
|
||||||
|
|
||||||
|
html = `
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-5">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="gpa_si" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-5">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="gpa_premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more_${Count}" onclick="appendGridtHtml(3)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
}else if(ui_type == '4'){
|
||||||
|
|
||||||
|
|
||||||
|
html =`
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">From Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_from : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter From Age" name="age_from[]" id="age_from" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">To Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_from : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter TO Age" name="age_to[]" id="age_to" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more_${Count}" onclick="appendGridtHtml(4)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
}else if(ui_type == '5'){
|
||||||
|
|
||||||
|
|
||||||
|
html = `
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="sum_insured" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">From Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_from : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter From Age" name="age_from[]" id="age_from" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">To Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_to : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter TO Age" name="age_to[]" id="age_to" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more_${Count}" onclick="appendGridtHtml(5)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
}else if(ui_type == '6'){
|
||||||
|
|
||||||
|
html =`
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="sum_insured" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">From Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_from : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter From Age" name="age_from[]" id="age_from" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">To Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_to : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter TO Age" name="age_to[]" id="age_to" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more" onclick="appendGridtHtml(6)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
}else if(ui_type == '7'){
|
||||||
|
|
||||||
|
html = `
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="sum_insured" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">From Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_from : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter From Age" name="age_from[]" id="age_from" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">To Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_to : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter TO Age" name="age_to[]" id="age_to" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more" onclick="appendGridtHtml(7)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
}else if(ui_type == '8'){
|
||||||
|
|
||||||
|
html = `
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="sum_insured" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Grade/Band</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.grade : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Grade/Band " name="grade[]" id="grade" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more" onclick="appendGridtHtml(8)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
}else if(ui_type == '9'){
|
||||||
|
|
||||||
|
html = `
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="sum_insured" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Grade/Band</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.grade : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Grade/Band " name="grade[]" id="grade" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more" onclick="appendGridtHtml(9)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
}else if(ui_type == '10'){
|
||||||
|
|
||||||
|
html = `
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="sum_insured" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">From Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_from : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter From Age" name="age_from[]" id="age_from" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">To Age</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.age_to : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter TO Age" name="age_to[]" id="age_to" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more" onclick="appendGridtHtml(10)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
}else if(ui_type == '11'){
|
||||||
|
|
||||||
|
html = `
|
||||||
|
<div class="form-row" id="removeChild_${Count}">
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">Sum Insured</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Sum Insured" name="si[]" id="sum_insured" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Grade/Band</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.grade : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Grade/Band " name="grade[]" id="grade" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="mobile">Premium</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.premium : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Premium" name="premium[]" id="premium" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label for="mobile">Max SI</label>
|
||||||
|
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control form-control-client-policy-master" placeholder="Enter Max SI" name="max_si" id="max_si[]" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-primary" id="gmc_add_more" onclick="appendGridtHtml(11)">+</button>
|
||||||
|
<button style="margin-top: 29px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
container.insertAdjacentHTML('beforeend', html);
|
||||||
|
$('#gmc_add_more').hide()
|
||||||
|
$('#gmc_remove').show()
|
||||||
|
// console.log('count 1',Count)
|
||||||
|
Count--
|
||||||
|
// console.log('count 2',Count)
|
||||||
|
$('#gmc_add_more_'+Count).hide()
|
||||||
|
Count++
|
||||||
|
// console.log('count 3',Count)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function removebutton(index, type) {
|
||||||
|
|
||||||
|
if(index == 0){
|
||||||
|
var inputs = document.querySelectorAll('#grid_'+ type +' input');
|
||||||
|
inputs.forEach(function(input) {
|
||||||
|
input.value = '';
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
|
||||||
|
var element = document.getElementById('removeChild_'+ index);
|
||||||
|
var gridContentDiv = document.getElementById('grid_content_input');
|
||||||
|
var count = gridContentDiv.childElementCount;
|
||||||
|
|
||||||
|
if (element) {
|
||||||
|
element.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count == 2){
|
||||||
|
$('#gmc_add_more').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
index--;
|
||||||
|
$('#gmc_add_more_'+index).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Jodit RTE -->
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
var editor = new Jodit('#additionalsicknessbenefit', {
|
var editor = new Jodit('#additionalsicknessbenefit', {
|
||||||
buttons: 'bold,italic,underline,|,align',
|
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var editor = new Jodit('#Wellness', {
|
var editor = new Jodit('#Wellness', {
|
||||||
buttons: 'bold,italic,underline,|,align',
|
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
document.getElementById('myButtonSpecialCondition').addEventListener('click', function(event) {
|
document.getElementById('myButtonSpecialCondition').addEventListener('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
specialCondition();
|
specialCondition();
|
||||||
@ -595,8 +968,8 @@ var grid_html = '';
|
|||||||
if (count === 0) {
|
if (count === 0) {
|
||||||
var index =$('.modifyclassinput').length;
|
var index =$('.modifyclassinput').length;
|
||||||
var appendElement =`<div class="form-group col-md-6 form-group-client-policy-masters">
|
var appendElement =`<div class="form-group col-md-6 form-group-client-policy-masters">
|
||||||
<label for="specialconditionlabel" class="specialConditionLabel[]" style="width: 400px;"><input name="specialConditionLabel[]" id="specialConditionLabel[]"><span class="specialConditionClose" style="color: red;margin-left: 20px;">X</span></label>
|
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 400px;"><input name="special_condition_label[]" id="special_condition_label[]"><span class="specialConditionClose" style="color: red;margin-left: 20px;">X</span></label>
|
||||||
<input type="text" name="specialConditionInput[]" id="specialConditionInput[]" class="form-control form-control-client-policy-masters specialConditionInput[]">
|
<input type="text" name="special_condition_input[]" id="special_condition_input[]" class="form-control form-control-client-policy-masters special_condition_input[]">
|
||||||
</div>`;
|
</div>`;
|
||||||
$('.form-column').each(function() {
|
$('.form-column').each(function() {
|
||||||
$(this).append(appendElement);
|
$(this).append(appendElement);
|
||||||
@ -613,4 +986,12 @@ var grid_html = '';
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('click', '#policyGMCTermsClose', function() {
|
||||||
|
$('#policyGMCTerms').css('display', 'none');
|
||||||
|
$('#police-tab').css('display', '');
|
||||||
|
$('.nav.nav-pills.navtab-bg').css('display','');
|
||||||
|
$('.nav.nav-pills.navtab-bg').prev().css('display','');
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user