jobportal/static/js/addorremovenotauth.js
2021-01-17 10:12:40 +01:00

24 lines
886 B
JavaScript

function addorremove(id) {
if (id){
$.ajax({
success:function () {
const Toast = Swal.mixin({
toast: true,
position: 'top',
showConfirmButton: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'error',
title: 'You are not an employee!'
})
}
});
}
}