FIX_Claims Popup

This commit is contained in:
venba-Inspriron-3558 2025-11-28 15:11:53 +05:30
parent cdabe7673e
commit eca93988fe
2 changed files with 53 additions and 5 deletions

View File

@ -300,6 +300,7 @@
<label class="label-font-size" for="claim_amount">Claim Amount <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="claim_amount"
placeholder="Enter Claim Amount"
oninput="this.value = this.value.replace(/[^0-9]/g,'');"
value="<?= isset($ticket_data['claim_amount']) ? $ticket_data['claim_amount'] : '' ?>"
name="claim_amount" required>
</div>
@ -375,6 +376,9 @@
<input type="text" class="form-control" id="approved_amount" placeholder="Enter Approved Amount"
value="<?= isset($ticket_data['approved_amount']) ? $ticket_data['approved_amount'] : '' ?>" name="approved_amount"
oninput="this.value = this.value.replace(/[^0-9]/g, '');">
<!-- <small class="text-danger d-none" id="approved_error">
Approved Amount cannot be greater than Claim Amount
</small> -->
</div>
<div class="form-group col-md-3 approved" style="display: none;">
@ -1316,4 +1320,31 @@
}
}
}
</script>
</script>
<!-- <script>
document.getElementById('approved_amount').addEventListener('input', function () {
let claimAmount = parseFloat(document.getElementById('claim_amount').value) || 0;
let approvedAmount = parseFloat(this.value) || 0;
let error = document.getElementById('approved_error');
if (approvedAmount > claimAmount) {
this.value = claimAmount;
error.classList.remove('d-none');
} else {
error.classList.add('d-none');
}
});
</script>
<script>
document.getElementById('policy_form').addEventListener('submit', function (e) {
let claimAmount = parseFloat(document.getElementById('claim_amount').value) || 0;
let approvedAmount = parseFloat(document.getElementById('approved_amount').value) || 0;
if (approvedAmount > claimAmount) {
e.preventDefault();
toastr.warning('Approved Amount cannot be greater than Claim Amount', "Warning");
document.getElementById('approved_amount').focus();
return false;
}
});
</script> -->

View File

@ -1,6 +1,20 @@
<style>
/** CSS changes are not applying on the Client Onboarding screen . so i implement this CSS fixes . */
.modal-dialog {
max-width: 500px !important;
}
@media (min-width: 576px) {
.modal-dialog {
max-width: 500px;
margin: 1.75rem auto;
}
}
</style>
<div class="modal fade" id="New_Ticket_modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-content" style="height: 200px !important;">
<div class="modal-header">
<h4 class="modal-title" id="myCenterModalLabel"></h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
@ -18,9 +32,12 @@
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick="submitToRedirectTicketNewUrl(this)">Submit</button>
<div class="form-row">
<div class="form-group col-md-12 text-right">
<!-- <div class="form-group col-md-12 text-end"> -->
<button type="button" class="btn btn-primary mt-1" onclick="submitToRedirectTicketNewUrl(this)">Submit</button>
</div>
</div>
</div>
</div>
</div>