File: /var/www/html/hrms-production/storage/framework/views/7eb1d72b9048ba918e263fb866297374221111cf.php
<div class="modal fade" id="ServiceBookApprovalModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Submit for <span class="text-info" id="ApprovalModuleName"></span></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<!-- Main content -->
<form id="ServiceBookApprovalForm">
<input type="hidden" name="_token" id="token_primary_detail" value="<?php echo e(csrf_token()); ?>">
<input type="hidden" name="EmployeeId" id="ApprovalEmployeeId">
<input type="hidden" name="ModuleId" id="ApprovalModuleId">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="mb-0" for="ProfileName">Profile<span
class="text-danger">*</label></label>
<select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true" name="ApprovalProfile" id="ApprovalProfile" data-placeholder="Select Profile" required>
<option value="" disabled selected>Select Profile</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="mb-0" for="UserId">User Name <span
class="text-danger">*</label></label>
<select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true" name="UserId" id="UserId"
data-placeholder="Select User" required>
<option value="" disabled selected>Select User</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="mb-0" for="ApprovalRemark">Remark <span class="text-danger">*</label></label>
<textarea rows="4" cols="" class="form-control form-control-sm" name="ApprovalRemark" id="ApprovalRemark" placeholder="Max 250 Char."></textarea>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-12">
<div class="d-flex align-items-center justify-content-center">
<button type="button" class="btn btn-sm btn-outline-secondary mx-1"
data-dismiss="modal" aria-label="Close">Cancel</button>
<button type="submit" id="SubmitPrimaryDetail"
class="btn btn-sm btn-info mx-1">Submit</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<script>
$(document).ready(function(){
$(".BtnSubmitForApproval").on("click", function(){
var EmployeeId = $(this).attr("data-id");
var ModuleId = $(this).attr("data-moduleid");
var ApprovalModule = $(this).val();
//alert(EmployeeId + " = " + ApprovalModule);
$('#ApprovalProfile').val(null).trigger('change');
$('#UserId').empty();
$('#ApprovalEmployeeId').val(EmployeeId);
if (ModuleId) {
$('#ApprovalModuleId').val(ModuleId);
} else {
$('#ApprovalModuleId').val('');
}
$('span#ApprovalModuleName').html('#'+ApprovalModule);
$('#ServiceBookApprovalModal').modal('show');
});
});
</script>
<script>
function SubmitEmpPrimaryDetailApprovals(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-primary-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
//location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpPrimaryDetail(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Primary Detail?",
text: "Are you sure you want to approve this Primary detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-primary-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Primary detail has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpPrimaryDetail(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Primary Detail?",
text: "Are you sure you want to reject this Primary detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-primary-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Primary detail has been reject!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpGeneralDetailApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit General Detail for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-general-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpGeneralDetail(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve General Detail?",
text: "Are you sure you want to approve this General detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-general-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "General detail has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpGeneralDetail(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject General Detail?",
text: "Are you sure you want to reject this General detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-general-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "General detail has been reject!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpCategoryDetailApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Category Detail for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-category-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpCategoryDetail(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Category Detail?",
text: "Are you sure you want to approve this Primary detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-category-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Category detail has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpCategoryDetail(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Category Detail?",
text: "Are you sure you want to reject this category detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-category-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Category detail has been reject!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitPoliceVerificationApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Police Verfication for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-police-verification",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApprovePoliceVerification(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Police Verfication?",
text: "Are you sure you want to approve this Police Verfication?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-police-verfication",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Police Verfication has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectPoliceVerification(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Police Verfication?",
text: "Are you sure you want to reject this Police Verfication?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-police-verfication",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Police Verfication has been reject!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitMedicalCertificateApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Medical Certificate for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-medical-certificate",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveMedicalCertificate(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Medical Certificate?",
text: "Are you sure you want to approve this Medical Certificate?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-medical-certificate",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Medical Certificate has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectMedicalCertificate(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Medical Certificate?",
text: "Are you sure you want to reject this Medical Certificate?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-medical-certificate",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Medical Certificate has been reject!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmployeePermanencyApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Employee Permanency for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-employee-permanency",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmployeePermanency(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Employee Permanency?",
text: "Are you sure you want to approve this Employee Permanency?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-permanency",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Employee Permanency has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmployeePermanency(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Employee Permanency?",
text: "Are you sure you want to reject this Employee Permanency?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-permanency",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Primary detail has been reject!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpRetirementOrderApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-primary-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpRetirementOrder(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Retirement Order?",
text: "Are you sure you want to approve this Retirement Order?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-retirement-order",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Retirement Order has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpRetirementOrder(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Retirement Order?",
text: "Are you sure you want to reject this Retirement Order?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-retirement-order",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Retirement Order has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpAgeRelaxApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Age Relax for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-age-relax",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpAgeRelax(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Age Relax?",
text: "Are you sure you want to approve this Age Relax?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-age-relax",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Age Relax has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpAgeRelax(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Age Relax?",
text: "Are you sure you want to reject this Age Relax?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-age-relax",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Age Relax has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpPromotionApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-employee-promotion",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpPromotion(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Primary Detail?",
text: "Are you sure you want to approve this Inoformation?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-promotion",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Inoformation has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpPromotion(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Primary Detail?",
text: "Are you sure you want to reject this Inoformation?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-promotion",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Inoformation has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitLoanAllowanceApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-loan-allowance",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveLoanAllowance(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Loan Allowance?",
text: "Are you sure you want to approve this Loan Allowance?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-loan-allowance",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Loan Allowance has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectLoanAllowance(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Loan Allowance?",
text: "Are you sure you want to reject this Loan Allowance?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-loan-allowance",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Loan Allowance has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitTravelConcessionApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-leave-travel-concession",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveTravelConcession(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Leave Travel Concession?",
text: "Are you sure you want to approve this Leave Travel Concession?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-leave-travel-concession",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Leave Travel Concession has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectTravelConcession(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Leave Travel Concession?",
text: "Are you sure you want to reject this Leave Travel Concession?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-leave-travel-concession",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Leave Travel Concession has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitMaharashtraDarshanApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-maharashtra-travel-concession",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveMaharashtraDarshan(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Maharashtra Darshan?",
text: "Are you sure you want to approve this Maharashtra Darshan?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-maharashtra-travel-concession",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Maharashtra Darshan has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectMaharashtraDarshan(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Maharashtra Darshan?",
text: "Are you sure you want to reject this Maharashtra Darshan?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-maharashtra-travel-concession",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Maharashtra Darshan has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitAssetsLiabilitiesApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-assets-liabilities",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveAssetsLiabilities(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Assets & Liability?",
text: "Are you sure you want to approve this Assets & Liability?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-assets-liabilities",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Assets & Liability has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectAssetsLiabilities(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Assets & Liability?",
text: "Are you sure you want to reject this Assets & Liability?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-assets-liabilities",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Assets & Liability has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitConfidentialReportApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-confidential-report",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveConfidentialReport(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Confidential Report?",
text: "Are you sure you want to approve this Confidential Report?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-confidential-report",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Confidential Report has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectConfidentialReport(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Confidential Report?",
text: "Are you sure you want to reject this Confidential Report?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-confidential-report",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Confidential Report has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitAwardDetailApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-award-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveAwardDetail(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Award Detail?",
text: "Are you sure you want to approve this Award detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-award-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Award detail has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectAwardDetail(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Award Detail?",
text: "Are you sure you want to reject this Award detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-award-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Award detail has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpResignationApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Resignation for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-resignation",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpResignation(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Resignation?",
text: "Are you sure you want to approve this Resignation?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-resignation",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Resignation has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpResignation(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Resignation?",
text: "Are you sure you want to reject this Resignation?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-resignation",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Resignation has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpDeathCertificateApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Death Certificate for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-death-certificate",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpDeathCertificate(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Death Certificate?",
text: "Are you sure you want to approve this Death Certificate?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-death-certificate",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Death Certificate has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpDeathCertificate(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Death Certificate?",
text: "Are you sure you want to reject this Death Certificate?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-death-certificate",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Death Certificate has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpGratiaAmountApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Gratia Amount for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-gratia-amount",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpGratiaAmount(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Gratia Amount?",
text: "Are you sure you want to approve this Gratia Amount?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-gratia-amount",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Gratia Amount has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpGratiaAmount(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Gratia Amount?",
text: "Are you sure you want to reject this Gratia Amount?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-gratia-amount",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Gratia Amount has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpReAppraisingApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit ReAppraising for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-re-appraising",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpReAppraising(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve ReAppraising?",
text: "Are you sure you want to approve this ReAppraising?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-re-appraising",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "ReAppraising has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpReAppraising(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject ReAppraising?",
text: "Are you sure you want to reject this ReAppraising?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-re-appraising",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "ReAppraising has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpCommutationApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Commutation for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-commutation",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpCommutation(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Commutation?",
text: "Are you sure you want to approve this Commutation?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-commutation",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Commutation has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpCommutation(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Commutation?",
text: "Are you sure you want to reject this Commutation?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-commutation",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Commutation has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpGratuityAmountApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Gratuity Amount for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-gratuity-amount",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpGratuityAmount(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Gratuity Amount?",
text: "Are you sure you want to approve this Gratuity Amount?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-gratuity-amount",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Gratuity Amount has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpGratuityAmount(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Gratuity Amount?",
text: "Are you sure you want to reject this Gratuity Amount?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-gratuity-amount",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Gratuity Amount has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpEncashmentApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Encashment for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-encashment",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApprovaEmpEncashment(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Encashment?",
text: "Are you sure you want to approve this Encashment?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-encashment",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Encashment has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpEncashment(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Encashment?",
text: "Are you sure you want to reject this Encashment?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-encashment",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Encashment has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmployeeAddressApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit address for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-address",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmployeeAddress(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Address?",
text: "Are you sure you want to approve this Address?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-address",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Address has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmployeeAddress(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Address?",
text: "Are you sure you want to reject this Address?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-address",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Address has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpPayMatrixApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-paymatrix",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpPayMatrix(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve PayMatrix?",
text: "Are you sure you want to approve this PayMatrix?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-paymatrix",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "PayMatrix has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
//location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpPayMatrix(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject PayMatrix?",
text: "Are you sure you want to reject this PayMatrix?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-paymatrix",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "PayMatrix has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEligibilityExamApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Eligibility exam for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-eligibility-exam",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEligibilityExam(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Eligibility exam?",
text: "Are you sure you want to approve this Eligibility exam?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-eligibility-exam",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Eligibility has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEligibilityExam(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Eligibility exam?",
text: "Are you sure you want to reject this Eligibility exam?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-eligibility-exam",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Eligibility exam has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitEmpPensionSchemeApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Pension for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-employee-pension",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveEmpPensionScheme(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Employee Pension?",
text: "Are you sure you want to approve this Employee Pension?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-pension",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Employee Pension has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectEmpPensionScheme(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Employee Pension?",
text: "Are you sure you want to reject this Employee Pension?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-pension",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Employee Pension has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitDeputationApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-deputation-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveDeputation(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Primary Detail?",
text: "Are you sure you want to approve this Deputation Detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-deputation-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Deputation Detail has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectDeputation(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Primary Detail?",
text: "Are you sure you want to reject this Deputation Detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-deputation-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Deputation Detail has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitProbationPeriodApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-probation-period",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveProbationPeriod(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Primary Detail?",
text: "Are you sure you want to approve this Probation Period?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-probation-period",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Probation Period has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectProbationPeriod(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Primary Detail?",
text: "Are you sure you want to reject this Probation Period?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-probation-period",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Probation Period has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitFamilyMemberApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-family-member",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveFamilyMember(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Family Member?",
text: "Are you sure you want to approve this Family Member?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-family-member",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Family Member has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectFamilyMember(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Family Member?",
text: "Are you sure you want to reject this Family Member?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-family-member",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Family Member has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitNomineeDetailApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Nominee Detail for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-nominee-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveNomineeDetail(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Nominee Detail?",
text: "Are you sure you want to approve this Nominee detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-nominee-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Nominee detail has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectNomineeDetail(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Nominee Detail?",
text: "Are you sure you want to reject this Nominee detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-nominee-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Nominee detail has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitNameChangeApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-name-change",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveNameChange(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Primary Detail?",
text: "Are you sure you want to approve this Name Change?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-name-change",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Name Change has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectNameChange(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Primary Detail?",
text: "Are you sure you want to reject this Name Change?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-name-change",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Name Change has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitForeignVisitApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-foreign-visit",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveForeignVisit(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Foreign Visit?",
text: "Are you sure you want to approve this Foreign Visit?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-foreign-visit",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Foreign Visit has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectForeignVisit(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Foreign Visit?",
text: "Are you sure you want to reject this Foreign Visit?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-foreign-visit",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Foreign Visit has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitDisciplinaryActionApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-disciplinary-action",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveDisciplinaryAction(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Disciplinary Action?",
text: "Are you sure you want to approve this Disciplinary Action?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-disciplinary-action",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Disciplinary Action has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectDisciplinaryAction(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Disciplinary Action?",
text: "Are you sure you want to reject this Disciplinary Action?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-disciplinary-action",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Disciplinary Action has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitTrainingDetailApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-training-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveTrainingDetail(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Training Detail?",
text: "Are you sure you want to approve this Training detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-training-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Training detail has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectTrainingDetail(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Training Detail?",
text: "Are you sure you want to reject this Training detail?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-training-detail",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Training detail has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitQualificationApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-qualification",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveQualification(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Qualification?",
text: "Are you sure you want to approve this Qualification?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-qualification",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Qualification has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectQualification(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Qualification?",
text: "Are you sure you want to reject this Qualification?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-qualification",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Qualification has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitPrevJobApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Previous Job for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-previous-job",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApprovePrevJob(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Previous Job?",
text: "Are you sure you want to approve this Previous Job?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-previous-job",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Previous Job has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectPrevJob(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Previous Job?",
text: "Are you sure you want to reject this Previous Job?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-previous-job",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Previous Job has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitTenurePeriodApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Tenure Period for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-tenure-period",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveTenurePeriod(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Tenure Period?",
text: "Are you sure you want to approve this Tenure Period?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-employee-tenure-period",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Tenure Period has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectTenurePeriod(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Tenure Period?",
text: "Are you sure you want to reject this Tenure Period?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-employee-tenure-period",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Tenure Period has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitICardApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit ICard for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-icard",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveICard(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve ICard?",
text: "Are you sure you want to approve this ICard?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-icard",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "ICard has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectICard(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject ICard?",
text: "Are you sure you want to reject this ICard?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-icard",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "ICard has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
function SubmitWritPetitionApproval(EmployeeId) {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Submit for Approval?",
text: "Are you sure you want to submit Writ Petition for approval?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Send it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/submit-approval-writ-petition",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Information has been sent for approval!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function ApproveWritPetition(EmployeeId='',ModuleId='',ApprovalStatus='') {
var EmployeeId = EmployeeId;
Swal.fire({
title: "Approve Writ Petition?",
text: "Are you sure you want to approve this Writ Petition?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Approve it!",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/approve-writ-petition",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "ICard has been approved!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
});
}
</script>
<script>
function RejectWritPetition(EmployeeId='', ModuleId='', ApprovalStatus=''){
(async () => {
const { value: comment } = await Swal.fire({
title: "Reject Writ Petition?",
text: "Are you sure you want to reject this Writ Petition?",
icon: "warning",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, Reject it!",
input: 'textarea',
//inputLabel: 'Your comment',
inputPlaceholder: 'Enter your comment',
inputValidator: (value) => {
return new Promise((resolve) => {
if (value) {
resolve()
} else {
resolve('Please insert the comment!')
}
})
}
})
if (comment) {
//Swal.fire(`Entered email: ${comment}`)
var reject = comment;
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/reject-writ-petition",
dataType: "json",
data: {
_token: "<?php echo e(csrf_token()); ?>",
EmployeeId: EmployeeId,
RejectComment: reject,
ModuleId: ModuleId,
ApprovalStatus: ApprovalStatus,
},
success: function (response) {
Swal.fire({
icon: "success",
title: "Writ Petition has been rejected!",
showConfirmButton: false,
timer: 1500,
}).then(function () {
location.reload();
});
},
});
}
})()
}
</script>
<script>
$(document).ready(function() {
$.ajax({
type: "GET",
url: "<?php echo e(url('/officer-name-list')); ?>",
dataType: "json",
success: function(response) {
var json = response.officerNameList;
$.each(json, function(i, officer) {
$("#ApprovalProfile").append("<option value='" + officer.ProfileId + "'>" + officer.ProfileName + "</option>");
$('#ApprovalProfile').trigger('change');
});
}
});
});
</script>
<script>
$('#ApprovalProfile').on('select2:select', function (e) {
//alert(e.params.data);
var data = e.params.data;
var ProfileId = data.id;
getProfileId(ProfileId);
});
function getProfileId(ProfileId){
var ProfileId = ProfileId;
$('#UserId').empty();
$.ajax({
type: "GET",
url: "<?php echo e(url('/')); ?>/profile-wise-officer/" +ProfileId,
dataType: "json",
success: function(response) {
var json = response.officerWiseName;
$.each(json, function(i, officerWiseName) {
var FirstName = officerWiseName.FirstName;
var MiddleName = '';
if (officerWiseName.MiddleName) {
var MiddleName = officerWiseName.MiddleName
}
var LastName = '';
if (officerWiseName.LastName) {
var LastName = officerWiseName.LastName
}
$("#UserId").append("<option value='" + officerWiseName.UserId + "'>" + FirstName +' '+ MiddleName + ' ' + LastName + "</option>");
$('#UserId').val(null).trigger('change');
});
}
});
}
</script>
<script>
$(function () {
$.validator.setDefaults({
submitHandler: function () {
event.preventDefault();
// Get Form Data
var token = $("#token_primary_detail").val();
var EmployeeId = $("#ApprovalEmployeeId").val();
var ProfileId = $('#ApprovalProfile').val();
var UserId = $('#UserId').val();
var ApprovalRemark = $('textarea[name="ApprovalRemark"]').val();
var ModuleId = $('#ApprovalModuleId').val();
if (ModuleId) {
var ModuleId = ModuleId;
} else {
var ModuleId = '';
}
var ApprovalModuleName = $('span#ApprovalModuleName').text().substring(1);
var url = '';
// if (ApprovalModuleName == 'Primary Detail Approval') {
// var url = 'submit-approval-primary-detail';
// } else if (ApprovalModuleName == 'Category Detail Approval') {
// var url = 'submit-approval-category-detail';
// } else if (ApprovalModuleName == 'General Detail Approval') {
// var url = 'submit-approval-general-detail';
// }
switch (ApprovalModuleName) {
case 'Primary Detail Approval':
var url = 'submit-approval-primary-detail';
break;
case 'Category Detail Approval':
var url = 'submit-approval-category-detail';
break;
case 'General Detail Approval':
var url = 'submit-approval-general-detail';
break;
case 'Police Verification Approval':
var url = 'submit-approval-police-verification';
break;
case 'Medical Certificate Approval':
var url = 'submit-approval-medical-certificate';
break;
case 'Employee Permanency Approval':
var url = 'submit-approval-employee-permanency';
break;
case 'Retirement Order Approval':
var url = 'submit-approval-employee-retirement-order';
break;
case 'Age Relax Approval':
var url = 'submit-approval-age-relax';
break;
case 'Employee Resignation Approval':
var url = 'submit-approval-resignation';
break;
case 'Death Certificate Approval':
var url = 'submit-approval-death-certificate';
break;
case 'Gratia Amount Approval':
var url = 'submit-approval-gratia-amount';
break;
case 'Employee ReAppraising Approval':
var url = 'submit-approval-re-appraising';
break;
case 'Employee Pension Approval':
var url = 'submit-approval-pension';
break;
case 'Employee Commutation Approval':
var url = 'submit-approval-commutation';
break;
case 'Gratuity Amount Approval':
var url = 'submit-approval-gratuity-amount';
break;
case 'Employee Encashment Approval':
var url = 'submit-approval-encashment';
break;
case 'PayMatrix Detail Approval':
var url = 'submit-approval-paymatrix';
break;
case 'Eligibility Exam Approval':
var url = 'submit-approval-eligibility-exam';
break;
case 'Address Detail Approval':
var url = 'submit-approval-address';
break;
case 'Qualification Detail Approval':
var url = 'submit-approval-qualification';
break;
case 'Promotion/Transfer Approval':
var url = 'submit-approval-employee-promotion';
break;
case 'Pensionary Benefit Approval':
var url = 'submit-approval-employee-pension';
break;
case 'Name Change Approval':
var url = 'submit-approval-name-change';
break;
case 'Deputation Detail Approval':
var url = 'submit-approval-deputation-detail';
break;
case 'Probation Period Approval':
var url = 'submit-approval-probation-period';
break;
case 'Family Member Approval':
var url = 'submit-approval-family-member';
break;
case 'Nominee Detail Approval':
var url = 'submit-approval-nominee-detail';
break;
case 'Previous Job Approval':
var url = 'submit-approval-previous-job';
break;
case 'Training Detail Approval':
var url = 'submit-approval-training-detail';
break;
case 'Foreign Visit Approval':
var url = 'submit-approval-foreign-visit';
break;
case 'Disciplinary Action Approval':
var url = 'submit-approval-disciplinary-action';
break;
case 'Loan Allowance Approval':
var url = 'submit-approval-loan-allowance';
break;
case 'Hometown LTC Approval':
var url = 'submit-approval-leave-travel-concession';
break;
case 'Maharashtra Darshan Approval':
var url = 'submit-approval-maharashtra-travel-concession';
break;
case 'Asset & Liability Approval':
var url = 'submit-approval-assets-liabilities';
break;
case 'Confidential Report Approval':
var url = 'submit-approval-confidential-report';
break;
case 'Award Detail Approval':
var url = 'submit-approval-award-detail';
break;
}
var fd = new FormData();
fd.append('_token',token);
fd.append('EmployeeId',EmployeeId);
fd.append('ProfileId',ProfileId);
fd.append('UserId',UserId);
fd.append('ApprovalRemark',ApprovalRemark);
fd.append('ModuleId',ModuleId);
$.ajax({
type: "post",
url: "<?php echo e(url('/')); ?>/" + url,
data: fd,
contentType: false,
processData: false,
success: function(response) {
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 2000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'success',
title: ApprovalModuleName + ' submitted successfully!'
});
setTimeout(function(){
window.location.reload();
}, 2000);
},
error: function(data) {
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 2000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'error',
title: 'Something went wrong!'
});
}
});
}
});
$('#ServiceBookApprovalForm').validate({
rules: {
ApprovalProfile: {
required: true,
},
PersonName: {
required: true,
},
ApprovalRemark: {
required: true,
},
},
messages: {
ApprovalProfile: {
required: "Please select the Profile.",
},
PersonName: {
required: "Please select the Name.",
},
},
errorElement: 'span',
errorPlacement: function (error, element) {
error.addClass('invalid-feedback');
element.closest('.form-group').append(error);
},
highlight: function (element, errorClass, validClass) {
$(element).addClass('is-invalid');
},
unhighlight: function (element, errorClass, validClass) {
$(element).removeClass('is-invalid');
}
});
});
</script><?php /**PATH /var/www/html/hrms-production/resources/views/components/service-book-approval-modal.blade.php ENDPATH**/ ?>