From 2b3c7ce6645c9db2a60b2cfff20a249d679c5346 Mon Sep 17 00:00:00 2001 From: Nur Izzati Zulkifli Date: Mon, 15 Jan 2024 09:00:00 +0800 Subject: [PATCH] tambah button dlm page khazanah untuk laporan notis peringatan --- app/Http/Controllers/KhazanahController.php | 66 ++++ .../bycawdetailnotisperingatan.blade.php | 321 ++++++++++++++++++ .../khazanah/detailnotisperingatan.blade.php | 251 ++++++++++++++ .../khazanah/notisperingatan.blade.php | 233 +++++++++++++ .../rekodnotisperingatanpertama.blade.php | 263 ++++++++++++++ .../views/khazanah/laporan/index.blade.php | 3 + .../khazanah/laporan/rekodblast.blade.php | 6 +- .../khazanah/laporan/rekodblastsms.blade.php | 6 +- .../print/laporan_stokauditkhas.blade.php | 4 +- routes/web.php | 1 + 10 files changed, 1146 insertions(+), 8 deletions(-) create mode 100644 resources/views/callcenter/khazanah/bycawdetailnotisperingatan.blade.php create mode 100644 resources/views/callcenter/khazanah/detailnotisperingatan.blade.php create mode 100644 resources/views/callcenter/khazanah/notisperingatan.blade.php create mode 100644 resources/views/callcenter/khazanah/rekodnotisperingatanpertama.blade.php diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index f83e488..71fa190 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -4427,6 +4427,72 @@ class KhazanahController extends Controller } } + public function notisperingatan(Request $request){ + $auth_user = Auth::user(); + $api_url = config('api.url'); + $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + + return view('callcenter.khazanah.notisperingatan',compact('cawangan_info','api_url')); + } + + public function rekodnotisperingatanpertama() + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $arrayinfo = []; + + $notis = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/cawangan/senarainotisperingatan/'. $auth_user['cawangan'])->json(); + // dd($notis ); + foreach($notis as $info) + { + $getcawnotis = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/cawangan/getcawnotis/'. $auth_user['cawangan'].'/'.$info['notis_id'])->json(); + // dd($getcawnotis); + array_push($arrayinfo, ['info'=> $info,'cawnotis' => $getcawnotis]); + } + return view('callcenter.khazanah.rekodnotisperingatanpertama',compact('notis','arrayinfo')); + } + + public function detailnotisperingatan() + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + $kodcaw = $auth_user['cawangan']; + $senarai = []; + + $detailnotis = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/cawangan/getcawnotisall/'. $auth_user['cawangan'])->json(); + // dd($detailnotis); + foreach($detailnotis as $info) + { + // $getcawnotisbycaw = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/getcawnotisbycaw', [ + // 'kodcaw' => $info[0]['kodcaw'], + // 'notisid' => $notisid + // ])->json(); + + $data = [ + // 'detailnotis' => $info ? $info : '', + 'getcawnotisbycaw' => $info ? $info : '', + ]; + + array_push($senarai,$data); + // dd($data); + } + return view('callcenter.khazanah.detailnotisperingatan',compact('detailnotis','senarai','kodcaw')); + } + + public function bycawnotisperingatan($kodcaw,$notisid, Request $request) + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + $kodcaw = $auth_user['cawangan']; + $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'.$auth_user['cawangan'])->json(); + $bycawnotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/cawangan/bycawnotisperingatan/'.$auth_user['cawangan'].'/'.$notisid)->json(); + + return view('callcenter.khazanah.bycawdetailnotisperingatan',compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid','api_url')); + } + + + } diff --git a/resources/views/callcenter/khazanah/bycawdetailnotisperingatan.blade.php b/resources/views/callcenter/khazanah/bycawdetailnotisperingatan.blade.php new file mode 100644 index 0000000..0c2f934 --- /dev/null +++ b/resources/views/callcenter/khazanah/bycawdetailnotisperingatan.blade.php @@ -0,0 +1,321 @@ +@extends('layouts.app_operasi') + + + + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+ @if ($message = Session::get('success')) +
+

{{ $message }}

+
+ @elseif ($message = Session::get('failed')) +
+

{{ $message }}

+
+ @endif + +
+ +
+ {{-- --}} + + @csrf + + + + + @php + $getfasa = Http::withOptions(['verify' => config('app.api_verify')]) + ->get($api_url . '/arcc/getfasa', ['kodcaw' => $kodcaw, 'notisid' => $notisid]) + ->json(); + @endphp + + + + + + + + + + + + + + + + + + + + + + + + + + {{-- {{dd($bycawnotisperingatankedua)}} --}} + @foreach ($bycawnotisperingatan as $index => $item) + + + + + + + + + + + + + + @endif + + @endif + + @endif + + @endif + + @endif + + @endif + + @endforeach +
BilNo.RujukanNamaNo.KPNo.TelefonTempohBaki Pembiayaan (RM)Keuntungan 6Bulan (RM)Amaun Telah Bayar (RM)Keuntungan Semasa (RM)Tarikh MatangTarikh Tamat KontrakT.Notis PertamaT.Notis KeduaTag SuratJenis Notis
{{ $loop->iteration }}{{$item['norujukan']}}{{$item['namacust']['nama'] ?? ''}}{{$item['nokp']}}{{$item['namacust']['telefon'] ?? ''}}{{$item['jbg']}}{{number_format($item['datagadai']['bakipjm'], 2, '.', ',')}}{{number_format($item['datagadai']['bakiupah'], 2, '.', ',')}}{{number_format($item['datagadai']['hargajualan']-$item['datagadai']['bakihargajualan'], 2, '.', ',')}}{{number_format($item['keuntungan'], 2, '.', ',')}} + @if($item['tmatang'] == null) + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item['tmatang']); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp + @if($item['tmatang1'] == null) + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item['tmatang1']); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp + @if($item['tarikhnotis1'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item['tarikhnotis1']); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp + @if($item['tarikhnotis2'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item['tarikhnotis2']); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp + @if($item['tagsurat'] == 1) + Selesai + @elseif($item['tagsurat'] == 0) + Belum Hantar + + @if($item['peringatan'] == 1) + Pertama + @elseif($item['peringatan'] == 2) + Kedua +
+
+
+ + + + +
+
+
+
+
+ + + + +@endsection + diff --git a/resources/views/callcenter/khazanah/detailnotisperingatan.blade.php b/resources/views/callcenter/khazanah/detailnotisperingatan.blade.php new file mode 100644 index 0000000..885e27b --- /dev/null +++ b/resources/views/callcenter/khazanah/detailnotisperingatan.blade.php @@ -0,0 +1,251 @@ +@extends('layouts.app_operasi') + + + + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+ @if ($message = Session::get('success')) +
+

{{ $message }}

+
+ @elseif ($message = Session::get('failed')) +
+

{{ $message }}

+
+ @endif + +
+ +
+ @csrf + + + + + + + + + + + {{-- --}} + + + + @foreach ($senarai as $index => $item) + {{-- {{dd($item['getcawnotisbycaw'])}} --}} + + + + + + + {{-- --}} + + + @endforeach +
BilNotis IDCawanganBil.Surat Notis PertamaBil.Surat Notis KeduaBaki Pembiayaan (RM)Maklumat Lanjut
{{ $loop->iteration }}{{$item['getcawnotisbycaw']['namacaw'][$index]['notis_id']}} @if($item['getcawnotisbycaw']['namacaw'][0]['status'] == 2) + + @endif{{$item['getcawnotisbycaw']['namacaw'][$index]['details_caw']}}{{$item['getcawnotisbycaw']['totalsagpertama']}}{{$item['getcawnotisbycaw']['totalsagkedua']}}{{number_format($item['getcawnotisbycaw']['totalbakipjm'],2)}}Lihat +
+
+
+ + + +
+
+
+
+
+ + + + +@endsection + diff --git a/resources/views/callcenter/khazanah/notisperingatan.blade.php b/resources/views/callcenter/khazanah/notisperingatan.blade.php new file mode 100644 index 0000000..39c18b0 --- /dev/null +++ b/resources/views/callcenter/khazanah/notisperingatan.blade.php @@ -0,0 +1,233 @@ +@extends('layouts.app_operasi') + + + + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+ @if ($message = Session::get('success')) +
+

{{ $message }}

+
+ @elseif ($message = Session::get('failed')) +
+

{{ $message }}

+
+ @endif + +
+ + + + + + +
+ + + +
+
+
+
+
+ + + + +@endsection + diff --git a/resources/views/callcenter/khazanah/rekodnotisperingatanpertama.blade.php b/resources/views/callcenter/khazanah/rekodnotisperingatanpertama.blade.php new file mode 100644 index 0000000..8e71098 --- /dev/null +++ b/resources/views/callcenter/khazanah/rekodnotisperingatanpertama.blade.php @@ -0,0 +1,263 @@ +@extends('layouts.app_operasi') + + + + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+ @if ($message = Session::get('success')) +
+

{{ $message }}

+
+ @elseif ($message = Session::get('failed')) +
+

{{ $message }}

+
+ @endif + +
+ +
+ @csrf + + + + + + + + + + + + + @foreach ($arrayinfo as $index => $item) + {{-- {{dd($item['cawnotis'])}} --}} + + + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item['info']['tarikh_notis']); + $datez = $myDateTime->format('d-m-Y'); + @endphp + + + + {{-- --}} + + + + @endforeach +
Notis IDTarikh NotisCawanganFasaMaklumat Lanjut
{{ $item['info']['notis_id'] ?? '-' }} {{$datez}}@foreach($item['cawnotis'] as $item1) + @foreach($item1 as $item2) + @if($item2['status'] == 2) + + @endif + {{ $item2['details_caw']}}
+ @endforeach + @endforeach
@if($item['info']['daritempoh'] == '5' ) + 1 + @elseif($item['info']['daritempoh'] == '11' ) + 2 + @endif{{ $item['info']['hinggatempoh'] ?? '-' }} + {{-- Lihat --}} + Lihat
+
+
+ + + +
+
+
+
+
+ + + + +@endsection + diff --git a/resources/views/khazanah/laporan/index.blade.php b/resources/views/khazanah/laporan/index.blade.php index a589684..783684f 100644 --- a/resources/views/khazanah/laporan/index.blade.php +++ b/resources/views/khazanah/laporan/index.blade.php @@ -96,6 +96,9 @@
Serah Marhun Tebus
+
+ Notis Peringatan +
diff --git a/resources/views/khazanah/laporan/rekodblast.blade.php b/resources/views/khazanah/laporan/rekodblast.blade.php index 9a0e561..a95775e 100644 --- a/resources/views/khazanah/laporan/rekodblast.blade.php +++ b/resources/views/khazanah/laporan/rekodblast.blade.php @@ -70,7 +70,7 @@ #details th { padding: 8px; - font-size: 11px; + font-size: 13px; } #details tr:nth-child(even) { @@ -92,7 +92,7 @@ @section('content') -
+
@@ -122,7 +122,7 @@
@endif -
+
@csrf diff --git a/resources/views/khazanah/laporan/rekodblastsms.blade.php b/resources/views/khazanah/laporan/rekodblastsms.blade.php index 57e3ef9..6abf3e3 100644 --- a/resources/views/khazanah/laporan/rekodblastsms.blade.php +++ b/resources/views/khazanah/laporan/rekodblastsms.blade.php @@ -70,7 +70,7 @@ #details th { padding: 8px; - font-size: 11px; + font-size: 13px; } #details tr:nth-child(even) { @@ -92,7 +92,7 @@ @section('content') -
+
@@ -122,7 +122,7 @@
@endif -
+
@csrf diff --git a/resources/views/print/laporan_stokauditkhas.blade.php b/resources/views/print/laporan_stokauditkhas.blade.php index 6077840..de4b78f 100644 --- a/resources/views/print/laporan_stokauditkhas.blade.php +++ b/resources/views/print/laporan_stokauditkhas.blade.php @@ -170,7 +170,7 @@ #details th { padding: 8px; - font-size: 11px; + font-size: 13px; } #details tr:nth-child(even) { @@ -227,7 +227,7 @@ @section('content') -
+
diff --git a/routes/web.php b/routes/web.php index a4173f3..0882f4e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -428,6 +428,7 @@ Route::get('/cawangan/notisperingatan',['as'=>'laporan.notisperingatan','uses'=> Route::get('/cawangan/rekodnotisperingatanpertama',['as'=>'laporan.rekodnotisperingatanpertama','uses'=>'KhazanahController@rekodnotisperingatanpertama'])->middleware('auth','khazanah'); Route::get('/cawangan/rekodnotisperingatankedua',['as'=>'laporan.rekodnotisperingatankedua','uses'=>'KhazanahController@rekodnotisperingatankedua'])->middleware('auth','khazanah'); Route::get('/cawangan/detailnotisperingatan',['as'=>'laporan.detailnotisperingatan','uses'=>'KhazanahController@detailnotisperingatan'])->middleware('auth','khazanah'); +Route::get('/cawangan/bycawnotisperingatan/{kodcaw}/{notisid}',['as'=>'laporan.bycawnotisperingatan','uses'=>'KhazanahController@bycawnotisperingatan'])->middleware('auth','khazanah');