From 04c74b5c3f79489c577dc1f47d37f17321d3ee50 Mon Sep 17 00:00:00 2001 From: ilhamwara Date: Thu, 3 Jul 2025 09:43:10 +0700 Subject: [PATCH] update --- .../modules/management/user/index.blade.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/resources/views/modules/management/user/index.blade.php b/resources/views/modules/management/user/index.blade.php index 90dcd3a..f670842 100644 --- a/resources/views/modules/management/user/index.blade.php +++ b/resources/views/modules/management/user/index.blade.php @@ -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