main
ilhamwara 2025-07-03 09:43:10 +07:00
parent f864d0ebae
commit 04c74b5c3f
1 changed files with 11 additions and 6 deletions

View File

@ -92,12 +92,17 @@ $("#grid-data").on("click", ".forcelogin", function() {
// Callback handler that will be called on success // Callback handler that will be called on success
request.done(function(response, textStatus, jqXHR){ request.done(function(response, textStatus, jqXHR){
console.log(response); console.log(response);
toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'}); if(response.status == true){
//window.location.href = '{{url("/dashboard")}}'; toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
history.pushState(null, null, location.href); window.location.href = '{{url("/dashboard")}}';
window.onpopstate = function () { history.pushState(null, null, location.href);
history.go(1); window.onpopstate = function () {
}; history.go(1);
};
}else{
toastr.error("Maaf Terjadi Kesalahan", 'Gagal!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
}
}); });
// Callback handler that will be called on failure // Callback handler that will be called on failure