1485 lines
68 KiB
PHP
Executable File
1485 lines
68 KiB
PHP
Executable File
<!-- Modal content for the Large example -->
|
||
<style>
|
||
.underline-input {
|
||
border: none;
|
||
border-bottom: 1px solid grey; /* Underline style */
|
||
outline: none; /* Remove default focus outline */
|
||
padding: 2px 5px; /* Adjust padding (top/bottom right/left) */
|
||
font-size: 16px; /* Adjust font size */
|
||
}
|
||
|
||
.button-like {
|
||
display: inline-block;
|
||
padding: 8px 15px;
|
||
background-color: #02a8b5;
|
||
color: white;
|
||
text-decoration: none;
|
||
border-radius: 2px;
|
||
cursor: pointer;
|
||
margin-right: -85px;
|
||
}
|
||
|
||
.radiobuttondiv {
|
||
margin-left: 32px;
|
||
}
|
||
|
||
/* .{
|
||
width:62% !important;
|
||
margin-left: 30px;
|
||
margin-top: 3px
|
||
} */
|
||
/* .form-group.col-md-6 */
|
||
.form-group-client-policy-master {
|
||
display: -webkit-box;
|
||
max-width: 100% !important;
|
||
/* border:1px solid; */
|
||
/* background-color: #0001; */
|
||
}
|
||
|
||
.form-group-client-policy-masters {
|
||
display: -webkit-box;
|
||
max-width: 100% !important;
|
||
}
|
||
|
||
.flex-container {
|
||
display: block;
|
||
/* flex-wrap: wrap; */
|
||
/* align-items: center; Align items vertically center */
|
||
}
|
||
|
||
.flex-container>div {
|
||
flex: 1;
|
||
/* Each div takes equal space */
|
||
}
|
||
|
||
label {
|
||
padding-top: 7px;
|
||
width: 400px;
|
||
/* background-color: #0001; */
|
||
height: 36px;
|
||
/* text-align: center; */
|
||
}
|
||
|
||
.jodit-status-bar {
|
||
display: none;
|
||
}
|
||
|
||
/* .jodit-container{
|
||
width: 821px !important;
|
||
margin-top: 3px;
|
||
margin-bottom: 3px;
|
||
margin-left: 30px;
|
||
height: 0px !important;
|
||
min-height: 100px !important;
|
||
} */
|
||
.input-group {
|
||
width: 64.5% !important;
|
||
}
|
||
|
||
.input-group-append-client-policy-master {
|
||
margin-top: 3px;
|
||
}
|
||
|
||
.jodit-wysiwyg {
|
||
margin-bottom: 162px;
|
||
}
|
||
|
||
.s {
|
||
/* margin-left: 30px;
|
||
width: 689px; */
|
||
margin-left: 141px;
|
||
width: 576px;
|
||
}
|
||
</style>
|
||
|
||
|
||
|
||
<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 Terms <span id="nameOfThePolicyInGMC"></span></label></h5>
|
||
<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" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>" />
|
||
<input type="hidden" name="client_policy_id" id="gmc_client_policy_id" />
|
||
<input type="hidden" name="policy_id" id="policy_id" />
|
||
<input type="hidden" id="gmc_emp_count" />
|
||
|
||
<div class="form-group">
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="sumInsured">Sum Insured</label>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<input style="width: 128%;" type="text" name="sum_insured" id="sum_insured" class="form-control" onkeypress = "return onlyNumbers(event)" onkeyup=" formatNumber(this); si_keup_num_to_word(this)">
|
||
</div>
|
||
<div class="col-md-2" style="position: relative;left: 88px;">
|
||
<button type="button" class="btn btn-primary si-add-more" onclick="appendGMCSIAddMore()">+</button>
|
||
</div>
|
||
<div class="col-md-6">
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div id='numberToWordGMC' class="text-danger-2" ></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="gmc_si_add_more"></div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Family Floater</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="family_floater" class="family_floater" value="1"> Yes
|
||
<input type="radio" name="family_floater" class="family_floater" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
<div class="col-md-6">
|
||
</div>
|
||
<div class="col-md-6" style="margin-bottom:10px">
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<td style="width: 11%;"><span style="margin-right: 20px;">Self:</span></td>
|
||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;" name="family_floaters[]" value="self" id="self" checked> </td>
|
||
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo (isset($self_min_age) && $self_min_age > 0) ? $self_min_age : '18'; ?>" style="width: 35%;;" type="number" name="self_min_age" id="self_min_age" onchange="lowerIsEighteen(this)"></div></td>
|
||
<td style="width: 28%;" ><div class="self-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($self_max_age) ? $self_max_age : '60'; ?>" style="width: 35%;;" type="number" name="self_max_age" id="self_max_age" onchange="lowerIsEighteen(this)"></div></td>
|
||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||
<tr>
|
||
<td style="width: 11%;"><span style="margin-right: 20px;">Spouse:</span></td>
|
||
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;"name="family_floaters[]" value="spouse" id="spouse"></td>
|
||
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($spouse_min_age) ? $spouse_min_age : '18'; ?>" style="width: 35%;;" type="number" name="spouse_min_age" id="spouse_min_age" onchange="lowerIsEighteen(this)"></div></td>
|
||
<td style="width: 28%;" ><div class="spouse-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($spouse_max_age) ? $spouse_max_age : '60'; ?>" style="width: 35%;;" type="number" name="spouse_max_age" id="spouse_max_age" onchange="lowerIsEighteen(this)"></div></td>
|
||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||
<tr>
|
||
<td style="width: 11%;"><span for="children">Children:</span></td>
|
||
<td style="width: 11%;"><select name="family_floaters[]" id="children">
|
||
<option value="0">None</option>
|
||
<option value="1">1</option>
|
||
<option value="2">2</option>
|
||
<option value="3">3</option>
|
||
<option value="4">4</option>
|
||
</select>
|
||
</td>
|
||
<td style="width: 28%;" ><div class="child-age"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($child_min_age) ? $child_min_age : '0'; ?>" style="width: 35%;;" type="number" name="child_min_age" id="child_min_age" oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div></td>
|
||
<td style="width: 28%;" ><div class="child-age"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($child_max_age) ? $child_max_age : '25'; ?>" 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></td>
|
||
</tr><tr><td></td></tr><tr><td></td></tr><tr><td></td></tr>
|
||
</tbody>
|
||
</table>
|
||
<div style="margin-top:10px">
|
||
|
||
</div>
|
||
<div style="margin-top:10px">
|
||
|
||
|
||
</div>
|
||
<div style="margin-top:10px">
|
||
<span for="family_floaters">Select Other Members:</span>
|
||
<select name="family_floaters[]" id="family_floaters" style="margin-left: 10px;">
|
||
<option value="0">None</option>
|
||
<option value="1P">Only one parent (Either Father / Mother)</option>
|
||
<option value="2P">Only two parents (Father+Mother)</option>
|
||
<option value="1PIL">Only one parent in law (Either MIL / FIL)</option>
|
||
<option value="2PIL">Only two parents in law (FIL + MIL)</option>
|
||
<option value="2EPORPIL">Parents or PIL (Any two of Father, Mother, MIl, FIL)</option>
|
||
<option value="EPORPIL">Either Parents or PIL (Parents or Parents In Law)</option>
|
||
<option value="4EPORPIL">Parents + PIL (Father + Mother + MIL + FIL)</option>
|
||
</select>
|
||
</div>
|
||
<div style="margin-top:10px">
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<td style="width: 22%;" ><div class="other-member-age"><span style="margin-right: 20px;">Elders Count:</span><input class="underline-input" id="member_count" style="width: 30%; width: 30%;background: lightgray;" type="number" name="elder_member_count" id="member_count" readonly></div></td>
|
||
<td style="width: 28%;" ><div class="other-member-age" style="margin-left: 32px;"><span style="margin-right: 20px;">Min Age:</span><input class="underline-input min_age" value="<?php echo isset($other_member_min_age) ? $other_member_min_age : '18'; ?>" style="width: 35%;;" type="number" class="underline-input min_age" name="other_member_min_age" id="other_member_min_age" onchange="lowerIsEighteen(this)"></div></td>
|
||
<td style="width: 28%;" ><div class="other-member-age" style="margin-left: 17px;"><span style="margin-right: 20px;">Max Age:</span><input class="underline-input max_age" value="<?php echo isset($other_member_max_age) ? $other_member_max_age : '60'; ?>" style="width: 35%;;" type="number" class="underline-input max_age" name="other_member_max_age" id="other_member_max_age" onchange="lowerIsEighteen(this)"></div></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<hr>
|
||
|
||
<!-- <div class="row" style="margin-bottom: 10px;display:none;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Corporate Buffer</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="corporatebuffer" value="1"> Yes
|
||
<input type="radio" name="corporatebuffer" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div> -->
|
||
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Waiver of Pre-existing Diseases</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="waiverofpreexistingdiseases" class="waiverofpreexistingdiseases" value="1"> Yes, waived off
|
||
<input type="radio" name="waiverofpreexistingdiseases" class="waiverofpreexistingdiseases" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Maternity Coverage</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="maternitycoverage" id="maternitycoverage" class="form-control">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Twin Delivery</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="twindelivery" id="twindelivery" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Pre and Post natal</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="preandpostnatal" id="preandpostnatal" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Baby Day 1 Cover</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="babyday1cover" id="babyday1cover" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">9-month waiting Period –waived</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="9monthwaitingperiodwaived" class="9monthwaitingperiodwaived" value="1"> Yes, waived off
|
||
<input type="radio" name="9monthwaitingperiodwaived" class="9monthwaitingperiodwaived" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Cover from the date of Joining</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="coverfromthedateofjoining" id="coverfromthedateofjoining" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Waiver of 1, 2, 3 & 4th year Exclusions</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" class="waiverof1234thyearexclusions" value="1"> Yes, waived off
|
||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" class="waiverof1234thyearexclusions" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Waiver of 30 days waiting period</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="waiverof30dayswaitingperiod" class="waiverof30dayswaitingperiod" value="1"> Yes, waived off
|
||
<input type="radio" name="waiverof30dayswaitingperiod" class="waiverof30dayswaitingperiod" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Pre Hospitalization Cover</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="prehospitalizationcover" id="prehospitalizationcover" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Post Hospitalization Cover</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="posthospitalizationcover" id="posthospitalizationcover" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Congenital Diseases - Internal</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="congenitaldiseasesinternal" class="congenitaldiseasesinternal" value="internal"> Internal Covered
|
||
<input type="radio" name="congenitaldiseasesinternal" class="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Congenital Diseases - External</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="congenitaldiseasesexternal" id="congenitaldiseasesexternal" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Co-Pay/Zone wise Co Pay</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control ">
|
||
<option value="">Select an option</option>
|
||
<option value="Nil">Nil</option>
|
||
<option value="5%">5%</option>
|
||
<option value="10%">10%</option>
|
||
<option value="15%">15%</option>
|
||
<option value="20%">20%</option>
|
||
<option value="25%">25%</option>
|
||
<option value="30%">30%</option>
|
||
<option value="35%">35%</option>
|
||
<option value="40%">40%</option>
|
||
<option value="45%">45%</option>
|
||
<option value="50%">50%</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Optional Parental Co-Pay</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<select name="optionalparentalcopay" id="optionalparentalcopay" class="form-control ">
|
||
<option value="">Select an option</option>
|
||
<option value="Nil">Nil</option>
|
||
<option value="5%">5%</option>
|
||
<option value="10%">10%</option>
|
||
<option value="15%">15%</option>
|
||
<option value="20%">20%</option>
|
||
<option value="25%">25%</option>
|
||
<option value="30%">30%</option>
|
||
<option value="35%">35%</option>
|
||
<option value="40%">40%</option>
|
||
<option value="45%">45%</option>
|
||
<option value="50%">50%</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Bio absorbable stent / Toric lens/ Multi Focal lens</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="bioabsorbablestenttoriclensmultifocallens" id="bioabsorbablestenttoriclensmultifocallens" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Room Rent Limit</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="roomrentlimit" id="roomrentlimit" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Proportionate Deduction Clause</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<select name="proportionatedeductionclause" id="proportionatedeductionclause" class="form-control ">
|
||
<option value="">Select an option</option>
|
||
<option value="NotApplicable/WaivedOff">Not Applicable / Waived Off</option>
|
||
<option value="Applicable">Applicable</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- <div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Nursing Allowance</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="nursingallowance" id="nursingallowance" class="form-control ">
|
||
</div>
|
||
</div> -->
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Ailment capping</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="ailmentcapping" class="ailmentcapping" value="1"> Yes
|
||
<input type="radio" name="ailmentcapping" class="ailmentcapping" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Corporate Buffer</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="corporatebuffer" id="corporatebuffer" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Sublimit of Corporate Buffer</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="sublimitofcorporatebuffer" id="sublimitofcorporatebuffer" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Ambulance Charges</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="ambulancecharges" id="ambulancecharges" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Air Ambulance</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="airambulance" id="airambulance" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Family Transportation Benefit</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="familytransportationbenefit" id="familytransportationbenefit" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Reasonable and Customary Charges</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="reasonableandcustomarycharges" class="reasonableandcustomarycharges" value="1">Applicable
|
||
<input type="radio" name="reasonableandcustomarycharges" class="reasonableandcustomarycharges" value="0" style="margin-left:10px">Not Applicable
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Day Care Treatment</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="daycaretreatment" class="daycaretreatment" value="1"> Yes
|
||
<input type="radio" name="daycaretreatment" class="daycaretreatment" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">AYUSH treatment cover</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="ayudhtreatmentcover" class="ayudhtreatmentcover" value="1"> Yes
|
||
<input type="radio" name="ayudhtreatmentcover" class="ayudhtreatmentcover" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">AYUSH treatment cover Limit</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="ayushTreatmentCoverData" id="ayushTreatmentCoverData" class="form-control">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">ARMD Covered</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="armdcovered" id="armdcovered" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Sum Insured enhancement</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="suminsuredenhancement" class="suminsuredenhancement" value="1"> Yes
|
||
<input type="radio" name="suminsuredenhancement" class="suminsuredenhancement" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Automatic Sum Insured reinstatement</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="automaticsuminsuredreinstatement" id="automaticsuminsuredreinstatement" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Additional Sickness Benefit</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<textarea name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control "></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Lasik Surgery</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="lasiksurgery" id="lasiksurgery" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Mid Term inclusion</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="midterminclusion" id="midterminclusion" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">CAPD</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="capd" id="capd" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Organ donor expenses</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="organdonorexpenses" id="organdonorexpenses" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Modern treatments as per IRDAI</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="moderntreatmentsasperirdai" id="moderntreatmentsasperirdai" class="form-control ">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Wellness</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<textarea name="Wellness" id="Wellness" class="form-control "></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Claim Intimation Clause</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" id="days_of_discharge" name="days_of_discharge" class="form-control " placeholder="Enter the number of days">
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Claim Submission</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" id="days_from_dod" name="days_from_dod" class="form-control " placeholder="Enter the number of days">
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Cataract</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="radio" name="cataract" class="cataract" value="1"> Yes
|
||
<input type="radio" name="cataract" class="cataract" value="0" style="margin-left:10px"> No
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||
<div class="col-md-6">
|
||
<label for="totalSumInsured">Cataract Limit</label>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<input type="text" name="cataractData" id="cataractData" class="form-control">
|
||
</div>
|
||
</div>
|
||
|
||
<hr>
|
||
|
||
<div class="form-column" id="grid_content_input">
|
||
</div>
|
||
|
||
<br>
|
||
|
||
</div>
|
||
<div class="form-group text-right m-b-0" style="margin-top: -49px;" id="group_btn_1">
|
||
<a href="#" class="button-like" id="myButtonSpecialCondition" title="Special Condition">Special Condition</a>
|
||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGridSubmit1" style="margin-top: 100px;">Submit</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<script>
|
||
var policy_grid_id = $('#client_id').val();
|
||
var grid_html = '';
|
||
|
||
$('.close').click(function() {
|
||
|
||
$('#sum_insured').val("");
|
||
$('#familyfloater').val("");
|
||
$('#waiverofpreexistingdiseases').prop('checked', false);
|
||
$('#maternitycoverage').val("");
|
||
|
||
});
|
||
|
||
|
||
// $('input[name="family_floater"]').change(function() {
|
||
// //console.log($(this).val());
|
||
// if ($(this).val() == '1') {
|
||
// var element = $(this).parent().next()[0];
|
||
// $(element).css("display", "block");
|
||
// var element2 = $(this).parent().parent().parent().next()[0];
|
||
// $(element2).css("display", "");
|
||
// } else {
|
||
// var element = $(this).parent().next()[0];
|
||
// $(element).css("display", "none");
|
||
// var element2 = $(this).parent().parent().parent().next()[0];
|
||
// $(element2).css("display", "none");
|
||
// }
|
||
// });
|
||
|
||
$('input[name="ayudhtreatmentcover"]').change(function() {
|
||
|
||
////console.log($(this).val());
|
||
|
||
if ($(this).val() == '1') {
|
||
var element = $(this).parent().parent().next()[0];
|
||
$(element).css("display", "");
|
||
|
||
} else {
|
||
var element = $(this).parent().parent().next()[0];
|
||
$(element).css("display", "none");
|
||
}
|
||
});
|
||
|
||
$('input[name="cataract"]').change(function() {
|
||
|
||
//console.log($(this).val());
|
||
|
||
if ($(this).val() == '1') {
|
||
var element = $(this).parent().parent().next()[0];
|
||
$(element).css("display", "");
|
||
|
||
} else {
|
||
var element = $(this).parent().parent().next()[0];
|
||
$(element).css("display", "none");
|
||
}
|
||
});
|
||
|
||
|
||
$('input[name="waiverofpreexistingdiseases"]').change(function() {
|
||
|
||
if ($(this).val() == '1') {
|
||
var element = $(this).parent().parent().next()[0];
|
||
$(element).css("display", "");
|
||
var element2 = $(this).parent().parent().next().next()[0];
|
||
$(element2).css("display", "");
|
||
var element3 = $(this).parent().parent().next().next().next()[0];
|
||
$(element3).css("display", "");
|
||
var element4 = $(this).parent().parent().next().next().next().next()[0];
|
||
$(element4).css("display", "");
|
||
} else {
|
||
var element = $(this).parent().parent().next()[0];
|
||
$(element).css("display", "none");
|
||
var element2 = $(this).parent().parent().next().next()[0];
|
||
$(element2).css("display", "none");
|
||
var element3 = $(this).parent().parent().next().next().next()[0];
|
||
$(element3).css("display", "none");
|
||
var element4 = $(this).parent().parent().next().next().next().next()[0];
|
||
$(element4).css("display", "none");
|
||
}
|
||
});
|
||
|
||
|
||
$("#policyJsonForm").submit(function(event) {
|
||
|
||
checkAdditionPremiumJSON()
|
||
|
||
|
||
if (!$('#self').prop('checked')) {
|
||
$('#self_min_age').removeAttr('name');
|
||
$('#self_max_age').removeAttr('name');
|
||
}
|
||
|
||
if (!$('#spouse').prop('checked')) {
|
||
$('#spouse_min_age').removeAttr('name');
|
||
$('#spouse_max_age').removeAttr('name');
|
||
}
|
||
|
||
if ($('#children').val() == 0) {
|
||
$('#child_min_age').removeAttr('name');
|
||
$('#child_min_age').removeAttr('name');
|
||
}
|
||
|
||
if ($('#family_floaters').val() == 0) {
|
||
$('#member_count').removeAttr('name');
|
||
$('#other_member_min_age').removeAttr('name');
|
||
$('#other_member_max_age').removeAttr('name');
|
||
}
|
||
|
||
event.preventDefault();
|
||
var isValid = $('#policyJsonForm').parsley().validate();
|
||
|
||
if ($('#gmc_emp_count').val() == true) {
|
||
toastr.warning('Client has active employees', 'Warning');
|
||
return;
|
||
}
|
||
|
||
if (!isValid) {
|
||
//console.log('Form is Empty', 'Warning');
|
||
return;
|
||
}
|
||
|
||
$('.loader').fadeIn();
|
||
$('.loader-mask').fadeIn();
|
||
|
||
var formData = new FormData($('#policyJsonForm')[0]);
|
||
var policy_form_action = '<?= base_url("client/policy/policyGMCTerms") ?>';
|
||
|
||
$.ajax({
|
||
data: formData,
|
||
url: policy_form_action,
|
||
type: "POST",
|
||
dataType: 'json',
|
||
processData: false,
|
||
contentType: false,
|
||
success: function(res) {
|
||
|
||
$('#policyJsonForm')[0].reset();
|
||
$('.text-danger-2').html('');
|
||
if (res.status === false) {
|
||
toastr.error('Policy Dose Not Create', 'Error');
|
||
return;
|
||
}
|
||
document.querySelectorAll('.special_condition_label\\[\\]').forEach(element => {
|
||
element.parentNode.remove();
|
||
});
|
||
|
||
},
|
||
error: function(xhr, status, error) {
|
||
console.error(xhr.responseText);
|
||
console.error(status, error);
|
||
|
||
setTimeout(function() {
|
||
$('.loader').fadeOut();
|
||
$('.loader-mask').delay(350).fadeOut('slow');
|
||
//console.log('Something Wrong!', 'warning');
|
||
}, 1000);
|
||
}
|
||
});
|
||
|
||
setTimeout(function() {
|
||
|
||
$('.loader').fadeOut();
|
||
$('.loader-mask').delay(350).fadeOut('slow');
|
||
$('#policyGMCTerms').css('display', 'none');
|
||
$('#police-tab').css('display', '');
|
||
$('.nav.nav-pills.navtab-bg').css('display', '');
|
||
$('.nav.nav-pills.navtab-bg').prev().css('display', '');
|
||
var message = 'Policy Terms Updated successfully';
|
||
toastr.success(message, 'Success');
|
||
}, 500);
|
||
});
|
||
|
||
|
||
$('body').on('click', '.btnPolicyMaster', function() {
|
||
|
||
var client_policy_id = $(this).data('id');
|
||
//console.log('gmc_client_policy_id :', client_policy_id);
|
||
|
||
$('#gmc_client_policy_id').val(client_policy_id)
|
||
|
||
$('.removeDom').remove();
|
||
$('#gmc_si_add_more').empty();
|
||
|
||
var gmc_policy_type_id = $(this).attr('id');
|
||
// //console.log(gmc_policy_type_id)
|
||
|
||
if (gmc_policy_type_id == 'GMC') {
|
||
|
||
$('#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');
|
||
|
||
$('.loader').fadeIn();
|
||
$('.loader-mask').fadeIn();
|
||
$.ajax({
|
||
url: '<?= base_url("client/policy/getterms") ?>',
|
||
method: 'GET',
|
||
data: {
|
||
client_policy_id: client_policy_id
|
||
},
|
||
success: function(response) {
|
||
//console.log('response', response);
|
||
|
||
|
||
// //console.log('count', response.count);
|
||
setTimeout(function() {
|
||
$('.loader').fadeOut();
|
||
$('.loader-mask').delay(350).fadeOut('slow');
|
||
}, 1000);
|
||
// $('#nameOfThePolicyInGMC').html(' - ' + response.policy_name.name);
|
||
$('gmc_emp_count').val(response.count);
|
||
|
||
// //console.log('count--1', response.count);
|
||
// $('emp_count').val(response.count)
|
||
// if (response && response.hasOwnProperty('count')) {
|
||
// if (response.count === false) {
|
||
// //console.log('count -- 2', response.count);
|
||
// //console.log(document.getElementById('btnGridSubmit1'))
|
||
// $("#btnGridSubmit1").hide();
|
||
// $("#myButtonSpecialCondition").hide();
|
||
// } else {
|
||
// $("#btnGridSubmit1").show();
|
||
// $("#myButtonSpecialCondition").show();
|
||
// //console.log('count -- ', response.count);
|
||
// }
|
||
// } else {
|
||
// console.error('Response object does not have a "count" property or is invalid.');
|
||
// }
|
||
|
||
|
||
if (response) {
|
||
|
||
if (response.emp_count_by_policy != 0) {
|
||
|
||
$('#btnGridSubmit1').hide();
|
||
$('#myButtonSpecialCondition').hide();
|
||
|
||
} else {
|
||
$('#btnGridSubmit1').show();
|
||
$('#myButtonSpecialCondition').show();
|
||
}
|
||
|
||
let jsonObject = JSON.parse(response.data);
|
||
Object.keys(jsonObject).forEach(function(key) {
|
||
|
||
if (key.includes("special_condition_label") || key.includes("special_condition_input")) {
|
||
if (key.includes("special_condition_label")) {
|
||
for (let index = 0; index < jsonObject[key].length; index++) {
|
||
specialCondition();
|
||
}
|
||
}
|
||
|
||
//console.log('key', key)
|
||
let elements = document.getElementsByName(`${key}[]`);
|
||
//console.log(elements)
|
||
|
||
if (elements) {
|
||
elements.forEach((element, index) => {
|
||
//console.log()
|
||
if(jsonObject[key][index] == undefined){
|
||
element.value = " ";
|
||
}else{
|
||
element.value = jsonObject[key][index];
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
|
||
// if (key.includes("multiple_sum_insured")) {
|
||
// jsonObject[key].forEach((value, index) => {
|
||
// appendGMCSIAddMore(value);
|
||
// });
|
||
// }
|
||
|
||
if (key.includes("multiple_sum_insured") && key != "") {
|
||
|
||
if (Array.isArray(jsonObject[key])) {
|
||
jsonObject[key].forEach((value, index) => {
|
||
appendGMCSIAddMore(value);
|
||
});
|
||
} else {
|
||
console.error(`${key} is not an array.`);
|
||
}
|
||
}
|
||
|
||
if (key.includes("family_floaters")) {
|
||
let checkboxes = document.querySelectorAll(`input[name="${key}[]"]`);
|
||
if (jsonObject[key]) {
|
||
|
||
//console.log(jsonObject[key]);
|
||
// //console.log(jsonObject[key]);
|
||
if (jsonObject[key].childrens) {
|
||
$('#children').val(jsonObject[key].childrens);
|
||
}
|
||
|
||
if (jsonObject[key].self == 0) {
|
||
$('#self').prop('checked', false);
|
||
}
|
||
|
||
if (jsonObject[key].spouse == 0) {
|
||
$('#spouse').prop('checked', false);
|
||
} else {
|
||
$('#spouse').prop('checked', true);
|
||
}
|
||
|
||
|
||
if (jsonObject[key]['either-parents-pil'] == 1) {
|
||
$('#family_floaters').val('EPORPIL');
|
||
} else if (jsonObject[key].parents == 1 && jsonObject[key]['parents-in-law'] == 1) {
|
||
$('#family_floaters').val('2EPORPIL');
|
||
} else if (jsonObject[key].parents == 2 && jsonObject[key]['parents-in-law'] == 2) {
|
||
$('#family_floaters').val('4EPORPIL');
|
||
} else if (jsonObject[key].parents == 1) {
|
||
$('#family_floaters').val('1P');
|
||
} else if (jsonObject[key].parents == 2) {
|
||
$('#family_floaters').val('2P');
|
||
} else if (jsonObject[key]['parents-in-law'] == 1) {
|
||
$('#family_floaters').val('1PIL');
|
||
} else if (jsonObject[key]['parents-in-law'] == 2) {
|
||
$('#family_floaters').val('2PIL');
|
||
}
|
||
}
|
||
|
||
// if (response.policy_addon == '3') {
|
||
|
||
// $('.jodit-container').prop('disabled', true);
|
||
// $('.waiverofpreexistingdiseases').prop('disabled', true);
|
||
// $('#maternitycoverage').prop('disabled', true);
|
||
// $('#twindelivery').prop('disabled', true);
|
||
// $('#preandpostnatal').prop('disabled', true);
|
||
// $('#babyday1cover').prop('disabled', true);
|
||
// $('.9monthwaitingperiodwaived').prop('disabled', true);
|
||
// $('#coverfromthedateofjoining').prop('disabled', true);
|
||
// $('.waiverof1234thyearexclusions').prop('disabled', true);
|
||
// $('.waiverof30dayswaitingperiod').prop('disabled', true);
|
||
// $('#prehospitalizationcover').prop('disabled', true);
|
||
// $('#posthospitalizationcover').prop('disabled', true);
|
||
// $('.congenitaldiseasesinternal').prop('disabled', true);
|
||
// $('#congenitaldiseasesexternal').prop('disabled', true);
|
||
// $('#copayzonewisecopay').prop('disabled', true);
|
||
// $('#optionalparentalcopay').prop('disabled', true);
|
||
// $('#bioabsorbablestenttoriclensmultifocallens').prop('disabled', true);
|
||
// $('#roomrentlimit').prop('disabled', true);
|
||
// $('#proportionatedeductionclause').prop('disabled', true);
|
||
// $('#nursingallowance').prop('disabled', true);
|
||
// $('.ailmentcapping').prop('disabled', true);
|
||
// $('#ambulancecharges').prop('disabled', true);
|
||
// $('#airambulance').prop('disabled', true);
|
||
// $('#familytransportationbenefit').prop('disabled', true);
|
||
// $('.reasonableandcustomarycharges').prop('disabled', true);
|
||
// $('.daycaretreatment').prop('disabled', true);
|
||
// $('.ayudhtreatmentcover').prop('disabled', true);
|
||
// $('#armdcovered').prop('disabled', true);
|
||
// $('.suminsuredenhancement').prop('disabled', true);
|
||
// $('#automaticsuminsuredreinstatement').prop('disabled', true);
|
||
// $('#lasiksurgery').prop('disabled', true);
|
||
// $('#midterminclusion').prop('disabled', true);
|
||
// $('#capd').prop('disabled', true);
|
||
// $('#organdonorexpenses').prop('disabled', true);
|
||
// $('#moderntreatmentsasperirdai').prop('disabled', true);
|
||
// $('#days_of_discharge').prop('disabled', true);
|
||
// $('#days_from_dod').prop('disabled', true);
|
||
// $('#corporatebuffer').prop('disabled', true);
|
||
// $('#sublimitofcorporatebuffer').prop('disabled', true);
|
||
|
||
// setTimeout(function() {
|
||
// var editor1 = new Jodit('#additionalsicknessbenefit');
|
||
// var editor2 = new Jodit('#Wellness');
|
||
|
||
// editor1.setReadOnly(true);
|
||
// editor2.setReadOnly(true);
|
||
|
||
// }, 3000);
|
||
// }
|
||
|
||
}
|
||
|
||
|
||
let elements = document.getElementsByName(key);
|
||
if (elements && elements.length > 0) {
|
||
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.type === 'checkbox') {
|
||
element.checked = jsonObject[key] === '1'; // Assuming jsonObject[key] is '1' or '0' for checkbox
|
||
} else if (element.type === 'radio') {
|
||
|
||
if (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 if(element.name === "ayudhtreatmentcover"){
|
||
element.parentElement.parentElement.nextElementSibling.style.display = '';
|
||
}else if(element.name === "cataract"){
|
||
element.parentElement.parentElement.nextElementSibling.style.display = '';
|
||
}
|
||
|
||
|
||
} else {
|
||
element.nextElementSibling.checked = element.value;
|
||
}
|
||
}
|
||
} else if (key === "Wellness" || key === "additionalsicknessbenefit") {
|
||
let wysiwygElement = element.previousElementSibling.querySelector('.jodit-wysiwyg');
|
||
|
||
|
||
if (wysiwygElement) {
|
||
let pTag = wysiwygElement.querySelector('p'); // Find the <p> tag inside the wysiwyg element
|
||
if (pTag) {
|
||
// pTag.innerHTML = ''; // Clear the content inside the <p> tag
|
||
pTag.innerHTML = jsonObject[key]; // Add your new content inside the <p> tag
|
||
}
|
||
}
|
||
// //console.log(jsonObject[key]);
|
||
} else {
|
||
|
||
if(jsonObject[key] == undefined){
|
||
element.value = " ";
|
||
}else{
|
||
element.value = jsonObject[key];
|
||
}
|
||
}
|
||
}
|
||
|
||
if (key.includes("age_ratio")) {
|
||
|
||
$('#self_min_age').val(jsonObject[key].self.min);
|
||
$('#self_max_age').val(jsonObject[key].self.max);
|
||
|
||
$('#spouse_min_age').val(jsonObject[key].spouse.min);
|
||
$('#spouse_max_age').val(jsonObject[key].spouse.max);
|
||
|
||
$('#child_min_age').val(jsonObject[key].child.min);
|
||
$('#child_max_age').val(jsonObject[key].child.max);
|
||
|
||
$('#other_member_min_age').val(jsonObject[key].elders.min);
|
||
$('#other_member_max_age').val(jsonObject[key].elders.max);
|
||
}
|
||
|
||
});
|
||
}
|
||
$("#sum_insured").trigger("keyup");
|
||
$(".multiple_sum_insured").trigger("keyup");
|
||
|
||
$('.jodit-wysiwyg').each(function() {
|
||
$(this).click();
|
||
});
|
||
|
||
if ($('#self').prop('checked')) {
|
||
$('.self-age').css('display','');
|
||
} else {
|
||
$('.self-age').css('display','none');
|
||
}
|
||
|
||
if ($('#spouse').prop('checked')) {
|
||
$('.spouse-age').css('display','');
|
||
// $('#spouse_min_age').val(18);
|
||
// $('#spouse_max_age').val(60);
|
||
|
||
} else {
|
||
$('.spouse-age').css('display','none');
|
||
}
|
||
|
||
//console.log("child ");
|
||
//console.log($('#children').val());
|
||
|
||
if($('#children').val() != 0){
|
||
$('.child-age').css('display','');
|
||
}else{
|
||
$('.child-age').css('display','none');
|
||
}
|
||
|
||
var family_floaters = $('#family_floaters').val();
|
||
if(family_floaters != 0){
|
||
$('.other-member-age').css('display','');
|
||
}else{
|
||
$('.other-member-age').css('display','none');
|
||
}
|
||
|
||
if (family_floaters == '1P') {
|
||
$('#member_count').val(1);
|
||
}else if(family_floaters == '2P'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '1PIL'){
|
||
$('#member_count').val(1);
|
||
}else if(family_floaters == '2PIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '2EPORPIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == 'EPORPIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '4EPORPIL'){
|
||
$('#member_count').val(4);
|
||
}
|
||
|
||
|
||
},
|
||
|
||
error: function(xhr, status, error) {
|
||
console.error('Error:', status, error);
|
||
setTimeout(function() {
|
||
$('.loader').fadeOut();
|
||
$('.loader-mask').delay(350).fadeOut('slow');
|
||
//console.log('Something Wrong!', 'warning');
|
||
}, 1000);
|
||
}
|
||
});
|
||
|
||
} else if (gmc_policy_type_id != 'GPA' && gmc_policy_type_id != 'GMC') {
|
||
// toastr.warning('The terms has no data ', 'warning');
|
||
}
|
||
|
||
$(document).ready(function() {
|
||
if ($('#self').prop('checked')) {
|
||
$('.self-age').css('display','');
|
||
} else {
|
||
$('.self-age').css('display','none');
|
||
}
|
||
|
||
if ($('#spouse').prop('checked')) {
|
||
$('.spouse-age').css('display','');
|
||
} else {
|
||
$('.spouse-age').css('display','none');
|
||
}
|
||
|
||
//console.log("child ");
|
||
//console.log($('#children').val());
|
||
|
||
if($('#children').val() != 0){
|
||
$('.child-age').css('display','');
|
||
}else{
|
||
$('.child-age').css('display','none');
|
||
}
|
||
|
||
var family_floaters = $('#family_floaters').val();
|
||
if(family_floaters != 0){
|
||
$('.other-member-age').css('display','');
|
||
}else{
|
||
$('.other-member-age').css('display','none');
|
||
}
|
||
|
||
if (family_floaters == '1P') {
|
||
$('#member_count').val(1);
|
||
}else if(family_floaters == '2P'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '1PIL'){
|
||
$('#member_count').val(1);
|
||
}else if(family_floaters == '2PIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '2EPORPIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == 'EPORPIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '4EPORPIL'){
|
||
$('#member_count').val(4);
|
||
}
|
||
|
||
})
|
||
|
||
});
|
||
|
||
function si_keup_num_to_word(input) {
|
||
|
||
console.log('keyup sum insured');
|
||
var inputNumber = $(input).val();
|
||
console.log(inputNumber)
|
||
if (inputNumber) {
|
||
var result = convertCommaNumberToWords(inputNumber);
|
||
|
||
$("#numberToWordGMC").text(result);
|
||
} else {
|
||
$("#numberToWordGMC").text("");
|
||
}
|
||
};
|
||
|
||
</script>
|
||
|
||
|
||
<!-- Jodit RTE -->
|
||
<script>
|
||
$(document).ready(function()
|
||
{
|
||
var editor = new Jodit('#additionalsicknessbenefit',
|
||
{
|
||
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
|
||
});
|
||
|
||
var editor = new Jodit('#Wellness',
|
||
{
|
||
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
|
||
});
|
||
});
|
||
</script>
|
||
|
||
|
||
|
||
<!-- Policy terms Add Special Condition -->
|
||
<script>
|
||
document.getElementById('myButtonSpecialCondition').addEventListener('click', function(event)
|
||
{
|
||
//console.log('specialCondition callback clicked')
|
||
event.preventDefault();
|
||
specialCondition();
|
||
});
|
||
|
||
function specialCondition(count = 0)
|
||
{
|
||
|
||
//console.log('specialCondition function called')
|
||
|
||
//console.log('before if count', count)
|
||
|
||
if (count === 0) {
|
||
|
||
//console.log('after if count', count)
|
||
|
||
var index = $('.modifyclassinput').length;
|
||
var appendElement = `<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
|
||
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;">
|
||
<input class="form-control" name="special_condition_label[]" id="special_condition_label[]" style="position: relative;right: 15px;">
|
||
<span class="specialConditionClose" style="color: red; float: right;position: relative;bottom: 28px;left: 15px;">X</span>
|
||
</label>
|
||
<input type="text" name="special_condition_input[]" id="special_condition_input[]" class="form-control s special_condition_input[]">
|
||
</div>`;
|
||
//console.log($(this));
|
||
$('.form-column').each(function() {
|
||
$(this).append(appendElement);
|
||
});
|
||
} else {
|
||
|
||
//console.log('else')
|
||
}
|
||
}
|
||
|
||
$(document).on('click', '.specialConditionClose', function()
|
||
{
|
||
$(this)[0].parentNode.parentNode.remove();
|
||
});
|
||
|
||
// Close the Policy terms
|
||
$(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', '');
|
||
|
||
$('#policyJsonForm')[0].reset();
|
||
$('.text-danger-2').html('');
|
||
});
|
||
|
||
// function formatNumber(input) {
|
||
// // Remove non-numeric characters
|
||
// let value = input.value.replace(/\D/g, '');
|
||
|
||
// // Add commas
|
||
// value = Number(value).toLocaleString('en-IN');
|
||
|
||
// // Update the input value
|
||
// input.value = value;
|
||
// }
|
||
|
||
|
||
$('#self').change(function ()
|
||
{
|
||
if ($(this).prop('checked')) {
|
||
$('.self-age').css('display','');
|
||
}else{
|
||
$('.self-age').css('display','none');
|
||
}
|
||
});
|
||
|
||
$('#spouse').change(function ()
|
||
{
|
||
if ($(this).prop('checked')) {
|
||
$('.spouse-age').css('display','');
|
||
if($('#spouse_min_age').val() < 17 || $('#spouse_min_age').val() == '' ){
|
||
$('#spouse_min_age').val(18);
|
||
}
|
||
if($('#spouse_max_age').val() < 17 || $('#spouse_max_age').val() == '' ){
|
||
$('#spouse_max_age').val(60);
|
||
}
|
||
}else{
|
||
$('.spouse-age').css('display','none');
|
||
}
|
||
});
|
||
|
||
$('#children').change(function ()
|
||
{
|
||
if ($(this).val() != 0) {
|
||
$('.child-age').css('display','');
|
||
|
||
if($('#child_min_age').val() < 0 || $('#child_min_age').val() == '' ){
|
||
$('#child_min_age').val(0);
|
||
}
|
||
if($('#child_max_age').val() < 24 || $('#child_max_age').val() == '' ){
|
||
$('#child_max_age').val(25);
|
||
}
|
||
}else{
|
||
$('.child-age').css('display','none');
|
||
}
|
||
});
|
||
|
||
$('#family_floaters').change(function ()
|
||
{
|
||
|
||
checkAdditionPremiumJSON()
|
||
|
||
var family_floaters = $(this).val();
|
||
if($('#family_floaters').val() != 0){
|
||
$('.other-member-age').css('display','');
|
||
if($('#other_member_min_age').val() < 17 || $('#other_member_min_age').val() == '' ){
|
||
$('#other_member_min_age').val(18);
|
||
}
|
||
if($('#other_member_max_age').val() < 79 || $('#other_member_max_age').val() == '' ){
|
||
$('#other_member_max_age').val(60);
|
||
}
|
||
|
||
}else{
|
||
$('.other-member-age').css('display','none');
|
||
}
|
||
|
||
if (family_floaters == '1P') {
|
||
$('#member_count').val(1);
|
||
}else if(family_floaters == '2P'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '1PIL'){
|
||
$('#member_count').val(1);
|
||
}else if(family_floaters == '2PIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '2EPORPIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == 'EPORPIL'){
|
||
$('#member_count').val(2);
|
||
}else if(family_floaters == '4EPORPIL'){
|
||
$('#member_count').val(4);
|
||
}
|
||
});
|
||
|
||
function lowerIsEighteen(params)
|
||
{
|
||
var value = $(params).val();
|
||
|
||
if (value < 18) {
|
||
$(params).val(18);
|
||
} else if (value > 99) {
|
||
$(params).val(99);
|
||
}
|
||
}
|
||
|
||
function appendGMCSIAddMore(data = null)
|
||
{
|
||
|
||
console.log('function called')
|
||
|
||
var html = `
|
||
<div class="row" style="margin-bottom: 10px;">
|
||
<div class="col-md-6">
|
||
<label for="sumInsured">Additional Sum Insured</label>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<input style="width: 128%;" value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]" class="form-control multiple_sum_insured" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
|
||
</div>
|
||
<div class="col-md-2" style="position: relative;left: 88px;">
|
||
<button type="button" class="btn btn-danger si-remove-multi" onclick="removeGMCAdditionalSI(this)">x</button>
|
||
<button type="button" class="btn btn-primary si-add-more" onclick="appendGMCSIAddMore()">+</button>
|
||
</div>
|
||
<div class="col-md-6">
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="text-danger-2 numberToWordSumInsured"></div>
|
||
</div>
|
||
</div>`;
|
||
|
||
$('#gmc_si_add_more').append(html);
|
||
}
|
||
|
||
function removeGMCAdditionalSI(button)
|
||
{
|
||
console.log('remove clicked');
|
||
$(button).closest('.row').remove();
|
||
}
|
||
|
||
function checkAdditionPremiumJSON()
|
||
{
|
||
|
||
var client_id = $('#Client_id').val();
|
||
var client_policy_id = $('#gmc_client_policy_id').val();
|
||
|
||
var url = '<?php echo base_url('util/check_addition_premium_JSON/') ?>' + client_id + '/' + client_policy_id;
|
||
|
||
$.get(url, function(response) {
|
||
|
||
console.log(response);
|
||
console.log(response.data);
|
||
|
||
if (response.data > 0) {
|
||
console.log('Any changes made in the policy term for family floater, please update the rack rate configuration.');
|
||
Swal.fire("Any changes made in the policy term for family floater, please update the rack rate configuration.");
|
||
}
|
||
console.log('outer');
|
||
|
||
}).fail(function(xhr, status, error) {
|
||
console.error(xhr.responseText);
|
||
console.error(status, error);
|
||
});
|
||
|
||
}
|
||
|
||
</script> |