CHANGE_HEAD_APPROVE_MODEL : RV
This commit is contained in:
parent
009caf04c5
commit
c5d25b70ba
@ -275,9 +275,11 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
var dob = flatpickr("#dob", {
|
||||
dateFormat: "d/M/Y",
|
||||
allowInput: false
|
||||
dateFormat: "d/m/Y",
|
||||
allowInput: false, // Allows manual input
|
||||
yearSelector: true, // Ensures year can be selected manually
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$(document).ready(function() {
|
||||
@ -542,7 +544,4 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -186,7 +186,7 @@ function openFetchEmpDataodal() {
|
||||
myModal.show();
|
||||
}
|
||||
|
||||
function setMemberData(input) {
|
||||
function setMemberData(input) {is_head_approved
|
||||
|
||||
var selectedOption = $(input).find(':selected');
|
||||
|
||||
@ -209,4 +209,33 @@ function setMemberData(input) {
|
||||
});
|
||||
}
|
||||
|
||||
function showConfirmationModal(event) {
|
||||
Swal.fire({
|
||||
title: "Approve or Reject the rejected claim",
|
||||
text: "Do you want to save this?",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
showDenyButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
denyButtonColor: "#6c757d",
|
||||
confirmButtonText: "Approve",
|
||||
denyButtonText: "Reject",
|
||||
cancelButtonText: "Cancel"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$('#is_head_approved').val(1);
|
||||
console.log($('#ticket_form_data')[0])
|
||||
submitClaimForm(event, $('#ticket_form_data')[0]); // Fixed selector
|
||||
} else if (result.isDenied) {
|
||||
$('#is_head_approved').val(2);
|
||||
console.log($('#ticket_form_data')[0])
|
||||
submitClaimForm(event, $('#ticket_form_data')[0]); // Fixed selector
|
||||
} else {
|
||||
$('#is_head_approved').val(0);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -15,10 +15,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_gmc" onsubmit="submitClaimForm(event, this)" enctype="multipart/form-data">
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" id="ticket_type_id" name="ticket_type_id" value="1">
|
||||
<input type="hidden" id="ticket_master_id" name="ticket_master_id" value="<?= isset($ticket_data['id']) ? $ticket_data['id'] : '' ?>">
|
||||
<input type="hidden" id="is_head_approved" name="is_head_approved" value="<?= isset($ticket_data['is_head_approved']) ? $ticket_data['is_head_approved'] : '' ?>">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
@ -296,6 +297,9 @@
|
||||
</div>
|
||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit" >Submit</button>
|
||||
<?php if(get_role_id() == 5 && isset($ticket_data) && $ticket_data['claim_status_id'] == 8) { ?>
|
||||
<a class="btn btn-secondary waves-effect waves-light mr-1" onclick="showConfirmationModal(event)">Rejected Approve</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_gmc" onsubmit="submitClaimForm(event, this)"
|
||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)"
|
||||
enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user