FIX_EMPLOYEE_POLICY_AUTO_SELCTE_POLICY_TYPE_3 : RV
This commit is contained in:
parent
92886a8ecc
commit
eadd03c45b
@ -444,6 +444,7 @@
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
@ -1288,7 +1289,7 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
var dataId = 0;
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#base_policy').change(function() {
|
||||
@ -1297,9 +1298,12 @@
|
||||
var policy_type = $('#policy_type').val()
|
||||
console.log(client_policy_id);
|
||||
|
||||
var dataId = $('#policy').children('option:selected').attr('data-id');
|
||||
dataId = $('#policy').children('option:selected').attr('data-id');
|
||||
console.log('dataId', dataId)
|
||||
|
||||
base_policy_data_id = $(this).children('option:selected').attr('data-id');
|
||||
console.log('base_policy_data_id', base_policy_data_id);
|
||||
|
||||
var queryParams = {
|
||||
client_policy_id: client_policy_id,
|
||||
policy_type: policy_type,
|
||||
@ -1348,12 +1352,18 @@
|
||||
|
||||
$('#policy').html(policeOptionHTML);
|
||||
|
||||
if (dataId == 3) {
|
||||
if (dataId == 3 || policy_type == 1) {
|
||||
|
||||
console.log('step 1')
|
||||
|
||||
setTimeout(function() {
|
||||
console.log('step 2')
|
||||
var $option = $('#policy').find('option[data-id="3"]');
|
||||
if ($option.length > 0) {
|
||||
console.log('step 3')
|
||||
$option.prop('selected', true).change();
|
||||
} else {
|
||||
console.log('step 4');
|
||||
toastr.warning('The insurer does not have a GMC-Parents policy.', 'Warning');
|
||||
}
|
||||
}, 1500);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user