CHANGE_NEW_FIELDS_ADD_IN CLAIMS_GMC
This commit is contained in:
parent
fff305be38
commit
e399abd42e
@ -83,6 +83,12 @@ class TicketMasterModel extends Model
|
||||
'manager_id',
|
||||
'agent_id' ,
|
||||
'vehicle_id',
|
||||
|
||||
'hospital_address',
|
||||
'hospital_state',
|
||||
'hospital_city',
|
||||
'hospital_pin_code',
|
||||
'hospital_phone_no',
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -283,6 +283,45 @@
|
||||
name="hospital_name" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-9">
|
||||
<label class="label-font-size" for="hospital_address">Hospital Address <span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="hospital_address" name="hospital_address" rows="1" placeholder="Enter Hospital Address" required>
|
||||
<?= isset($ticket_data['hospital_address']) ? $ticket_data['hospital_address'] : '' ?>
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label class="label-font-size" for="hospital_city">Hospital City <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="hospital_city"
|
||||
placeholder="Enter Hospital City"
|
||||
value="<?= isset($ticket_data['hospital_city']) ? $ticket_data['hospital_city'] : '' ?>"
|
||||
name="hospital_city" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label class="label-font-size" for="hospital_state">Hospital State <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="hospital_state"
|
||||
placeholder="Enter Hospital State"
|
||||
value="<?= isset($ticket_data['hospital_state']) ? $ticket_data['hospital_state'] : '' ?>"
|
||||
name="hospital_state" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label class="label-font-size" for="hospital_pin_code">Hospital Pincode <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="hospital_pin_code" maxlength="6"
|
||||
placeholder="Enter Pincode"
|
||||
value="<?= isset($ticket_data['hospital_pin_code']) ? $ticket_data['hospital_pin_code'] : '' ?>"
|
||||
name="hospital_pin_code" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label class="label-font-size" for="hospital_phone_no">Hospital Phone <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="hospital_phone_no" minlength="10" maxlength="10"
|
||||
placeholder="Enter Phone Number"
|
||||
value="<?= isset($ticket_data['hospital_phone_no']) ? $ticket_data['hospital_phone_no'] : '' ?>"
|
||||
name="hospital_phone_no" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label class="label-font-size" for="doa">DOA <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="doa" placeholder="Enter DOA"
|
||||
@ -476,7 +515,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Info Modal -->
|
||||
<div class="modal fade" id="moreInfoModal" tabindex="-1" role="dialog" aria-labelledby="fullWidthModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
@ -494,7 +532,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
// $(document).ready(function() {
|
||||
// var calim_status = $('#claim_status_id').val();
|
||||
@ -512,6 +549,8 @@
|
||||
var doa;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
let tpa_id_for_hid_filed = '<?= isset($ticket_data['tpa_id']) ? $ticket_data['tpa_id'] : '' ?>';
|
||||
$("#emp_client_policy").select2();
|
||||
|
||||
var policy_id = $("#emp_client_policy").val();
|
||||
@ -576,7 +615,7 @@
|
||||
GlobelExtraFields = extraFields;
|
||||
console.log("extraFields", extraFields);
|
||||
claimStatusFieldChanges(extraFields);
|
||||
|
||||
handleTPARequired(tpa_id_for_hid_filed);
|
||||
})
|
||||
|
||||
// function updateClaimStatusDisplay(value) {
|
||||
@ -1211,8 +1250,12 @@
|
||||
$('#insurer_name').val(insurer_name);
|
||||
$('#tpa_id').val(tap_id);
|
||||
$('#tpa_name').val(tap_name);
|
||||
|
||||
handleTPARequired(tap_id);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$("#infoIcon").click(function() {
|
||||
var ticket_id = $('#ticket_master_id').val();
|
||||
@ -1320,7 +1363,42 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleTPARequired(tpaId) {
|
||||
|
||||
console.log('handleTPARequired function called with tpaid :', tpaId)
|
||||
|
||||
const fields = [
|
||||
"hospital_address",
|
||||
"hospital_city",
|
||||
"hospital_state",
|
||||
"hospital_pin_code",
|
||||
"hospital_phone_no"
|
||||
];
|
||||
|
||||
fields.forEach(function (id) {
|
||||
const input = document.getElementById(id);
|
||||
const label = document.querySelector(`label[for="${id}"]`);
|
||||
|
||||
if (!input || !label) return;
|
||||
|
||||
if (tpaId == 3) {
|
||||
input.setAttribute("required", true);
|
||||
|
||||
if (!label.querySelector(".text-danger")) {
|
||||
label.innerHTML += ' <span class="text-danger">*</span>';
|
||||
}
|
||||
|
||||
} else {
|
||||
input.removeAttribute("required");
|
||||
const star = label.querySelector("span.text-danger");
|
||||
if (star) star.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- <script>
|
||||
document.getElementById('approved_amount').addEventListener('input', function () {
|
||||
let claimAmount = parseFloat(document.getElementById('claim_amount').value) || 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user