latest commit 17-05-2025

This commit is contained in:
vadivelJ96 2025-05-17 17:13:17 +05:30
parent 52d96bf4a9
commit 3d89cb6826

View File

@ -716,7 +716,7 @@
<div class="modal-footer">
<span style="min-width: 150px; max-width: 150px;">
<select class="form-control select2" name="remark" id="remarkInFormId" required>
<select class="form-control " name="remark" id="remarkInFormId" required>
<option value="">Select</option>
<option value="noRemark">No Remark</option>
<option value="accepted">Accepted</option>
@ -1219,6 +1219,7 @@
$('#dwnldReportCommentsId').text(reportComments);
$('#dwnldGradeId').text(gradeRange);
$('#dwnldTimeId').text(reportTime);
$('#remarkInFormId').val(remark);
if (sandType.trim().toLowerCase() == "silica sand") {
@ -1945,27 +1946,36 @@
<!-- remark onchange -->
<script>
$('#remarkInFormId').change(function() {
let remark = $(this).val();
$(document).ready(function(){
$('#dwnldAcceptedId').text("");
$('#dwnldAcceptedUnderDeviationId').text("");
$('#dwnldRejectedId').text("");
$('#remarkInFormId').change(function() {
if (remark == "accepted") {
$('#dwnldAcceptedId').text("Yes");
} else if (remark == "conditionallyAccepted") {
$('#dwnldAcceptedUnderDeviationId').text("Yes");
} else if (remark == "rejected") {
$('#dwnldRejectedId').text("Yes");
}
//without saving current change , cannot download the pdf
$('#pdfGenerateId').css('display', 'none');
$('#reportNotice').text("* Please save the changes to download");
let remark = $(this).val();
$('#dwnldAcceptedId').text("");
$('#dwnldAcceptedUnderDeviationId').text("");
$('#dwnldRejectedId').text("");
if (remark == "accepted") {
$('#dwnldAcceptedId').text("Yes");
} else if (remark == "conditionallyAccepted") {
$('#dwnldAcceptedUnderDeviationId').text("Yes");
} else if (remark == "rejected") {
$('#dwnldRejectedId').text("Yes");
}
//without saving current change , cannot download the pdf
$('#pdfGenerateId').css('display', 'none');
$('#reportNotice').text("* Please save the changes to download");
})
})
</script>
<!-- onchange of month submit will happen -->
@ -2036,12 +2046,7 @@
dropdownParent: $('#fullscreenDiv')
});
// Initialize Select2 when the modal is shown inside full screen
$('#downloadLabReportModel,').on('shown.bs.modal', function () {
$('.select2').select2({
dropdownParent: $(this) // This ensures Select2 works in the modal
});
});
});