Merge branch 'dev' of bitbucket.org:jubilian/nhance-enrollment into dev
This commit is contained in:
commit
2bef105d7c
@ -90,7 +90,7 @@ class RestAuthenticationController extends AdminController
|
||||
->where('employees.emp_status !=', 'truncated')
|
||||
->where('employees.mobile', $mobile_number)
|
||||
->where('EP.is_active', 1)
|
||||
->whereIn('EP.status', ['draft', 'enrolled'])
|
||||
->whereIn('EP.status', ['draft', 'enrolled', 'expired'])
|
||||
->first();
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ class RestAuthenticationController extends AdminController
|
||||
->where('employees.emp_status !=', 'truncated')
|
||||
->where('employees.email_corporate', $email)
|
||||
->where('EP.is_active', 1)
|
||||
->whereIn('EP.status', ['draft', 'enrolled'])
|
||||
->whereIn('EP.status', ['draft', 'enrolled', 'expired'])
|
||||
->first();
|
||||
|
||||
if (isset($employeeData['employee_id'])) {
|
||||
|
||||
@ -97,8 +97,6 @@ label {
|
||||
}
|
||||
</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>
|
||||
@ -892,85 +890,85 @@ $('.close').click(function() {
|
||||
|
||||
});
|
||||
|
||||
$('input[name="ayudhtreatmentcover"]').change(function() {
|
||||
// $('input[name="ayudhtreatmentcover"]').change(function() {
|
||||
|
||||
////console.log($(this).val());
|
||||
// ////console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$('input[name="ailmentcapping"]').change(function() {
|
||||
// $('input[name="ailmentcapping"]').change(function() {
|
||||
|
||||
////console.log($(this).val());
|
||||
// ////console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$('input[name="copayzonewisecopay"]').change(function() {
|
||||
// $('input[name="copayzonewisecopay"]').change(function() {
|
||||
|
||||
////console.log($(this).val());
|
||||
// ////console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$('input[name="cataract"]').change(function() {
|
||||
// $('input[name="cataract"]').change(function() {
|
||||
|
||||
//console.log($(this).val());
|
||||
// //console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
$('input[name="waiverofpreexistingdiseases"]').change(function() {
|
||||
// $('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");
|
||||
}
|
||||
});
|
||||
// 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) {
|
||||
|
||||
@ -475,75 +475,75 @@ $('.close').click(function() {
|
||||
});
|
||||
|
||||
|
||||
$('input[name="burnExpenses"]').change(function() {
|
||||
// $('input[name="burnExpenses"]').change(function() {
|
||||
|
||||
console.log($(this).val());
|
||||
// console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$('input[name="compassionateVisitExpenses"]').change(function() {
|
||||
// $('input[name="compassionateVisitExpenses"]').change(function() {
|
||||
|
||||
console.log($(this).val());
|
||||
// console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$('input[name="carriageOfDeadBody"]').change(function() {
|
||||
// $('input[name="carriageOfDeadBody"]').change(function() {
|
||||
|
||||
console.log($(this).val());
|
||||
// console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$('input[name="ambulanceCharges"]').change(function() {
|
||||
// $('input[name="ambulanceCharges"]').change(function() {
|
||||
|
||||
console.log($(this).val());
|
||||
// console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$('input[name="brokenBoneExpenses"]').change(function() {
|
||||
// $('input[name="brokenBoneExpenses"]').change(function() {
|
||||
|
||||
console.log($(this).val());
|
||||
// console.log($(this).val());
|
||||
|
||||
if ($(this).val() == '1') {
|
||||
var element = $(this).parent().parent().next()[0];
|
||||
$(element).css("display", "");
|
||||
// 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");
|
||||
}
|
||||
});
|
||||
// } else {
|
||||
// var element = $(this).parent().parent().next()[0];
|
||||
// $(element).css("display", "none");
|
||||
// }
|
||||
// });
|
||||
|
||||
$("#policyGPATerms").submit(function(event) {
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
onchange="addGridHTML(this)" required>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="hidden_unit" />
|
||||
<div class="form-group col-md-6"
|
||||
style="position: relative; left: 45px; display:none" id="premium_type">
|
||||
<label for="css"> Premium Calculation </label>
|
||||
@ -380,11 +380,22 @@ $('body').on('click', '.btnPolicyModel', function()
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
|
||||
console.log('rack rate responce', res)
|
||||
console.log('rack rate responce', (res.ranch_units))
|
||||
console.log('rack rate responce jsonArray', res.jsonArray);
|
||||
// console.log('rack rate responce.premium data', res.premiumData)
|
||||
// console.log('rack rate responce.premium data parsed', JSON.parse(res.premiumData));
|
||||
|
||||
|
||||
console.log('rack rate responce length', JSON.parse(res.branch_units).length);
|
||||
|
||||
branch_units = JSON.parse(res.branch_units) ?? [];
|
||||
|
||||
if (branch_units && branch_units.length == 1) {
|
||||
|
||||
$("#hidden_unit").val(branch_units[0]);
|
||||
console.log('unit', branch_units[0]);
|
||||
$("#gpa_unit1").val(branch_units[0]);
|
||||
}
|
||||
|
||||
var data_for_the_rack_rate = JSON.parse(res.premiumData) ?? [];
|
||||
var groupedData = groupByRackRateName(data_for_the_rack_rate) ?? [];
|
||||
rarc_rate_json_array.push(res.jsonArray);
|
||||
@ -492,7 +503,8 @@ $('body').on('click', '.btnPolicyModel', function()
|
||||
}
|
||||
|
||||
addGridHTML(false, premiumData[0], premiumData[0].policy_grid_id, si_or_bp_value);
|
||||
|
||||
// alert("hi");
|
||||
// alert('policy_grid_id_value', policy_grid_id_value);
|
||||
$('#tabname').text(premiumData[0].rack_rate_name);
|
||||
$('#rack_rate_name').val(premiumData[0].rack_rate_name);
|
||||
|
||||
@ -623,8 +635,12 @@ $(document).on('change', 'select[id^="grid_"]', function(event)
|
||||
|
||||
if(unit_length == 1 || unit_length == 0){
|
||||
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv').find('input').removeAttr('required');
|
||||
// $('.unitDiv').hide();
|
||||
// $('.unitDiv').find('input').removeAttr('required');
|
||||
setTimeout(() => {
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv input').removeAttr('required');
|
||||
}, 1000);
|
||||
}else{
|
||||
$('.unitDiv').show();
|
||||
$('.unitDiv').find('input').attr('required', true);
|
||||
@ -673,8 +689,12 @@ $('#grid').change(function()
|
||||
|
||||
if(unit_length == 1 || unit_length == 0){
|
||||
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv').find('input').removeAttr('required');
|
||||
// $('.unitDiv').hide();
|
||||
// $('.unitDiv').find('input').removeAttr('required');
|
||||
setTimeout(() => {
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv input').removeAttr('required');
|
||||
}, 1000);
|
||||
}else{
|
||||
$('.unitDiv').show();
|
||||
$('.unitDiv').find('input').attr('required', true);
|
||||
@ -734,6 +754,9 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
|
||||
var id_var = 'grid_';
|
||||
|
||||
var default_unit = $('#hidden_unit').val();
|
||||
// alert(default_unit);
|
||||
|
||||
var dataIdValue = ''
|
||||
if (event === false) {
|
||||
var dataIdValue = ui_type
|
||||
@ -802,13 +825,13 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
<div id="si_or_bp_sum_insure" class="form-row">
|
||||
|
||||
<div class="form-row col-md-4" style="margin-left: 346px; margin-top: -114px;">
|
||||
<label for="mobile">Premium Multiplier<span class="text-danger">*</span></label>
|
||||
<label for="mobile" style = "margin-bottom: -10px;margin-top: 17px;">Premium Multiplier<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.multiplier : '') : ''}" type="text" class="form-control" placeholder="Multiplier" name="gpa_sum_multiplier" id="gpa_sum_multiplier" onchange="gpaSumInsureMultiplier(this)" required>
|
||||
</div>
|
||||
<div class="form-row" style="width:101%;padding: 10px;" id="removeChild_${Count}">
|
||||
<div class="form-group col-md-3 unitDiv">
|
||||
<label for="mobile">Units<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.unit : '') : ''}" type="text" class="form-control" placeholder="Enter Unit" name="gpa_unit_1[]" id="gpa_unit1" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? (data.si_or_bp == '1' ? data.unit : default_unit) : default_unit}" type="text" class="form-control" placeholder="Enter Unit" name="gpa_unit_1[]" id="gpa_unit1" required>
|
||||
</div>
|
||||
<div class="form-group col-md-3" id="">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
@ -1341,8 +1364,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
}
|
||||
|
||||
if(unit_length == 1 || unit_length == 0){
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv').find('input').removeAttr('required');
|
||||
// $('.unitDiv').hide();
|
||||
// $('.unitDiv').find('input').removeAttr('required');
|
||||
setTimeout(() => {
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv input').removeAttr('required');
|
||||
}, 1000);
|
||||
}else{
|
||||
$('.unitDiv').show();
|
||||
$('.unitDiv').find('input').attr('required', true);
|
||||
@ -1399,7 +1426,7 @@ function appendGridtHtml(ui_type = false, secondary = false, data = false)
|
||||
html = `<div class="form-row gpa_sum_insure_remove" style="width:101%" id="removeChild_${Count}">
|
||||
<div class="form-group col-md-3 unitDiv">
|
||||
<label for="mobile">Units<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.unit : ''}"}" type="text" class="form-control" placeholder="Enter Unit" name="gpa_unit_1[]" id="gpa_unit1" required>
|
||||
<input value="${data !== false && data !== undefined && data !== default_unit ? data.unit : default_unit}"}" type="text" class="form-control" placeholder="Enter Unit" name="gpa_unit_1[]" id="gpa_unit1" required>
|
||||
</div>
|
||||
<div class="form-group col-md-3" id="">
|
||||
<label for="mobile">Sum Insured<span class="text-danger">*</span></label>
|
||||
@ -1840,8 +1867,12 @@ function appendGridtHtml(ui_type = false, secondary = false, data = false)
|
||||
// Count++
|
||||
|
||||
if(unit_length == 1 || unit_length == 0){
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv').find('input').removeAttr('required');
|
||||
// $('.unitDiv').hide();
|
||||
// $('.unitDiv').find('input').removeAttr('required');
|
||||
setTimeout(() => {
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv input').removeAttr('required');
|
||||
}, 1000);
|
||||
}else{
|
||||
$('.unitDiv').show();
|
||||
$('.unitDiv').find('input').attr('required', true);
|
||||
@ -2770,7 +2801,7 @@ function si_orbp_change_function()
|
||||
$('#gpa_sum_multiplier').attr('required', true);
|
||||
$('#gpa_sum_si').attr('required', true);
|
||||
$('#gpa_sum_premium').attr('required', true);
|
||||
$('#gpa_unit1').attr('required', true);
|
||||
$('#gpa_unit1').attr('required', false);
|
||||
|
||||
var gridContentInput = $('#grid_content_input');
|
||||
|
||||
@ -3936,8 +3967,12 @@ function appendFourthAndSixthRackRate(data = null, uniqueId = null)
|
||||
grid_container.insertAdjacentHTML('beforeend', grid_html);
|
||||
|
||||
if(unit_length == 1 || unit_length == 0){
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv').find('input').removeAttr('required');
|
||||
// $('.unitDiv').hide();
|
||||
// $('.unitDiv').find('input').removeAttr('required');
|
||||
setTimeout(() => {
|
||||
$('.unitDiv').hide();
|
||||
$('.unitDiv input').removeAttr('required');
|
||||
}, 1000);
|
||||
}else{
|
||||
$('.unitDiv').show();
|
||||
$('.unitDiv').find('input').attr('required', true);
|
||||
@ -3960,7 +3995,7 @@ function checkValideUnits(unique_id = null)
|
||||
container = $('#grid_content_input_for_additional_'+unique_id);
|
||||
}
|
||||
|
||||
console.log('checkValideUnits id', id);
|
||||
console.log('checkValideUnits id', id.value);
|
||||
console.log('checkValideUnits container', container);
|
||||
|
||||
if (id.value === '3') {
|
||||
@ -4285,6 +4320,7 @@ function checkValideUnits(unique_id = null)
|
||||
} else if (id.value === '1') {
|
||||
|
||||
var selectedValue = $('#si_or_bp').val();
|
||||
console.log('checkValideUnits selectedValue', selectedValue);
|
||||
if (selectedValue == 1) {
|
||||
|
||||
var units = container.find('input[name="gpa_unit_1[]"]');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user