update Approval Popup Success

This commit is contained in:
Daeng Deni Mardaeni 2023-09-04 16:33:38 +07:00
parent e819232e9c
commit ac44adc994

View File

@ -189,8 +189,18 @@
url: form.attr('action'),
data: form.serialize(), // serializes the form's elements.
success: function (data) {
toastr.success('{{ $approval->description }} Berhasil Di Approve.', 'Success!', {timeOut: 5000});
window.location.href = "{{ route('approval.index') }}"
swal.fire({
title: "Success!",
text: "{{ $approval->description }} Berhasil Di Approve.",
icon: "success",
confirmButtonClass: 'btn btn-primary',
buttonsStyling: false,
}).then(function (result) {
if (result.value) {
window.location.href = "{{ route('approval.index') }}"
}
});
//window.location.href = "{{ route('approval.index') }}"
}
});