restore 2025-01-14

This commit is contained in:
Hafifie PKB
2025-01-14 23:40:20 +08:00
parent d3ba45a6ca
commit 90b8df1519
4 changed files with 16 additions and 17 deletions
+2 -6
View File
@@ -724,17 +724,13 @@ class KhazanahController extends Controller
$api_url = config('api.url'); $api_url = config('api.url');
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); $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') if($request->jenismodal === 'perubatan')
{ {
$listUser=User::where('name','=',$request->tuntutan)->get(); $listUser=User::where('name','=',$request->tuntutan)->get();
if(floatval($request->bayaran) > floatval($listUser[0]->perubatan)) 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, 'endDate' => $endDate,
])->json(); ])->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, [ $kawalanstok = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/reports/kawalan-stok/' . $kod_cawangan, [
'startDate' => $startDate, 'startDate' => $startDate,
+10 -9
View File
@@ -24,14 +24,16 @@ notify.channel_subscribe((data) => {
}); });
const currentPath = window.location.pathname; const currentPath = window.location.pathname;
if (currentPath === "/home") { if(window.kodcaw == data.cawangan){
notify_main(); if (currentPath === "/home") {
} else if (currentPath === "/menu") { notify_main();
notify_khazanah_main(); } else if (currentPath === "/menu") {
}else if(currentPath === '/pendahuluan'){ notify_khazanah_main();
notify_pendahuluan(); }else if(currentPath === '/pendahuluan'){
}else if(currentPath === '/serahan'){ notify_pendahuluan();
notify_serahan(); }else if(currentPath === '/serahan'){
notify_serahan();
}
} }
}); });
@@ -59,7 +61,6 @@ let notify_main = () =>{
} }
button.classList.add('btn-danger'); button.classList.add('btn-danger');
button.classList.add('heartbeat');
} }
let notify_khazanah_main = () =>{ let notify_khazanah_main = () =>{
+3 -1
View File
@@ -640,11 +640,13 @@
if (array_tempblock.includes(norujukan)) { if (array_tempblock.includes(norujukan)) {
Swal.close(); Swal.close();
setTimeout(() => {
Swal.fire({ Swal.fire({
icon: 'error', icon: 'error',
title: 'Amaran', title: 'Amaran',
text: 'Surat Pembiayaan Mengalami Masalah Sila Hubungi IT' html: '<b>SAG</b> - Kes Marhun Tiada Dalam Peti Besi'
}); });
}, 100);
return false; return false;
} }
+1 -1
View File
@@ -55,7 +55,7 @@
window.kodcaw = "{{ Auth::user()->cawangan }}"; window.kodcaw = "{{ Auth::user()->cawangan }}";
window.apikey = "{{ env('PUSHER_APP_KEY') }}"; window.apikey = "{{ env('PUSHER_APP_KEY') }}";
</script> </script>
<script type="module" src="{{ asset('js/notification.js') }}"></script> <script type="module" src="{{ asset('js/notification.js') }}?v={{ filemtime(public_path('js/notification.js')) }}"></script>
@endif @endif
<script> <script>