FIX_CLIENT_MODULE_AS_CLIENT_REQUIRED :RV
This commit is contained in:
parent
0de9e47609
commit
cb5e8eb75f
@ -18,6 +18,7 @@ $routes->get('/oauth2callback', 'LoginController::receiveGoogleOAuthResponse');
|
||||
$routes->get('/auth/google', 'LoginController::initiateGoogleOAuth');
|
||||
$routes->get('/update-emp-policy-status', 'ClientController::updateEmpAndPolicyStatus');
|
||||
$routes->get('download-e-card/(:segment)', 'EmployeeController::generateIDCardForEmployee/$1');
|
||||
$routes->get('download-kyc-docs/(:segment)', 'ClientController::downloadKYCDocument/$1');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -267,11 +267,11 @@ class ClientController extends AdminController
|
||||
// dd('Hi');
|
||||
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($id);
|
||||
// dd($this->clientPolicyModel->getLastQuery());
|
||||
// foreach ($clientPoliceData as $key => $value) {
|
||||
foreach ($clientPoliceData as $key => $value) {
|
||||
|
||||
// $clientPoliceData[$key]->policy_start_date = date('d-M-Y', strtotime($value->policy_start_date));
|
||||
// $clientPoliceData[$key]->policy_end_date = date('d-M-Y', strtotime($value->policy_end_date));
|
||||
// }
|
||||
$clientPoliceData[$key]->policy_start_date = date('d-M-Y', strtotime($value->policy_start_date));
|
||||
$clientPoliceData[$key]->policy_end_date = date('d-M-Y', strtotime($value->policy_end_date));
|
||||
}
|
||||
|
||||
$editData['client_policy'] = $clientPoliceData;
|
||||
|
||||
@ -587,7 +587,14 @@ class ClientController extends AdminController
|
||||
$data['insurer_id'] = $insurerId;
|
||||
|
||||
$tpaValue = (string) $this->request->getPost('tpa');
|
||||
list($tpaBranchId, $tpaId) = explode('-', $tpaValue);
|
||||
|
||||
if ($tpaValue === null || $tpaValue === '') {
|
||||
$tpaBranchId = null;
|
||||
$tpaId = null;
|
||||
} else {
|
||||
list($tpaBranchId, $tpaId) = explode('-', $tpaValue);
|
||||
}
|
||||
|
||||
|
||||
$data['client_id'] = $client_id;
|
||||
$data['tpa_branch_id'] = $tpaBranchId;
|
||||
@ -964,6 +971,7 @@ class ClientController extends AdminController
|
||||
$data = $this->request->getPost();
|
||||
$insert = true;
|
||||
} else if ($policy_grid_id == '11') {
|
||||
|
||||
$premium = $this->request->getPost('11_premium[]');
|
||||
$sum_insure = $this->request->getPost('11_si[]');
|
||||
$grade = $this->request->getPost('11_grade[]');
|
||||
@ -972,7 +980,7 @@ class ClientController extends AdminController
|
||||
$data['premium'] = str_replace(',', '', $premium[$i]);
|
||||
$data['si'] = str_replace(',', '', $sum_insure[$i]);
|
||||
$data['grade'] = $grade[$i];
|
||||
$data['max_si'] = $max_sum_insure[$i];
|
||||
$data['max_si'] = str_replace(',', '', $max_sum_insure[$i]);
|
||||
$dataa = $this->policyPremium2Model->insert($data);
|
||||
}
|
||||
$data = $this->request->getPost();
|
||||
@ -1348,6 +1356,13 @@ class ClientController extends AdminController
|
||||
$data['familytransportationbenefit'] =str_replace(',', '',$this->request->getPost("familytransportationbenefit"));
|
||||
$data['reasonableandcustomarycharges'] =str_replace(',', '',$this->request->getPost("reasonableandcustomarycharges"));
|
||||
$data['ayudhtreatmentcover'] =str_replace(',', '',$this->request->getPost("ayudhtreatmentcover"));
|
||||
|
||||
if ($data['ayudhtreatmentcover'] == 1) {
|
||||
$data['ayushTreatmentCoverData'] = str_replace(',', '',$this->request->getPost("ayushTreatmentCoverData"));
|
||||
}else{
|
||||
$data['ayushTreatmentCoverData'] ="";
|
||||
}
|
||||
|
||||
$data['armdcovered'] =str_replace(',', '',$this->request->getPost("armdcovered"));
|
||||
$data['suminsuredenhancement'] =str_replace(',', '',$this->request->getPost("suminsuredenhancement"));
|
||||
$data['automaticsuminsuredreinstatement'] =str_replace(',', '',$this->request->getPost("automaticsuminsuredreinstatement"));
|
||||
@ -1363,6 +1378,15 @@ class ClientController extends AdminController
|
||||
$data['special_condition_label'] = str_replace(',', '',$this->request->getPost("special_condition_label")) ?? [];
|
||||
$data['special_condition_input'] = str_replace(',', '',$this->request->getPost("special_condition_input")) ?? [];
|
||||
|
||||
$data['cataract'] =str_replace(',', '',$this->request->getPost("cataract"));
|
||||
|
||||
if ($data['cataract'] == 1) {
|
||||
$data['cataractData'] = str_replace(',', '',$this->request->getPost("cataractData"));
|
||||
}else{
|
||||
$data['cataractData'] ="";
|
||||
}
|
||||
|
||||
|
||||
$jsonData = json_encode($data);
|
||||
$dataa = array(
|
||||
'policy_terms' => $jsonData,
|
||||
@ -1656,4 +1680,17 @@ class ClientController extends AdminController
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function downloadKYCDocument($file_name)
|
||||
{
|
||||
|
||||
$file = WRITEPATH . 'uploads/client_kyc_documents/' . $file_name; // Example file path
|
||||
|
||||
if (file_exists($file)) {
|
||||
return $this->response->download($file, null)->setFileName($file_name);
|
||||
} else {
|
||||
return "File not found.";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -22,6 +22,8 @@ class BatchFileModel extends Model
|
||||
"updated_by",
|
||||
"is_active",
|
||||
"amount",
|
||||
"status",
|
||||
"error_data",
|
||||
];
|
||||
|
||||
// Callbacks
|
||||
|
||||
@ -76,8 +76,8 @@ class ClientPolicyModel extends Model
|
||||
->select('policy_type.policy_type as policy_type_name')
|
||||
->join('insurers', 'insurers.id = client_policy.insurer_id')
|
||||
->join('insurer_branch', 'client_policy.insurer_branch_id = insurer_branch.id')
|
||||
->join('tpa', 'tpa.id = client_policy.tpa_id')
|
||||
->join('tpa_branch', 'client_policy.tpa_branch_id = tpa_branch.id')
|
||||
->join('tpa', 'tpa.id = client_policy.tpa_id', 'left')
|
||||
->join('tpa_branch', 'client_policy.tpa_branch_id = tpa_branch.id', 'left')
|
||||
->join('policies', 'policies.id = client_policy.policy_id')
|
||||
->join('policy_type', 'policy_type.id = policies.policy_type_id')
|
||||
->where('client_policy.client_id', $client_id)
|
||||
|
||||
@ -176,6 +176,26 @@
|
||||
$('#name_'+item.kyc_doc_type_id).html(item.file_name);
|
||||
$('#form_'+item.kyc_doc_type_id).hide();
|
||||
|
||||
console.log('step 1')
|
||||
|
||||
if(item.file_name != null && item.file_name != ""){
|
||||
console.log('step 2')
|
||||
|
||||
$('#download_'+item.kyc_doc_type_id).show();
|
||||
$('#download_' + item.kyc_doc_type_id).attr('href', '<?= base_url('download-kyc-docs/') ?>' + item.file_name);
|
||||
$('#delete_'+item.kyc_doc_type_id).show();
|
||||
|
||||
}
|
||||
else{
|
||||
console.log('step 3')
|
||||
|
||||
$('#download_'+item.kyc_doc_type_id).hide();
|
||||
$('#download_' + item.kyc_doc_type_id).attr('href', '#');
|
||||
$('#delete_'+item.kyc_doc_type_id).hide();
|
||||
|
||||
}
|
||||
console.log('step 4')
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
@ -212,19 +232,27 @@
|
||||
var tbody = $('#tbody');
|
||||
tbody.empty();
|
||||
|
||||
$.each(res.data, function (index, item) {
|
||||
$.each(res.data, function(index, item) {
|
||||
var row = `<tr>
|
||||
<td> ${item.file_name}</td>
|
||||
<td id="form_${item.id}" style=""><form class="ajax" ><input class="file-input__input" type="file" name="file_name">
|
||||
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
|
||||
<input type="hidden" class="form-control" value="${item.id}" name="kyc_doc_type_id" />
|
||||
<input type="hidden" name="client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
|
||||
<button class="btn btn-sm btn-primary submit" style="position: relative;right: 80px;">Submit</button></form></td>
|
||||
<td>${item.file_name}</td>
|
||||
<td id="form_${item.id}">
|
||||
<form class="ajax">
|
||||
<input class="file-input__input" type="file" name="file_name">
|
||||
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>">
|
||||
<input type="hidden" class="form-control" value="${item.id}" name="kyc_doc_type_id">
|
||||
<input type="hidden" name="client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>">
|
||||
<button class="btn btn-sm btn-primary submit" style="position: relative; right: 80px;">Submit</button>
|
||||
</form>
|
||||
</td>
|
||||
<td id="name_${item.id}" style="display:none;"></td>
|
||||
<td><i data-id="${item.id}" class="mdi mdi-delete btnKycDelete" style="font-size:18px;"></i></td>
|
||||
<td>
|
||||
<i id="delete_${item.id}" data-id="${item.id}" class="mdi mdi-delete btnKycDelete" style="font-size:18px; display: none"></i>
|
||||
<a id="download_${item.id}" data-id="${item.id}" class="fa fa-download" style="font-size:18px; display: none" download></a>
|
||||
</td>
|
||||
</tr>`;
|
||||
tbody.append(row);
|
||||
});
|
||||
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
@ -250,7 +278,10 @@
|
||||
<tr id="kyc-${item.id}">
|
||||
<td>${item.other_docs_name}</td>
|
||||
<td>${item.file_name}</td>
|
||||
<td><i data-id="${item.id}" class="mdi mdi-delete btnKycOtherDelete" style="font-size:18px;"></i></td>
|
||||
<td>
|
||||
<i data-id="${item.id}" class="mdi mdi-delete btnKycOtherDelete" style="font-size:18px;"></i>
|
||||
<a href = "<?= base_url('download-kyc-docs/') ?>${item.file_name}" data-id="${item.id}" class="fa fa-download" style="font-size:18px;" download></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
@ -267,6 +298,29 @@
|
||||
$('#name_'+item.kyc_doc_type_id).show();
|
||||
$('#name_'+item.kyc_doc_type_id).html(item.file_name);
|
||||
$('#form_'+item.kyc_doc_type_id).hide();
|
||||
|
||||
console.log('step 1')
|
||||
|
||||
if(item.file_name != null && item.file_name != ""){
|
||||
console.log('step 2')
|
||||
|
||||
$('#download_'+item.kyc_doc_type_id).show();
|
||||
$('#download_' + item.kyc_doc_type_id).attr('href', '<?= base_url('download-kyc-docs/') ?>' + item.file_name);
|
||||
$('#delete_'+item.kyc_doc_type_id).show();
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
console.log('step 3')
|
||||
|
||||
$('#download_'+item.kyc_doc_type_id).hide();
|
||||
$('#download_' + item.kyc_doc_type_id).attr('href', '#');
|
||||
$('#delete_'+item.kyc_doc_type_id).hide();
|
||||
|
||||
|
||||
}
|
||||
console.log('step 4')
|
||||
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
@ -335,7 +389,10 @@
|
||||
<tr id="kyc-${item.id}">
|
||||
<td>${item.other_docs_name}</td>
|
||||
<td>${item.file_name}</td>
|
||||
<td><i data-id="${item.id}" class="mdi mdi-delete btnKycOtherDelete" style="font-size:18px;"></i></td>
|
||||
<td>
|
||||
<i data-id="${item.id}" class="mdi mdi-delete btnKycOtherDelete" style="font-size:18px;"></i>
|
||||
<a href = "<?= base_url('download-kyc-docs/') ?>${item.file_name}" data-id="${item.id}" class="fa fa-download" style="font-size:18px; display: none" download></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">TPA<span class="text-danger">*</span></label>
|
||||
<label for="mobile">TPA<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<select class="form-control" id="tpa" name="tpa" required>
|
||||
<option value="">Select TPA</option>
|
||||
<?php foreach ($tpa as $value) { ?>
|
||||
@ -269,12 +269,18 @@
|
||||
|
||||
}
|
||||
|
||||
var tpaValue = 'TPA Unavailable';
|
||||
|
||||
if (item.tpa_short && item.tpa_branch_code) {
|
||||
tpaValue = item.tpa_short + '-' + item.tpa_branch_code;
|
||||
}
|
||||
|
||||
|
||||
policyTable += `
|
||||
<tr>
|
||||
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
|
||||
<td>${item.policy_name} (${item.policy_type_name})</td>
|
||||
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
|
||||
<td>${tpaValue}</td>
|
||||
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
|
||||
<td style="text-align: center;">${(enrollmentStatus)}</td>
|
||||
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
|
||||
@ -424,11 +430,17 @@
|
||||
|
||||
}
|
||||
|
||||
var tpaValue = 'TPA Unavailable';
|
||||
|
||||
if (item.tpa_short && item.tpa_branch_code) {
|
||||
tpaValue = item.tpa_short + '-' + item.tpa_branch_code;
|
||||
}
|
||||
|
||||
policyTable += `
|
||||
<tr>
|
||||
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
|
||||
<td>${item.policy_name} (${item.policy_type_name})</td>
|
||||
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
|
||||
<td>${tpaValue}</td>
|
||||
<td>${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}</td>
|
||||
<td style="text-align: center;">${(enrollmentStatus)}</td>
|
||||
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
|
||||
@ -555,6 +567,15 @@
|
||||
console.log('id', id)
|
||||
$('#policy_type_id').val(dataId);
|
||||
|
||||
if (dataId == 1) {
|
||||
$('#tpa').prop('required', false);
|
||||
$('#tpa_danger').hide()
|
||||
} else {
|
||||
$('#tpa').prop('required', true);
|
||||
$('#tpa_danger').show()
|
||||
}
|
||||
|
||||
|
||||
var base_policy_dataId = $('#base_policy').children('option:selected').attr('data-id');
|
||||
|
||||
|
||||
@ -647,7 +668,13 @@
|
||||
$('.btnAdd').hide();
|
||||
|
||||
$('#insurer').val(res.data.insurer_branch_id + '-' + res.data.insurer_id).change();
|
||||
$('#tpa').val(res.data.tpa_branch_id + '-' + res.data.tpa_id).change();
|
||||
var tpaValue = '';
|
||||
|
||||
if (res.data.tpa_branch_id && res.data.tpa_id) {
|
||||
tpaValue = res.data.tpa_branch_id + '-' + res.data.tpa_id;
|
||||
}
|
||||
|
||||
$('#tpa').val(tpaValue).change();
|
||||
// $('#policy').val(res.data.policy_id).change();
|
||||
$('#policy_type').val(res.data.is_addon).change();
|
||||
$('#base_policy').val(res.data.base_policy);
|
||||
|
||||
@ -85,8 +85,10 @@
|
||||
}
|
||||
|
||||
.s {
|
||||
margin-left: 30px;
|
||||
width: 689px;
|
||||
/* margin-left: 30px;
|
||||
width: 689px; */
|
||||
margin-left: 141px;
|
||||
width: 576px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -320,7 +322,7 @@
|
||||
<div class="col-md-6">
|
||||
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control ">
|
||||
<option value="">Select an option</option>
|
||||
<option value="5%">5%</option>
|
||||
<option value="Nil">Nil</option>
|
||||
<option value="10%">10%</option>
|
||||
<option value="15%">15%</option>
|
||||
<option value="20%">20%</option>
|
||||
@ -441,6 +443,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;display:none;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">AYUSH treatment cover Data</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>
|
||||
@ -552,6 +563,25 @@
|
||||
</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 Data</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">
|
||||
@ -599,8 +629,37 @@
|
||||
// }
|
||||
// });
|
||||
|
||||
$('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", "");
|
||||
@ -718,7 +777,7 @@
|
||||
|
||||
$('#gmc_client_policy_id').val(client_policy_id)
|
||||
|
||||
|
||||
$('.removeDom').remove();
|
||||
|
||||
var gmc_policy_type_id = $(this).attr('id');
|
||||
// console.log(gmc_policy_type_id)
|
||||
@ -789,11 +848,19 @@
|
||||
specialCondition();
|
||||
}
|
||||
}
|
||||
|
||||
console.log('key', key)
|
||||
let elements = document.getElementsByName(`${key}[]`);
|
||||
console.log(elements)
|
||||
|
||||
if (elements) {
|
||||
elements.forEach((element, index) => {
|
||||
element.value = jsonObject[key][index];
|
||||
console.log()
|
||||
if(jsonObject[key][index] == undefined){
|
||||
element.value = " ";
|
||||
}else{
|
||||
element.value = jsonObject[key][index];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -909,6 +976,10 @@
|
||||
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 = '';
|
||||
}
|
||||
|
||||
|
||||
@ -929,7 +1000,12 @@
|
||||
}
|
||||
// console.log(jsonObject[key]);
|
||||
} else {
|
||||
element.value = jsonObject[key];
|
||||
|
||||
if(jsonObject[key] == undefined){
|
||||
element.value = " ";
|
||||
}else{
|
||||
element.value = jsonObject[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1119,7 +1195,10 @@
|
||||
|
||||
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;"><input name="special_condition_label[]" id="special_condition_label[]" style="position: relative;right: 15px;"><span class="specialConditionClose" style="color: red;margin-left: 5px;">X</span></label>
|
||||
<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));
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-6">
|
||||
<label for="totalSumInsured">Total Sum Insured</label>
|
||||
<label for="totalSumInsured">Total Sum Assured</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" style="width: 100% !important;" class="form-control" name="totalSumInsured" id="totalSumInsured" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)">
|
||||
@ -503,6 +503,8 @@
|
||||
|
||||
$('#gpa_client_policy_id').val(client_policy_id);
|
||||
|
||||
|
||||
|
||||
var gpa_policy_type_id = $(this).attr('id');
|
||||
// console.log('gpa_policy_type_id', gpa_policy_type_id)
|
||||
|
||||
@ -558,7 +560,12 @@
|
||||
|
||||
if (elements) {
|
||||
elements.forEach((element, index) => {
|
||||
element.value = gpaJsonObjectForSpecialCondition[key][index];
|
||||
|
||||
if(gpaJsonObjectForSpecialCondition[key][index] == undefined){
|
||||
element.value = " ";
|
||||
}else{
|
||||
element.value = gpaJsonObjectForSpecialCondition[key][index];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -605,7 +612,12 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
element.value = jsonObject[key];
|
||||
|
||||
if(jsonObject[key] == undefined){
|
||||
element.value = " ";
|
||||
}else{
|
||||
element.value = jsonObject[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -643,6 +655,7 @@
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -669,9 +682,14 @@
|
||||
|
||||
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;"><input name="gpa_special_condition_label[]" id="gpa_special_condition_label[]" style="position: relative;right: 15px;"><span class="specialConditionClose" style="color: red;margin-left: 5px;">X</span></label>
|
||||
<input type="text" name="gpa_special_condition_input[]" id="gpa_special_condition_input[]" class="form-control s special_condition_input[]">
|
||||
</div>`;
|
||||
|
||||
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;">
|
||||
<input class="form-control" name="gpa_special_condition_label[]" id="gpa_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="gpa_special_condition_input[]" id="gpa_special_condition_input[]" class="form-control s special_condition_input[]">
|
||||
</div>`;
|
||||
console.log($(this));
|
||||
$('.gpa_special_condition').each(function() {
|
||||
$(this).append(appendElement);
|
||||
|
||||
@ -501,7 +501,8 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Max SI<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<div id='max_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button style="margin-top: 44px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(0,11)">x</button>
|
||||
@ -851,6 +852,10 @@ $('body').on('click', '.btnPolicyModel', function() {
|
||||
$(this).trigger('keyup');
|
||||
});
|
||||
|
||||
$('input[name="11_max_si[]"]').each(function() {
|
||||
$(this).trigger('keyup');
|
||||
});
|
||||
|
||||
var id_for_trigger = temp_for_premiumData[0].policy_grid_id;
|
||||
$(`input[name="${id_for_trigger}_si[]"]`).each(function() {
|
||||
console.log($(this));
|
||||
@ -1282,7 +1287,8 @@ function appendGridtHtml(ui_type = false, data = false, ) {
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="mobile">Max SI<span class="text-danger">*</span></label>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si[]" required>
|
||||
<input value="${data !== false && data !== undefined && data !== '' ? data.max_si : ''}" type="text" class="form-control" placeholder="Enter Max SI" name="11_max_si[]" id="11_max_si[]" onkeypress = "return onlyNumbers(event)" onkeyup="formatNumber(this)" required>
|
||||
<div id='max_si_number_word' class="text-danger-2" ></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button style="margin-top: 44px;" type="button" class="btn btn-danger" id="gmc_remove" onclick="removebutton(${Count})">x</button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user