CHANGES_GMC_GPA_TERMS : RV
This commit is contained in:
parent
482ed4ef0f
commit
516bf18ac3
@ -649,6 +649,18 @@ class ClientController extends AdminController
|
|||||||
$policy_id = $this->request->getGet('policy_id');
|
$policy_id = $this->request->getGet('policy_id');
|
||||||
$client_id = $this->request->getGet('client_id');
|
$client_id = $this->request->getGet('client_id');
|
||||||
|
|
||||||
|
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
|
||||||
|
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||||
|
->where("employees.client_id",$client_id)
|
||||||
|
->where("employees.emp_status",'active')
|
||||||
|
->countAllResults();
|
||||||
|
|
||||||
|
if($emp_count = 0){
|
||||||
|
$emp_count = true;
|
||||||
|
}else{
|
||||||
|
$emp_count = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$data = $this->policesModel->getPolicyPremium($policy_id);
|
$data = $this->policesModel->getPolicyPremium($policy_id);
|
||||||
$pattern = '/gmc/i';
|
$pattern = '/gmc/i';
|
||||||
@ -669,7 +681,7 @@ class ClientController extends AdminController
|
|||||||
// echo '<pre>';
|
// echo '<pre>';
|
||||||
// print_r($results);
|
// print_r($results);
|
||||||
// print_r($data[0]->policy_type); die;
|
// print_r($data[0]->policy_type); die;
|
||||||
return $this->respond(['status' => true,'code' => 200,'data' => $results, 'premiumData' => $premiumData], 200);
|
return $this->respond(['status' => true,'code' => 200,'data' => $results, 'premiumData' => $premiumData, 'count' => $emp_count], 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -71,279 +71,283 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</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 GMC Terms</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="client_policy_id" />
|
|
||||||
<input type="hidden" name="policy_id" id="policy_id"/>
|
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
<div class="form-column">
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Sum Insured</label>
|
|
||||||
<input type="text" name="sum_insured" id="sum_insured" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class=" " style="width: 400px;">Family Floater</label><br>
|
|
||||||
<div class="flex-container">
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="family_floater" value="1"> Yes
|
|
||||||
<input type="radio" name="family_floater" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
<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="spouse" id="spouse"> Spouse
|
|
||||||
<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="child3" id="child3"> Child 3
|
|
||||||
<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="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 class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label class="form-check-label " for="corporatebuffer" style="width: 400px;">Corporate Buffer</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="corporatebuffer" value="1"> Yes
|
|
||||||
<input type="radio" name="corporatebuffer" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="waiverofpreexistingdiseases" style="width: 400px;">Waiver of Pre-existing Diseases</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="waiverofpreexistingdiseases" value="1"> Yes, waived off
|
|
||||||
<input type="radio" name="waiverofpreexistingdiseases" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Maternity Coverage</label>
|
|
||||||
<input type="text" name="maternitycoverage" id="maternitycoverage" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px; ">Twin Delivery</label>
|
|
||||||
<input type="text" name="twindelivery" id="twindelivery" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px; ">Pre and Post natal</label>
|
|
||||||
<input type="text" name="preandpostnatal" id="preandpostnatal" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px; ">Baby Day 1 Cover</label>
|
|
||||||
<input type="text" name="babyday1cover" id="babyday1cover" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="9monthwaitingperiodwaived" style="width: 400px;">9-month waiting Period –waived</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="9monthwaitingperiodwaived" value="1"> Yes, waived off
|
|
||||||
<input type="radio" name="9monthwaitingperiodwaived" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Cover from the date of Joining</label>
|
|
||||||
<input type="text" name="coverfromthedateofjoining" id="coverfromthedateofjoining" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="waiverof1,2,3&4thyearexclusions" style="width: 400px;">Waiver of 1, 2, 3 & 4th year Exclusions</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="1"> Yes, waived off
|
|
||||||
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="waiverof30dayswaitingperiod" style="width: 400px;">Waiver of 30 days waiting period</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="waiverof30dayswaitingperiod" value="1"> Yes, waived off
|
|
||||||
<input type="radio" name="waiverof30dayswaitingperiod" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<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">
|
|
||||||
</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">
|
|
||||||
<label class="form-check-label " for="congenitaldiseasesinternal" style="width: 400px;">Congenital Diseases - Internal</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="congenitaldiseasesinternal" value="internal"> Internal Covered
|
|
||||||
<input type="radio" name="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No
|
|
||||||
</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">
|
|
||||||
<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">
|
|
||||||
<option value="">Select an option</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 class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Bio absorbable stent / Toric lens/ Multi Focal lens</label>
|
|
||||||
<input type="text" name="bioabsorbablestenttoriclensmultifocallens" id="bioabsorbablestenttoriclensmultifocallens" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Room Rent Limit</label>
|
|
||||||
<input type="text" name="roomrentlimit" id="roomrentlimit" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="proportionatedeductionclause" class=" " style="width: 400px;">Proportionate Deduction Clause</label>
|
|
||||||
<select name="proportionatedeductionclause" id="proportionatedeductionclause" class="form-control form-control-client-policy-master">
|
|
||||||
<option value="">Select an option</option>
|
|
||||||
<option value="NotApplicable/WaivedOff">Not Applicable / Waived Off</option>
|
|
||||||
<option value="Applicable">Applicable</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Nursing Allowance</label>
|
|
||||||
<input type="text" name="nursingallowance" id="nursingallowance" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="ailmentcapping" style="width: 400px;">Ailment capping</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="ailmentcapping" value="1"> Yes
|
|
||||||
<input type="radio" name="ailmentcapping" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Ambulance Charges</label>
|
|
||||||
<input type="text" name="ambulancecharges" id="ambulancecharges" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Air Ambulance</label>
|
|
||||||
<input type="text" name="airambulance" id="airambulance" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Family Transportation Benefit</label>
|
|
||||||
<input type="text" name="familytransportationbenefit" id="familytransportationbenefit" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="reasonableandcustomarycharges" style="width: 400px;">Reasonable and Customary Charges</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="reasonableandcustomarycharges" value="1">Applicable
|
|
||||||
<input type="radio" name="reasonableandcustomarycharges" value="0" style="margin-left:10px">Not Applicable
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Day Care Treatment</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="daycaretreatment" value="1"> Yes
|
|
||||||
<input type="radio" name="daycaretreatment" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label class="form-check-label " for="ayudhtreatmentcover" style="width: 400px;">AYUSH treatment cover</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="ayudhtreatmentcover" value="1"> Yes
|
|
||||||
<input type="radio" name="ayudhtreatmentcover" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">ARMD Covered</label>
|
|
||||||
<input type="text" name="armdcovered" id="armdcovered" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Sum Insured enhancement</label>
|
|
||||||
<div class="radiobuttondiv">
|
|
||||||
<input type="radio" name="suminsuredenhancement" value="1"> Yes
|
|
||||||
<input type="radio" name="suminsuredenhancement" value="0" style="margin-left:10px"> No
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Automatic Sum Insured reinstatement</label>
|
|
||||||
<input type="text" name="automaticsuminsuredreinstatement" id="automaticsuminsuredreinstatement" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
|
|
||||||
<textarea name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master"></textarea>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
|
|
||||||
<input type="text" name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master">
|
|
||||||
</div> -->
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Lasik Surgery</label>
|
|
||||||
<input type="text" name="lasiksurgery" id="lasiksurgery" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Mid Term inclusion</label>
|
|
||||||
<input type="text" name="midterminclusion" id="midterminclusion" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">CAPD</label>
|
|
||||||
<input type="text" name="capd" id="capd" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Organ donor expenses</label>
|
|
||||||
<input type="text" name="organdonorexpenses" id="organdonorexpenses" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Modern treatments as per IRDAI</label>
|
|
||||||
<input type="text" name="moderntreatmentsasperirdai" id="moderntreatmentsasperirdai" class="form-control form-control-client-policy-master">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="emp_code" class=" " style="width: 400px;">Wellness</label>
|
|
||||||
<textarea name="Wellness" id="Wellness" class="form-control form-control-client-policy-master"></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="days_of_discharge" class=" ">Days of Discharge</label>
|
|
||||||
<div class="input-group mb-3" style="margin-left: 0px;">
|
|
||||||
<input type="text" id="days_of_discharge" name="days_of_discharge" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
|
|
||||||
<div class="input-group-append input-group-append-client-policy-master">
|
|
||||||
<span class="input-group-text" id="basic-addon2">Days</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6 form-group-client-policy-master">
|
|
||||||
<label for="days_from_dod" class=" ">Days from DOD</label>
|
|
||||||
<div class="input-group mb-3" style="margin-left: 0px;">
|
|
||||||
<input type="text" id="days_from_dod" name="days_from_dod" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
|
|
||||||
<div class="input-group-append input-group-append-client-policy-master">
|
|
||||||
<span class="input-group-text" id="basic-addon2">Days</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
<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" >
|
||||||
|
<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="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="form-column">
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Sum Insured</label>
|
||||||
|
<input type="text" name="sum_insured" id="sum_insured" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class=" " style="width: 400px;">Family Floater</label><br>
|
||||||
|
<div class="flex-container">
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="family_floater" value="1"> Yes
|
||||||
|
<input type="radio" name="family_floater" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
<div style="display:none; margin-top: 27px;margin-bottom: 7px; margin-left: 31px;">
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="family_floaters[]" value="self" id="self" checked disabled> Self
|
||||||
|
<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="child2" id="child2"> Child 2
|
||||||
|
<input type="checkbox" name="family_floaters[]" value="child3" id="child3"> Child 3
|
||||||
|
<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="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>
|
||||||
|
|
||||||
|
|
||||||
<!-- <hr> -->
|
|
||||||
|
|
||||||
<!-- <div class="form-row" id="grid_content_input">
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
|
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||||
<a href="#" class="button-like" id="myButtonSpecialCondition" title="Special Condition">Special Condition</a>
|
<label class="form-check-label " for="corporatebuffer" style="width: 400px;">Corporate Buffer</label>
|
||||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGridSubmit" style="margin-top: 100px;">Submit</button>
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="corporatebuffer" value="1"> Yes
|
||||||
|
<input type="radio" name="corporatebuffer" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="waiverofpreexistingdiseases" style="width: 400px;">Waiver of Pre-existing Diseases</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="waiverofpreexistingdiseases" value="1"> Yes, waived off
|
||||||
|
<input type="radio" name="waiverofpreexistingdiseases" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Maternity Coverage</label>
|
||||||
|
<input type="text" name="maternitycoverage" id="maternitycoverage" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px; ">Twin Delivery</label>
|
||||||
|
<input type="text" name="twindelivery" id="twindelivery" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px; ">Pre and Post natal</label>
|
||||||
|
<input type="text" name="preandpostnatal" id="preandpostnatal" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px; ">Baby Day 1 Cover</label>
|
||||||
|
<input type="text" name="babyday1cover" id="babyday1cover" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="9monthwaitingperiodwaived" style="width: 400px;">9-month waiting Period –waived</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="9monthwaitingperiodwaived" value="1"> Yes, waived off
|
||||||
|
<input type="radio" name="9monthwaitingperiodwaived" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Cover from the date of Joining</label>
|
||||||
|
<input type="text" name="coverfromthedateofjoining" id="coverfromthedateofjoining" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="waiverof1,2,3&4thyearexclusions" style="width: 400px;">Waiver of 1, 2, 3 & 4th year Exclusions</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="1"> Yes, waived off
|
||||||
|
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="waiverof30dayswaitingperiod" style="width: 400px;">Waiver of 30 days waiting period</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="waiverof30dayswaitingperiod" value="1"> Yes, waived off
|
||||||
|
<input type="radio" name="waiverof30dayswaitingperiod" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<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">
|
||||||
|
</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">
|
||||||
|
<label class="form-check-label " for="congenitaldiseasesinternal" style="width: 400px;">Congenital Diseases - Internal</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="congenitaldiseasesinternal" value="internal"> Internal Covered
|
||||||
|
<input type="radio" name="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No
|
||||||
|
</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">
|
||||||
|
<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">
|
||||||
|
<option value="">Select an option</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 class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Bio absorbable stent / Toric lens/ Multi Focal lens</label>
|
||||||
|
<input type="text" name="bioabsorbablestenttoriclensmultifocallens" id="bioabsorbablestenttoriclensmultifocallens" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Room Rent Limit</label>
|
||||||
|
<input type="text" name="roomrentlimit" id="roomrentlimit" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="proportionatedeductionclause" class=" " style="width: 400px;">Proportionate Deduction Clause</label>
|
||||||
|
<select name="proportionatedeductionclause" id="proportionatedeductionclause" class="form-control form-control-client-policy-master">
|
||||||
|
<option value="">Select an option</option>
|
||||||
|
<option value="NotApplicable/WaivedOff">Not Applicable / Waived Off</option>
|
||||||
|
<option value="Applicable">Applicable</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Nursing Allowance</label>
|
||||||
|
<input type="text" name="nursingallowance" id="nursingallowance" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="ailmentcapping" style="width: 400px;">Ailment capping</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="ailmentcapping" value="1"> Yes
|
||||||
|
<input type="radio" name="ailmentcapping" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Ambulance Charges</label>
|
||||||
|
<input type="text" name="ambulancecharges" id="ambulancecharges" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Air Ambulance</label>
|
||||||
|
<input type="text" name="airambulance" id="airambulance" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Family Transportation Benefit</label>
|
||||||
|
<input type="text" name="familytransportationbenefit" id="familytransportationbenefit" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="reasonableandcustomarycharges" style="width: 400px;">Reasonable and Customary Charges</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="reasonableandcustomarycharges" value="1">Applicable
|
||||||
|
<input type="radio" name="reasonableandcustomarycharges" value="0" style="margin-left:10px">Not Applicable
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Day Care Treatment</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="daycaretreatment" value="1"> Yes
|
||||||
|
<input type="radio" name="daycaretreatment" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label class="form-check-label " for="ayudhtreatmentcover" style="width: 400px;">AYUSH treatment cover</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="ayudhtreatmentcover" value="1"> Yes
|
||||||
|
<input type="radio" name="ayudhtreatmentcover" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">ARMD Covered</label>
|
||||||
|
<input type="text" name="armdcovered" id="armdcovered" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Sum Insured enhancement</label>
|
||||||
|
<div class="radiobuttondiv">
|
||||||
|
<input type="radio" name="suminsuredenhancement" value="1"> Yes
|
||||||
|
<input type="radio" name="suminsuredenhancement" value="0" style="margin-left:10px"> No
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Automatic Sum Insured reinstatement</label>
|
||||||
|
<input type="text" name="automaticsuminsuredreinstatement" id="automaticsuminsuredreinstatement" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
|
||||||
|
<textarea name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master"></textarea>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
|
||||||
|
<input type="text" name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master">
|
||||||
|
</div> -->
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Lasik Surgery</label>
|
||||||
|
<input type="text" name="lasiksurgery" id="lasiksurgery" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Mid Term inclusion</label>
|
||||||
|
<input type="text" name="midterminclusion" id="midterminclusion" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">CAPD</label>
|
||||||
|
<input type="text" name="capd" id="capd" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Organ donor expenses</label>
|
||||||
|
<input type="text" name="organdonorexpenses" id="organdonorexpenses" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Modern treatments as per IRDAI</label>
|
||||||
|
<input type="text" name="moderntreatmentsasperirdai" id="moderntreatmentsasperirdai" class="form-control form-control-client-policy-master">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="emp_code" class=" " style="width: 400px;">Wellness</label>
|
||||||
|
<textarea name="Wellness" id="Wellness" class="form-control form-control-client-policy-master"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="days_of_discharge" class=" ">Days of Discharge</label>
|
||||||
|
<div class="input-group mb-3" style="margin-left: 0px;">
|
||||||
|
<input type="text" id="days_of_discharge" name="days_of_discharge" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
|
||||||
|
<div class="input-group-append input-group-append-client-policy-master">
|
||||||
|
<span class="input-group-text" id="basic-addon2">Days</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 form-group-client-policy-master">
|
||||||
|
<label for="days_from_dod" class=" ">Days from DOD</label>
|
||||||
|
<div class="input-group mb-3" style="margin-left: 0px;">
|
||||||
|
<input type="text" id="days_from_dod" name="days_from_dod" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
|
||||||
|
<div class="input-group-append input-group-append-client-policy-master">
|
||||||
|
<span class="input-group-text" id="basic-addon2">Days</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <hr> -->
|
||||||
|
|
||||||
|
<!-- <div class="form-row" id="grid_content_input">
|
||||||
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
|
||||||
|
<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="btnGridSubmit" style="margin-top: 100px;">Submit</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -401,13 +405,23 @@ 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();
|
||||||
|
|
||||||
|
if($('#gmc_emp_count').val() == true){
|
||||||
|
toastr.warning('Client has active employees', 'Warning');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
console.log('Form is Empty', 'Warning');
|
console.log('Form is Empty', 'Warning');
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
|
|
||||||
var formData = new FormData($('#policyJsonForm')[0]);
|
var formData = new FormData($('#policyJsonForm')[0]);
|
||||||
var policy_form_action = '<?= base_url("client/policy/policyGMCTerms") ?>';
|
var policy_form_action = '<?= base_url("client/policy/policyGMCTerms") ?>';
|
||||||
|
|
||||||
@ -428,21 +442,24 @@ var grid_html = '';
|
|||||||
element.parentNode.remove();
|
element.parentNode.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
console.log(res);
|
|
||||||
var message = (policy_PrimaryKey === '') ? 'Policy Premium Added successfully' : 'Policy Premium Added Successfully';
|
|
||||||
toastr.success(message, 'Success');
|
|
||||||
$('.close').click();
|
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
console.error(status, error);
|
console.error(status, error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#policyGMCTerms').css('display', 'none');
|
|
||||||
$('#police-tab').css('display', '');
|
setTimeout(function() {
|
||||||
$('.nav.nav-pills.navtab-bg').css('display','');
|
|
||||||
$('.nav.nav-pills.navtab-bg').prev().css('display','');
|
$('.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');
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -471,91 +488,103 @@ var grid_html = '';
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: { policy_id : policy_id , client_id: client_id},
|
data: { policy_id : policy_id , client_id: client_id},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response) {
|
|
||||||
let jsonObject = JSON.parse(response);
|
$('gmc_emp_count').val(response.count)
|
||||||
Object.keys(jsonObject).forEach(function(key) {
|
if(response.count){
|
||||||
if (key.includes("special_condition_label") || key.includes("special_condition_input")) {
|
|
||||||
if (key.includes("special_condition_label")) {
|
$('emp_count').val(response.count)
|
||||||
for (let index = 0; index < jsonObject[key].length; index++) {
|
if(response.count === false){
|
||||||
specialCondition();
|
$("#btnGPATermsSubmit").prop("disabled", true);
|
||||||
|
}else{
|
||||||
|
$("#btnGPATermsSubmit").prop("disabled", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response) {
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let elements = document.getElementsByName(`${key}[]`);
|
||||||
|
|
||||||
|
if (elements) {
|
||||||
|
elements.forEach((element,index) => {
|
||||||
|
element.value = jsonObject[key][index];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let elements = document.getElementsByName(`${key}[]`);
|
|
||||||
|
|
||||||
if (elements) {
|
|
||||||
elements.forEach((element,index) => {
|
|
||||||
element.value = jsonObject[key][index];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (key.includes("family_floaters")) {
|
|
||||||
let checkboxes = document.querySelectorAll(`input[name="${key}[]"]`);
|
|
||||||
if (jsonObject[key]) {
|
|
||||||
jsonObject[key].forEach(element => {
|
|
||||||
let checkbox = $(`#${element}`);
|
|
||||||
if (checkbox.is(":checkbox")) {
|
|
||||||
checkbox.prop("checked", true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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='';
|
|
||||||
|
|
||||||
|
if (key.includes("family_floaters")) {
|
||||||
|
let checkboxes = document.querySelectorAll(`input[name="${key}[]"]`);
|
||||||
|
if (jsonObject[key]) {
|
||||||
|
jsonObject[key].forEach(element => {
|
||||||
|
let checkbox = $(`#${element}`);
|
||||||
|
if (checkbox.is(":checkbox")) {
|
||||||
|
checkbox.prop("checked", true);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
} 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 {
|
|
||||||
element.value = jsonObject[key];
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$('.jodit-wysiwyg').each(function() {
|
|
||||||
$(this).click();
|
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 {
|
||||||
|
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 {
|
||||||
|
element.value = jsonObject[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.jodit-wysiwyg').each(function() {
|
||||||
|
$(this).click();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -572,64 +601,59 @@ var grid_html = '';
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Jodit RTE -->
|
<!-- 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,alignCenter,alignRight,alignJustify',
|
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var editor = new Jodit('#Wellness', {
|
var editor = new Jodit('#Wellness', {
|
||||||
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
|
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Policy terms Add Special Condition -->
|
<!-- Policy terms Add Special Condition -->
|
||||||
<script>
|
<script>
|
||||||
document.getElementById('myButtonSpecialCondition').addEventListener('click', function(event) {
|
|
||||||
event.preventDefault();
|
document.getElementById('myButtonSpecialCondition').addEventListener('click', function(event) {
|
||||||
specialCondition();
|
event.preventDefault();
|
||||||
});
|
specialCondition();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
function specialCondition(count =0) {
|
function specialCondition(count =0) {
|
||||||
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 removeDom">
|
||||||
<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>
|
<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="special_condition_input[]" id="special_condition_input[]" class="form-control form-control-client-policy-masters special_condition_input[]">
|
<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);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$(document).on('click', '.specialConditionClose', function() {
|
$(document).on('click', '.specialConditionClose', function() {
|
||||||
$(this)[0].parentNode.parentNode.remove();
|
$(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','');
|
||||||
|
});
|
||||||
|
|
||||||
// Close the Policy terms
|
</script>
|
||||||
|
|
||||||
$(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>
|
|
||||||
@ -405,6 +405,7 @@
|
|||||||
$('#police-tab').css('display', 'none');
|
$('#police-tab').css('display', 'none');
|
||||||
$('.nav.nav-pills.navtab-bg').css('display','none');
|
$('.nav.nav-pills.navtab-bg').css('display','none');
|
||||||
$('.nav.nav-pills.navtab-bg').prev().css('display','none');
|
$('.nav.nav-pills.navtab-bg').prev().css('display','none');
|
||||||
|
$('.removeDom').remove()
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?= base_url("client/policy/getterms") ?>',
|
url: '<?= base_url("client/policy/getterms") ?>',
|
||||||
@ -494,7 +495,8 @@
|
|||||||
$('#police-tab').css('display', '');
|
$('#police-tab').css('display', '');
|
||||||
$('.nav.nav-pills.navtab-bg').css('display','');
|
$('.nav.nav-pills.navtab-bg').css('display','');
|
||||||
$('.nav.nav-pills.navtab-bg').prev().css('display','');
|
$('.nav.nav-pills.navtab-bg').prev().css('display','');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$("#sumInsured2").on("keyup", function() {
|
$("#sumInsured2").on("keyup", function() {
|
||||||
var inputNumber = parseInt($(this).val());
|
var inputNumber = parseInt($(this).val());
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
<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'] : '' ?>"/>
|
||||||
<input type="hidden" name="client_policy_id" id="client_policy_id" />
|
<input type="hidden" name="client_policy_id" id="client_policy_id" />
|
||||||
|
<input type="hidden" id="grid_emp_count"/>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -427,6 +428,14 @@ $("#GridForm").submit(function(event) {
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
console.log($('#grid_emp_count').val());
|
||||||
|
|
||||||
|
if($('#grid_emp_count').val() == false){
|
||||||
|
console.log('test')
|
||||||
|
toastr.warning('Client has active employees', 'Warning');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var isValid = $('#GridForm').parsley().validate();
|
var isValid = $('#GridForm').parsley().validate();
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
console.log('Form is Empty', 'Warning');
|
console.log('Form is Empty', 'Warning');
|
||||||
@ -478,11 +487,14 @@ $('body').on('click', '.btnPolicyModel', function () {
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log('responce :', res);
|
console.log('responce :', res);
|
||||||
|
|
||||||
|
$('#grid_emp_count').val(res.count);
|
||||||
|
|
||||||
if (res.status === false) {
|
if (res.status === false) {
|
||||||
toastr.error(res.status);
|
toastr.error(res.status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var policy_grid_id_value = '';
|
var policy_grid_id_value = '';
|
||||||
if (res.premiumData && res.premiumData.length > 0 && res.premiumData[0].policy_grid_id) {
|
if (res.premiumData && res.premiumData.length > 0 && res.premiumData[0].policy_grid_id) {
|
||||||
policy_grid_id_value = res.premiumData[0].policy_grid_id;
|
policy_grid_id_value = res.premiumData[0].policy_grid_id;
|
||||||
@ -497,7 +509,6 @@ $('body').on('click', '.btnPolicyModel', function () {
|
|||||||
$('#grid').html(policeGridOptionHTML);
|
$('#grid').html(policeGridOptionHTML);
|
||||||
|
|
||||||
|
|
||||||
console.log('Length', res.premiumData.length)
|
|
||||||
if (res.premiumData && res.premiumData.length > 0) {
|
if (res.premiumData && res.premiumData.length > 0) {
|
||||||
|
|
||||||
addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id);
|
addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user