MERGE_UAT_CLAIMS_FEEDBACK
This commit is contained in:
commit
8554264e72
@ -404,6 +404,7 @@ $routes->group("rfq", ["filter" => "authMVC"], function ($routes) {
|
||||
$routes->post("create", "LeadsController::createRFQ");
|
||||
$routes->post("createQCR", "LeadsController::createQCR");
|
||||
$routes->get("list/(:any)", "LeadsController::viewRFQ/$1");
|
||||
$routes->get("nonEB","LeadsController::rfqNonEB");
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -2534,26 +2534,34 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
|
||||
|
||||
$terms = json_decode($ClientPolicyValue['policy_terms']);
|
||||
|
||||
|
||||
if($ClientPolicyValue['policy_type_id'] == 1)
|
||||
{
|
||||
$data['policy_terms'] = $this->policyTermsFiter($terms,'gpa');
|
||||
$policyGroup = 'gpa';
|
||||
$data['ticket_type_id'] = 2;
|
||||
}else if($ClientPolicyValue['policy_type_id'] == 6)
|
||||
{
|
||||
$data['policy_terms'] = $this->policyTermsFiter($terms,'gpa');
|
||||
$policyGroup = 'gpa';
|
||||
$data['ticket_type_id'] = 3;
|
||||
}else if($ClientPolicyValue['policy_type_id'] == 7)
|
||||
{
|
||||
$data['policy_terms'] = $this->policyTermsFiter($terms,'gpa');
|
||||
$policyGroup = 'gpa';
|
||||
$data['ticket_type_id'] = 4;
|
||||
}else
|
||||
{
|
||||
$data['policy_terms'] = $this->policyTermsFiter($terms,'gmc');
|
||||
$policyGroup = 'gmc';
|
||||
$data['ticket_type_id'] = 1;
|
||||
}
|
||||
|
||||
|
||||
$terms = json_decode($ClientPolicyValue['policy_terms'] , true);
|
||||
$data['policy_terms'] = isset($terms['enrollment_display_key'])
|
||||
&& !empty($terms['enrollment_display_key'])
|
||||
? $terms['enrollment_display_key']
|
||||
: $this->policyTermsFiter($terms, $policyGroup);
|
||||
$terms = json_decode($ClientPolicyValue['policy_terms']);
|
||||
|
||||
|
||||
$data['client_id'] = $ClientPolicyValue['client_id'];
|
||||
$data['client_policy_id'] = $ClientPolicyValue['id'];
|
||||
$data['policy_name'] = $ClientPolicyValue['policy_type'];
|
||||
|
||||
@ -2384,6 +2384,11 @@ class LeadsController extends BaseController
|
||||
|
||||
return $financialYears;
|
||||
}
|
||||
|
||||
public function rfqNonEB(){
|
||||
|
||||
$this->loadLayout('view_rfq_non_eb');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -71,13 +71,20 @@ class RestAuthenticationController extends AdminController
|
||||
$mobile_number = $this->request->getJSON()->mobile_number;
|
||||
|
||||
|
||||
$employeeData = $this->employeeModel->where('mobile', $mobile_number)
|
||||
->where('relationship', 'self')
|
||||
->where('emp_status !=', 'truncated')
|
||||
->where('is_active', 1)
|
||||
->first();
|
||||
$employeeData = $this->employeeModel->select('employees.relationship,EP.employee_id')
|
||||
->join('employee_polices EP', 'EP.employee_id = employees.id', 'inner')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employees.relationship', 'self')
|
||||
->where('employees.emp_status !=', 'truncated')
|
||||
->where('employees.mobile', $mobile_number)
|
||||
->where('EP.is_active', 1)
|
||||
->whereIn('EP.status', ['active'])
|
||||
->first();
|
||||
|
||||
|
||||
|
||||
if ($employeeData) {
|
||||
if (isset($employeeData['employee_id']))
|
||||
{
|
||||
|
||||
$result = ['user_verification' => true ,'message' => "Verified Successfully"];
|
||||
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||
@ -97,11 +104,18 @@ class RestAuthenticationController extends AdminController
|
||||
$email = $this->request->getJSON()->email;
|
||||
|
||||
|
||||
$employeeData = $this->employeeModel->where('email_corporate', $email)->where('relationship', 'self')
|
||||
->where('emp_status !=', 'truncated')->where('is_active', 1)
|
||||
$employeeData = $this->employeeModel->select('employees.relationship,EP.employee_id')
|
||||
->join('employee_polices EP', 'EP.employee_id = employees.id', 'inner')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employees.relationship', 'self')
|
||||
->where('employees.emp_status !=', 'truncated')
|
||||
->where('employees.email_corporate', $email)
|
||||
->where('EP.is_active', 1)
|
||||
->whereIn('EP.status', ['active'])
|
||||
->first();
|
||||
|
||||
if ($employeeData) {
|
||||
if (isset($employeeData['employee_id']))
|
||||
{
|
||||
|
||||
$otp = random_int(100000, 999999);
|
||||
|
||||
|
||||
@ -1748,18 +1748,46 @@ function checkAndDistributeTax(input)
|
||||
let sgst = parseFloat($('#sgst_' + input).val());
|
||||
let igst = parseFloat($('#igst_' + input).val());
|
||||
|
||||
if(((event.target.id).startsWith('cgst') || (event.target.id).startsWith('sgst') ))
|
||||
{
|
||||
if(cgst !== 0) { $('#sgst_' + input).val(cgst); }
|
||||
else if(sgst !== 0) { $('#cgst_' + input).val(sgst); }
|
||||
// if(((event.target.id).startsWith('cgst') || (event.target.id).startsWith('sgst') ))
|
||||
// {
|
||||
// if(cgst !== 0) { $('#sgst_' + input).val(cgst); }
|
||||
// else if(sgst !== 0) { $('#cgst_' + input).val(sgst); }
|
||||
|
||||
// $('#igst_' + input).val(0);
|
||||
// }
|
||||
// else if((event.target.id).startsWith('igst'))
|
||||
// {
|
||||
// $('#cgst_' + input).val(0);
|
||||
// $('#sgst_' + input).val(0);
|
||||
// }
|
||||
|
||||
if (((event.target.id).startsWith('cgst') || (event.target.id).startsWith('sgst'))) {
|
||||
|
||||
if (!isFinite(cgst) || isNaN(cgst) || cgst === undefined) {
|
||||
cgst = 0;
|
||||
}
|
||||
if (!isFinite(sgst) || isNaN(sgst) || sgst === undefined) {
|
||||
sgst = 0;
|
||||
}
|
||||
|
||||
if (cgst !== 0) {
|
||||
$('#sgst_' + input).val(cgst);
|
||||
} else if (sgst !== 0) {
|
||||
$('#cgst_' + input).val(sgst);
|
||||
}
|
||||
|
||||
$('#igst_' + input).val(0);
|
||||
}
|
||||
else if((event.target.id).startsWith('igst'))
|
||||
{
|
||||
}
|
||||
else if ((event.target.id).startsWith('igst')) {
|
||||
$('#cgst_' + input).val(0);
|
||||
$('#sgst_' + input).val(0);
|
||||
}
|
||||
|
||||
// Ensure IGST, CGST, and SGST are never NaN, undefined, or Infinity
|
||||
$('#igst_' + input).val(isFinite($('#igst_' + input).val()) ? $('#igst_' + input).val() : 0);
|
||||
$('#cgst_' + input).val(isFinite($('#cgst_' + input).val()) ? $('#cgst_' + input).val() : 0);
|
||||
$('#sgst_' + input).val(isFinite($('#sgst_' + input).val()) ? $('#sgst_' + input).val() : 0);
|
||||
|
||||
}
|
||||
|
||||
function amountCalculation(input) {
|
||||
@ -2293,11 +2321,21 @@ $(document).on('change', '[name="base_premium[]"], [name="co_share_per[]"]', fun
|
||||
let basePremium = $('input[name="base_premium[]"]').toArray()
|
||||
.map(input => parseFloat($(input).val()) || 0)
|
||||
.find(value => value > 0) || 0;
|
||||
|
||||
let tpPremium = $('input[name="tp_premium[]"]').toArray()
|
||||
.map(input => parseFloat($(input).val()) || 0)
|
||||
.find(value => value > 0) || 0;
|
||||
|
||||
let terPremium = $('input[name="tp_premium[]"]').toArray()
|
||||
.map(input => parseFloat($(input).val()) || 0)
|
||||
.find(value => value > 0) || 0;
|
||||
|
||||
console.log('Base Premium:', basePremium);
|
||||
console.log('TP Premium:', tpPremium);
|
||||
|
||||
// Loop through all co_share_per[] fields
|
||||
$('input[name="co_share_per[]"]').each(function(index) {
|
||||
|
||||
const coSharePer = parseFloat($(this).val()) || 0; // Get co_share_per value
|
||||
const coPremium = (basePremium * coSharePer) / 100; // Calculate co_premium
|
||||
|
||||
@ -3536,6 +3574,9 @@ var insurerCount = 0;
|
||||
$('#setInsurerCount').on('click', function() {
|
||||
|
||||
addInsurerColumn(); // Ensure this function is defined properly
|
||||
setTimeout(() => {
|
||||
getColumnIndexes();
|
||||
}, 2000);
|
||||
|
||||
});
|
||||
|
||||
@ -3840,6 +3881,9 @@ function addInsurerColumn() {
|
||||
const index = $(this).closest('th').index();
|
||||
let count_index = $(this).data('count');
|
||||
removeInsurerColumn(index, count_index);
|
||||
setTimeout(() => {
|
||||
getColumnIndexes();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
// hidePermiumDetailsBasedOnTheTeam()
|
||||
|
||||
@ -32,32 +32,32 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_code">Employee ID <i class="fa fa-search text-danger"
|
||||
<label for="emp_code">Employee ID <span class="text-danger">*</span> <i class="fa fa-search text-danger"
|
||||
aria-hidden="true" onclick="openFetchEmpDataodal(this)"></i> <span
|
||||
class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_code" placeholder="Enter Employee ID"
|
||||
value="<?= isset($ticket_data['emp_code']) ? $ticket_data['emp_code'] : '' ?>"
|
||||
name="emp_code">
|
||||
name="emp_code" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
|
||||
<label for="emp_name">Employee Name <span class="text-danger">*</span></label>
|
||||
<input type=hidden id="emp_id" name="emp_id" value="<?= isset($ticket_data['emp_id']) ? $ticket_data['emp_id'] : '' ?>">
|
||||
<input type="text" class="form-control" id="emp_name" placeholder="Enter Employee Name"
|
||||
value="<?= isset($ticket_data['emp_name']) ? $ticket_data['emp_name'] : '' ?>"
|
||||
name="emp_name">
|
||||
name="emp_name" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insured_name"> Insured Name <span class="text-danger"></span></label>
|
||||
<label for="insured_name"> Insured Name <span class="text-danger">*</span></label>
|
||||
<input type=hidden id="insured_emp_id" name="insured_emp_id" value="<?= isset($ticket_data['insured_emp_id']) ? $ticket_data['insured_emp_id'] : '' ?>">
|
||||
<input class="form-control" id="insured_name" name="insured_name" value="<?= isset($ticket_data['insured_name']) ? $ticket_data['insured_name'] : '' ?>">
|
||||
<input class="form-control" id="insured_name" name="insured_name" value="<?= isset($ticket_data['insured_name']) ? $ticket_data['insured_name'] : '' ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="relationship"> Relationship <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="relationship" name="relationship">
|
||||
<option value="0">Select Relationship</option>
|
||||
<label for="relationship"> Relationship <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="relationship" name="relationship" required>
|
||||
<option value="">Select Relationship</option>
|
||||
<?php
|
||||
if (isset($relationshipType) && count($relationshipType)) {
|
||||
foreach ($relationshipType as $key => $value) {
|
||||
@ -70,54 +70,54 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="policy_no">Policy No<span class="text-danger"></span></label>
|
||||
<label for="policy_no">Policy No <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="policy_no"
|
||||
value="<?= isset($ticket_data['policy_no']) ? $ticket_data['policy_no'] : '' ?>"
|
||||
name="policy_no" placeholder="Policy Number" >
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="tpa_id">TPA ID<span class="text-danger"></span></label>
|
||||
<label for="tpa_id">TPA ID <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="tpa_no" placeholder="Enter TPA ID"
|
||||
value="<?= isset($ticket_data['tpa_no']) ? $ticket_data['tpa_no'] : '' ?>"
|
||||
name="tpa_no">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_mobile">Employee Mobile No<span class="text-danger"></span></label>
|
||||
<label for="emp_mobile">Employee Mobile No <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="emp_mobile" placeholder="Enter EMP Mobile"
|
||||
value="<?= isset($ticket_data['emp_mobile']) ? $ticket_data['emp_mobile'] : '' ?>"
|
||||
name="emp_mobile">
|
||||
name="emp_mobile" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_mail">Employee Mail ID<span class="text-danger"></span></label>
|
||||
<label for="emp_mail">Employee Mail ID <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="emp_mail" placeholder="Enter EMP Mail"
|
||||
value="<?= isset($ticket_data['emp_mail']) ? $ticket_data['emp_mail'] : '' ?>"
|
||||
name="emp_mail">
|
||||
name="emp_mail" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
|
||||
<label for="client_name">Corporate Name <span class="text-danger">*</span></label>
|
||||
<input type="hidden" id="client_id" name="client_id" value="<?= isset($ticket_data['client_id']) ? $ticket_data['client_id'] : '' ?>">
|
||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly>
|
||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
||||
<label for="insurer_id">Insurer <span class="text-danger">*</span></label>
|
||||
<input type=hidden id="insurer_id" name="insurer_id" value="<?= isset($ticket_data['insurer_id']) ? $ticket_data['insurer_id'] : '' ?>">
|
||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly>
|
||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="tpa_id">TPA<span class="text-danger"></span></label>
|
||||
<label for="tpa_id">TPA <span class="text-danger"></span></label>
|
||||
<input type=hidden id="tpa_id" name="tpa_id" value="<?= isset($ticket_data['tpa_id']) ? $ticket_data['tpa_id'] : '' ?>">
|
||||
<input type=text class="form-control" id="tpa_name" placeholder="TPA" value="<?= isset($ticket_data['tpa_name']) ? $ticket_data['tpa_name'] : '' ?>" readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="acm_id" name="acm_id">
|
||||
<label for="acm_id">Account Manager <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="acm_id" name="acm_id" required>
|
||||
<!-- <option value="0">Select Account Manager</option> -->
|
||||
<?php
|
||||
if (isset($acms) && count($acms)) {
|
||||
@ -133,6 +133,7 @@
|
||||
</div>
|
||||
<!-- end first_data_points -->
|
||||
|
||||
<br><br>
|
||||
<h5>Claim Details</h5>
|
||||
<hr>
|
||||
|
||||
@ -140,8 +141,8 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_status">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
||||
<label for="claim_status">Status <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="claim_status_id" name="claim_status_id" required>
|
||||
<!-- <option value="0">Select status</option> -->
|
||||
<?php
|
||||
if (isset($claim_status) && count($claim_status)) {
|
||||
@ -155,8 +156,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="priority">Priority<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="priority" name="priority">
|
||||
<label for="priority">Priority <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="priority" name="priority" required>
|
||||
<!-- <option value="0">Select Priority</option> -->
|
||||
<?php
|
||||
if (isset($priorityType) && count($priorityType)) {
|
||||
@ -170,9 +171,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mode_of_intimation"> Mode of Intimation <span
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="mode_of_intimation" name="mode_of_intimation">
|
||||
<label for="mode_of_intimation"> Mode of Submission <span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="mode_of_intimation" name="mode_of_intimation" required>
|
||||
<!-- <option value="0">Select Mode</option> -->
|
||||
<?php
|
||||
if (isset($modeOFIntimate) && count($modeOFIntimate)) {
|
||||
@ -186,8 +187,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_type"> Claim Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_type" name="claim_type">
|
||||
<label for="claim_type"> Claim Type <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="claim_type" name="claim_type" required>
|
||||
<!-- <option value="0">Select claim Type</option> -->
|
||||
<?php
|
||||
if (isset($claim_type) && count($claim_type)) {
|
||||
@ -201,36 +202,36 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="hospital_name">Hospital Name<span class="text-danger"></span></label>
|
||||
<label for="hospital_name">Hospital Name <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="hospital_name"
|
||||
placeholder="Enter Hospital Name"
|
||||
value="<?= isset($ticket_data['hospital_name']) ? $ticket_data['hospital_name'] : '' ?>"
|
||||
name="hospital_name">
|
||||
name="hospital_name" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="doa">DOA<span class="text-danger"></span></label>
|
||||
<label for="doa">DOA <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="doa" placeholder="Enter DOA"
|
||||
value="<?= isset($ticket_data['doa']) ? $ticket_data['doa'] : '' ?>"
|
||||
name="doa">
|
||||
name="doa" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="dod">DOD<span class="text-danger"></span></label>
|
||||
<label for="dod">DOD <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="dod" placeholder="Enter DOD"
|
||||
value="<?= isset($ticket_data['dod']) ? $ticket_data['dod'] : '' ?>" name="dod">
|
||||
value="<?= isset($ticket_data['dod']) ? $ticket_data['dod'] : '' ?>" name="dod" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_amount">Claim Amount<span class="text-danger"></span></label>
|
||||
<label for="claim_amount">Claim Amount <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="claim_amount"
|
||||
placeholder="Enter Claim Amount"
|
||||
value="<?= isset($ticket_data['claim_amount']) ? $ticket_data['claim_amount'] : '' ?>"
|
||||
name="claim_amount">
|
||||
name="claim_amount" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id="pod_no_label_1" for="pod_no">POD No<span id="pod_no_label_1_span" class="text-danger"></span></label>
|
||||
<label id="pod_no_label_1" for="pod_no">POD No with Courier Name <span id="pod_no_label_1_span" class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="pod_no" placeholder="Enter POD NO"
|
||||
value="<?= isset($ticket_data['pod_no']) ? $ticket_data['pod_no'] : '' ?>"
|
||||
name="pod_no">
|
||||
@ -239,6 +240,7 @@
|
||||
</div>
|
||||
<!-- end second_data_points -->
|
||||
|
||||
<br><br>
|
||||
<h5>Additional Details</h5>
|
||||
<hr>
|
||||
|
||||
@ -246,7 +248,7 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3 up_cnu" style="display: none;">
|
||||
<label for="claim_number">Claim Number<span class="text-danger"></span></label>
|
||||
<label for="claim_number">Claim Number <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="claim_number" placeholder="Enter Claim NO"
|
||||
value="<?= isset($ticket_data['claim_number']) ? $ticket_data['claim_number'] : '' ?>"
|
||||
name="claim_number">
|
||||
@ -335,7 +337,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 returned" style="display: none;">
|
||||
<label for="awb_no_courier_name">AWB No with Courier Name</label>
|
||||
<label for="awb_no_courier_name">Return AWB No with Courier Name</label>
|
||||
<input type="text" class="form-control" id="awb_no_courier_name" placeholder="eg : 0001/ST Courier"
|
||||
value="<?= isset($ticket_data['awb_no_courier_name']) ? $ticket_data['awb_no_courier_name'] : '' ?>" name="awb_no_courier_name">
|
||||
</div>
|
||||
@ -563,7 +565,46 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('.' + thirdClass).find('input, textarea').attr('required', true);
|
||||
// $('.' + thirdClass).find('input, textarea').attr('required', true);
|
||||
let extrafieldsArray = $('#extra_fields_array_for_validate').val();
|
||||
try {
|
||||
extrafieldsArray = JSON.parse(extrafieldsArray); // Convert string to object
|
||||
} catch (error) {
|
||||
console.error("Invalid JSON format in extra_fields_array_for_validate:", error);
|
||||
return;
|
||||
}
|
||||
|
||||
var selectedClaimStatus = $('#claim_status_id').val();
|
||||
var $thirdClass = $(`.${thirdClass}`);
|
||||
var hasValue = $thirdClass.find('input, textarea, select').filter(function () {
|
||||
return $(this).val().trim() !== ''; // Check if at least one field is not empty
|
||||
}).length > 0;
|
||||
|
||||
$thirdClass.each(function () {
|
||||
var id = $(this).find('[id]').first().attr('id');
|
||||
var $label = $(this).find('label');
|
||||
var $thisDiv = $(this);
|
||||
var $inputs = $thisDiv.find('input, textarea, select');
|
||||
|
||||
|
||||
// ✅ Condition 1: Check if this ID is in extraFieldsArray (required by status)
|
||||
var shouldAddRequired = extrafieldsArray[selectedClaimStatus] && extrafieldsArray[selectedClaimStatus].includes(id);
|
||||
|
||||
// ✅ Condition 2: If any field in the class has a value, make all required
|
||||
if (shouldAddRequired || hasValue) {
|
||||
if ($label.length && !$label.find('.text-danger').length) {
|
||||
$label.append(' <span class="text-danger">*</span>');
|
||||
}
|
||||
console.log("input from if ",$inputs);
|
||||
// $inputs.attr('required', true);
|
||||
$('.' + thirdClass).find('input, textarea,select').attr('required', true);
|
||||
} else {
|
||||
$label.find('.text-danger').remove();
|
||||
console.log("input ",$inputs);
|
||||
// $inputs.prop('required', false);
|
||||
$('.' + thirdClass).find('input, textarea,select').attr('required', false);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@ -585,7 +626,7 @@
|
||||
if ($parentDiv.length) {
|
||||
let thirdClass = $parentDiv.attr("class").split(" ")[2] || "";
|
||||
console.log('thirdClass', thirdClass);
|
||||
addRequiredFieldSymbolByClass(thirdClass);
|
||||
// addRequiredFieldSymbolByClass(thirdClass);
|
||||
// addRequiredFieldSymbol(targetId);
|
||||
if (thirdClass) {
|
||||
// console.log("fields",fields);
|
||||
@ -606,64 +647,97 @@
|
||||
}
|
||||
});
|
||||
|
||||
function addRequiredFieldSymbol(field_name) {
|
||||
// Find the field with the given name
|
||||
var $field = $(`[name="${field_name}"]`);
|
||||
// function addRequiredFieldSymbol(field_name) {
|
||||
// // Find the field with the given name
|
||||
// var $field = $(`[name="${field_name}"]`);
|
||||
|
||||
if ($field.length) {
|
||||
// Find the parent div of this field
|
||||
var $parentDiv = $field.closest('div');
|
||||
// if ($field.length) {
|
||||
// // Find the parent div of this field
|
||||
// var $parentDiv = $field.closest('div');
|
||||
|
||||
if ($parentDiv.length) {
|
||||
// Get the classes as an array
|
||||
var classes = $parentDiv.attr('class') ? $parentDiv.attr('class').split(/\s+/) : [];
|
||||
// if ($parentDiv.length) {
|
||||
// // Get the classes as an array
|
||||
// var classes = $parentDiv.attr('class') ? $parentDiv.attr('class').split(/\s+/) : [];
|
||||
|
||||
if (classes.length > 0) {
|
||||
// Get the last class in the array
|
||||
var lastClass = classes[classes.length - 1];
|
||||
// if (classes.length > 0) {
|
||||
// // Get the last class in the array
|
||||
// var lastClass = classes[classes.length - 1];
|
||||
|
||||
// Find all divs with this last class
|
||||
var $allDivsWithClass = $(`.${lastClass}`);
|
||||
// // Find all divs with this last class
|
||||
// var $allDivsWithClass = $(`.${lastClass}`);
|
||||
|
||||
// Add asterisk to all labels within these divs
|
||||
$allDivsWithClass.each(function() {
|
||||
var $label = $(this).find('label');
|
||||
if ($label.length && !$label.find('.text-danger').length) {
|
||||
$label.append(' <span class="text-danger">*</span>');
|
||||
}
|
||||
});
|
||||
// // Add asterisk to all labels within these divs
|
||||
// $allDivsWithClass.each(function() {
|
||||
// var $label = $(this).find('label');
|
||||
// if ($label.length && !$label.find('.text-danger').length) {
|
||||
// $label.append(' <span class="text-danger">*</span>');
|
||||
// }
|
||||
// });
|
||||
|
||||
console.log(`Added required symbol to ${$allDivsWithClass.length} labels with class "${lastClass}"`);
|
||||
} else {
|
||||
console.warn(`Parent div for field "${field_name}" has no classes`);
|
||||
}
|
||||
} else {
|
||||
console.warn(`No parent div found for field name="${field_name}"`);
|
||||
}
|
||||
} else {
|
||||
console.warn(`No field found with name="${field_name}"`);
|
||||
}
|
||||
}
|
||||
// console.log(`Added required symbol to ${$allDivsWithClass.length} labels with class "${lastClass}"`);
|
||||
// } else {
|
||||
// console.warn(`Parent div for field "${field_name}" has no classes`);
|
||||
// }
|
||||
// } else {
|
||||
// console.warn(`No parent div found for field name="${field_name}"`);
|
||||
// }
|
||||
// } else {
|
||||
// console.warn(`No field found with name="${field_name}"`);
|
||||
// }
|
||||
// }
|
||||
|
||||
function addRequiredFieldSymbolByClass(className) {
|
||||
// Find all divs with the specified class
|
||||
var $divsWithClass = $(`.${className}`);
|
||||
|
||||
|
||||
if ($divsWithClass.length) {
|
||||
// Add asterisk to all labels within these divs
|
||||
$divsWithClass.each(function() {
|
||||
var $label = $(this).find('label');
|
||||
if ($label.length && !$label.find('.text-danger').length) {
|
||||
$label.append(' <span class="text-danger">*</span>');
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`Added required symbol to ${$divsWithClass.length} labels with class "${className}"`);
|
||||
let extrafieldsArray = $('#extra_fields_array_for_validate').val();
|
||||
try {
|
||||
extrafieldsArray = JSON.parse(extrafieldsArray); // Convert string to object
|
||||
} catch (error) {
|
||||
console.error("Invalid JSON format in extra_fields_array_for_validate:", error);
|
||||
return;
|
||||
}
|
||||
|
||||
var selectedClaimStatus = $('#claim_status_id').val();
|
||||
console.log("Selected claim status ID:", selectedClaimStatus);
|
||||
console.log("Extra Field Array:", extrafieldsArray[selectedClaimStatus]);
|
||||
|
||||
// ✅ Check if at least one field inside the class has a value
|
||||
// var hasValue = $divsWithClass.find('input, textarea, select').filter(function () {
|
||||
// return $(this).val().trim() !== ''; // Check if at least one field is not empty
|
||||
// }).length > 0;
|
||||
|
||||
// $divsWithClass.each(function () {
|
||||
// var id = $(this).find('[id]').first().attr('id');
|
||||
// var $label = $(this).find('label');
|
||||
// var $thisDiv = $(this);
|
||||
// var $inputs = $thisDiv.find('input, textarea, select');
|
||||
|
||||
|
||||
// // ✅ Condition 1: Check if this ID is in extraFieldsArray (required by status)
|
||||
// var shouldAddRequired = extrafieldsArray[selectedClaimStatus] && extrafieldsArray[selectedClaimStatus].includes(id);
|
||||
|
||||
// // ✅ Condition 2: If any field in the class has a value, make all required
|
||||
// if (shouldAddRequired || hasValue) {
|
||||
// if ($label.length && !$label.find('.text-danger').length) {
|
||||
// $label.append(' <span class="text-danger">*</span>');
|
||||
// }
|
||||
// console.log("input from if ",$inputs);
|
||||
// $inputs.attr('required', true);
|
||||
// } else {
|
||||
// $label.find('.text-danger').remove();
|
||||
// console.log("input ",$inputs);
|
||||
// $inputs.prop('required', false);
|
||||
// }
|
||||
// });
|
||||
|
||||
console.log(`Processed ${$divsWithClass.length} labels with class "${className}"`);
|
||||
} else {
|
||||
console.warn(`No divs found with class="${className}"`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#mode_of_intimation').change(function(){
|
||||
console.log("function called");
|
||||
var mode_of_intimation = $('#mode_of_intimation').val();
|
||||
|
||||
@ -39,57 +39,57 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_code">Employee ID <i class="fa fa-search text-danger"
|
||||
<label for="emp_code">Employee ID <span class="text-danger">*</span> <i class="fa fa-search text-danger"
|
||||
aria-hidden="true" onclick="openFetchEmpDataodal(this)"></i> <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="emp_code" placeholder="Enter Employee ID"
|
||||
value="<?= isset($ticket_data['emp_code']) ? $ticket_data['emp_code'] : '' ?>"
|
||||
name="emp_code">
|
||||
name="emp_code" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
|
||||
<label for="emp_name">Employee Name <span class="text-danger">*</span></label>
|
||||
<input type=hidden id="emp_id" name="emp_id" value="<?= isset($ticket_data['emp_id']) ? $ticket_data['emp_id'] : '' ?>">
|
||||
<input type="text" class="form-control" id="emp_name" placeholder="Enter Employee Name"
|
||||
value="<?= isset($ticket_data['emp_name']) ? $ticket_data['emp_name'] : '' ?>"
|
||||
name="emp_name">
|
||||
name="emp_name" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_mobile">Employee Mobile No<span class="text-danger"></span></label>
|
||||
<label for="emp_mobile">Employee Mobile No <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="emp_mobile" placeholder="Enter EMP Mobile"
|
||||
value="<?= isset($ticket_data['emp_mobile']) ? $ticket_data['emp_mobile'] : '' ?>"
|
||||
name="emp_mobile">
|
||||
name="emp_mobile" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="emp_mail">Employee Mail ID<span class="text-danger"></span></label>
|
||||
<label for="emp_mail">Employee Mail ID <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="emp_mail" placeholder="Enter EMP Mail"
|
||||
value="<?= isset($ticket_data['emp_mail']) ? $ticket_data['emp_mail'] : '' ?>"
|
||||
name="emp_mail">
|
||||
name="emp_mail" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="policy_no">Policy No<span class="text-danger"></span></label>
|
||||
<label for="policy_no">Policy No <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="policy_no"
|
||||
value="<?= isset($ticket_data['policy_no']) ? $ticket_data['policy_no'] : '' ?>"
|
||||
name="policy_no">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
|
||||
<label for="client_name">Corporate Name <span class="text-danger">*</span></label>
|
||||
<input type="hidden" id="client_id" name="client_id" value="<?= isset($ticket_data['client_id']) ? $ticket_data['client_id'] : '' ?>">
|
||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly>
|
||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
||||
<label for="insurer_id">Insurer <span class="text-danger">*</span></label>
|
||||
<input type=hidden id="insurer_id" name="insurer_id" value="<?= isset($ticket_data['insurer_id']) ? $ticket_data['insurer_id'] : '' ?>">
|
||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly>
|
||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="acm_id" name="acm_id">
|
||||
<label for="acm_id">Account Manager <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="acm_id" name="acm_id" required>
|
||||
<!-- <option value="0">Select Account Manager</option> -->
|
||||
<?php
|
||||
if (isset($acms) && count($acms)) {
|
||||
@ -105,6 +105,7 @@
|
||||
</div>
|
||||
<!-- end first_data_points -->
|
||||
|
||||
<br><br>
|
||||
<h5>Claim Details</h5>
|
||||
<hr>
|
||||
|
||||
@ -128,8 +129,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_status">Status<span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
||||
<label for="claim_status">Status <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="claim_status_id" name="claim_status_id" required>
|
||||
<!-- <option value="0">Select status</option> -->
|
||||
<?php
|
||||
if (isset($claim_status) && count($claim_status)) {
|
||||
@ -143,8 +144,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="claim_type"> Claim Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="claim_type" name="claim_type">
|
||||
<label for="claim_type"> Claim Type <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="claim_type" name="claim_type" required>
|
||||
<!-- <option value="0">Select claim Type</option> -->
|
||||
<?php
|
||||
if (isset($claim_type) && count($claim_type)) {
|
||||
@ -174,13 +175,13 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="dob">Date of Birth<span class="text-danger"></span></label>
|
||||
<label for="dob">Date of Birth <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="dob" placeholder="Enter Birth Date"
|
||||
value="<?= isset($ticket_data['dob']) ? $ticket_data['dob'] : '' ?>" name="dob">
|
||||
value="<?= isset($ticket_data['dob']) ? $ticket_data['dob'] : '' ?>" name="dob" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="date_of_accident">Date of Accident<span class="text-danger"></span></label>
|
||||
<label for="date_of_accident">Date of Accident <span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="date_of_accident"
|
||||
placeholder="Enter Accident Date"
|
||||
value="<?= isset($ticket_data['date_of_accident']) ? $ticket_data['date_of_accident'] : '' ?>"
|
||||
@ -188,7 +189,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="date_of_death">Date of Death<span class="text-danger"></span></label>
|
||||
<label for="date_of_death">Date of Death <span class="text-danger"></span></label>
|
||||
<input type="date_of_death" class="form-control" id="date_of_death"
|
||||
placeholder="Enter Death Date"
|
||||
value="<?= isset($ticket_data['date_of_death']) ? $ticket_data['date_of_death'] : '' ?>"
|
||||
@ -196,22 +197,23 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="date_of_intimat">Date of Intimation<span class="text-danger"></span></label>
|
||||
<label for="date_of_intimat">Date of Intimation <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="date_of_intimat"
|
||||
placeholder="Enter Intimation Date"
|
||||
value="<?= isset($ticket_data['date_of_intimat']) ? $ticket_data['date_of_intimat'] : '' ?>"
|
||||
name="date_of_intimat">
|
||||
name="date_of_intimat" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="si_amt">Sum insured<span class="text-danger"></span></label>
|
||||
<label for="si_amt">Sum insured <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="si_amt" placeholder="Enter SI"
|
||||
value="<?= isset($ticket_data['si_amt']) ? $ticket_data['si_amt'] : '' ?>"
|
||||
name="si_amt">
|
||||
name="si_amt" required>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end second_data_points -->
|
||||
|
||||
<br><br>
|
||||
<h5>Additional Details</h5>
|
||||
<hr>
|
||||
|
||||
|
||||
@ -5666,7 +5666,7 @@ function autoCaluculationForPremiumChildTable(input) {
|
||||
.qcr === 0);
|
||||
if (actionData) first_json.table_data.data.splice(rowKey, 1);
|
||||
});
|
||||
|
||||
|
||||
console.log("Modified JSON:", first_json);
|
||||
return first_json;
|
||||
}
|
||||
|
||||
1905
app/Views/view_rfq_non_eb.php
Normal file
1905
app/Views/view_rfq_non_eb.php
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user