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
request.done(function(response, textStatus, jqXHR){
console.log(response);
toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
//window.location.href = '{{url("/dashboard")}}';
history.pushState(null, null, location.href);
window.onpopstate = function () {
history.go(1);
};
if(response.status == true){
toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
window.location.href = '{{url("/dashboard")}}';
history.pushState(null, null, location.href);
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