diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 2f056fd..3a4b455 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -724,17 +724,13 @@ class KhazanahController extends Controller $api_url = config('api.url'); $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); - $bakiperubatan = 0; - - - if($request->jenismodal === 'perubatan') { $listUser=User::where('name','=',$request->tuntutan)->get(); if(floatval($request->bayaran) > floatval($listUser[0]->perubatan)) { - return redirect('/panjar')->with('messageinformation','Baki perubatan tidak mencukupi.'); + return redirect('/panjar')->with('messageinformation',['status' => 'error','message' => 'Baki perubatan tidak mencukupi.']); } } @@ -1768,7 +1764,7 @@ class KhazanahController extends Controller 'endDate' => $endDate, ])->json(); - $laporan = $laporan_ringkasan[0]; + $laporan = $laporan_ringkasan['reportRingkasanHarian'][0]; $kawalanstok = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/reports/kawalan-stok/' . $kod_cawangan, [ 'startDate' => $startDate, diff --git a/public/js/notification.js b/public/js/notification.js index 5655959..58dc253 100644 --- a/public/js/notification.js +++ b/public/js/notification.js @@ -24,14 +24,16 @@ notify.channel_subscribe((data) => { }); const currentPath = window.location.pathname; - if (currentPath === "/home") { - notify_main(); - } else if (currentPath === "/menu") { - notify_khazanah_main(); - }else if(currentPath === '/pendahuluan'){ - notify_pendahuluan(); - }else if(currentPath === '/serahan'){ - notify_serahan(); + if(window.kodcaw == data.cawangan){ + if (currentPath === "/home") { + notify_main(); + } else if (currentPath === "/menu") { + notify_khazanah_main(); + }else if(currentPath === '/pendahuluan'){ + notify_pendahuluan(); + }else if(currentPath === '/serahan'){ + notify_serahan(); + } } }); @@ -59,7 +61,6 @@ let notify_main = () =>{ } button.classList.add('btn-danger'); - button.classList.add('heartbeat'); } let notify_khazanah_main = () =>{ diff --git a/resources/views/customers/v2/info.blade.php b/resources/views/customers/v2/info.blade.php index d57aa22..ebef8f5 100644 --- a/resources/views/customers/v2/info.blade.php +++ b/resources/views/customers/v2/info.blade.php @@ -640,11 +640,13 @@ if (array_tempblock.includes(norujukan)) { Swal.close(); + setTimeout(() => { Swal.fire({ icon: 'error', title: 'Amaran', - text: 'Surat Pembiayaan Mengalami Masalah Sila Hubungi IT' + html: 'SAG - Kes Marhun Tiada Dalam Peti Besi' }); + }, 100); return false; } diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index cc68dc2..cfdcc62 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -55,7 +55,7 @@ window.kodcaw = "{{ Auth::user()->cawangan }}"; window.apikey = "{{ env('PUSHER_APP_KEY') }}"; - + @endif