diff --git a/app/Http/Controllers/CallCenterController.php b/app/Http/Controllers/CallCenterController.php index ab3f14a..e109e99 100644 --- a/app/Http/Controllers/CallCenterController.php +++ b/app/Http/Controllers/CallCenterController.php @@ -627,5 +627,176 @@ class CallCenterController extends Controller } } + public function notisJbg(){ + $api_url = config('api.url'); + $auth_user = Auth::user(); + $caw = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json(); + //dd('sini'); + return view('callcenter.cariangadaian',compact('api_url','caw')); + } + + public function carianJbg(Request $request){ + $current = Carbon::now(); + $current = new Carbon(); + $api_url = config('api.url'); + $auth_user = Auth::user(); + $jbgmula = $request->jbgmula; + $jbghingga = $request->jbghingga; + $tprint = $current->toDateString(); + + $caw_all = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/arcc/cawangan/')->json(); + $senarai = []; + foreach($caw_all as $cwgn) + { + $kodcaw = $cwgn['kodcaw']; + $datagadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/arcc/gadaian/'.$kodcaw,[ + 'jbgmula' => $request->jbgmula, + 'jbghingga' => $request->jbghingga, + ])->json(); + + $data = [ + 'kodcaw'=>$cwgn['kodcaw'], + 'caw_name'=>$cwgn['details_caw'], + 'datagadai'=>$datagadai ? $datagadai : '', + ]; + array_push($senarai,$data); + } + // dd(1); + return view('callcenter.gadaianjbg', compact('kodcaw','senarai','jbgmula','jbghingga')); + } + + public function janadatanotisjbg(Request $request){ + $current = Carbon::now(); + $current = new Carbon(); + $currentNow = Carbon::now(); + $senarai = []; + $tarikh_savedaftarnotis = $current->toDateString(); + $jbgmula = $request->jbgmula; + $jbghingga = $request->jbghingga; + $kodcaw = $request->kodcaw; + $selected_caw = $request->caw; + // dd($selected_caw); + + $getbatchnotisjbg=Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url').'/arcc/getbatchnotisjbg',[ + 'jbgmula' => $jbgmula, + 'jbghingga' => $jbghingga, + ])->json(); + + $newbatchnotis=$getbatchnotisjbg; + + if(!empty($selected_caw)) + { + foreach($selected_caw as $index=>$caw){ + $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $caw)->json(); + // dd($cawangan_info); + $insertdatagadai = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url').'/arcc/insertdatagadaijbg/'.$caw ,[ + 'jbgmula' => $jbgmula, + 'jbghingga' => $jbghingga, + 'kodcaw' => $caw, + 'notisid' => $newbatchnotis + ])->json(); + + $data = [ + 'kodcaw'=>$caw, + 'caw_name'=>$cawangan_info['details_caw'], + 'datagadai' => $insertdatagadai ? $insertdatagadai : '', + ]; + + array_push($senarai,$data); + } + } + return redirect()->route('arcc.notisjbg')->with('success','Berjaya Daftar Notis Jbg.'); + } + + public function rekodnotisjbg(){ + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $arrayinfo = []; + + // $notis = Notis::select('tarikh_notis','id') + // ->groupBy('tarikh_notis') + // ->get(); + $notisjbg = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/senarainotisjbg')->json(); + // dd($notisjbg); + foreach($notisjbg as $info) + { + $getcawnotisjbg = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/getcawnotisjbg/'.$info['id'])->json(); + + array_push($arrayinfo, ['info'=> $info,'cawnotis' => $getcawnotisjbg]); + } + // dd($arrayinfo); + return view('callcenter.rekodnotisjbg',compact('notisjbg','arrayinfo')); + } + + public function detailnotisjbg(Request $request){ + $auth_user = Auth::user(); + $api_url = config('api.url'); + + $senarai = []; + $notisid = $request->notisid; + + $detailnotisjbg = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/getcawnotisjbg/'.$notisid)->json(); + //dd($detailnotisjbg[0]); + foreach($detailnotisjbg as $info) + { + $getcawnotisjbgbycaw = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/getcawnotisjbgbycaw', [ + 'kodcaw' => $info[0]['kodcaw'], + 'notisid' => $notisid + ])->json(); + //dd($getcawnotisjbgbycaw); + $data = [ + // 'kodcaw'=>$info[0]['kodcaw'], + // 'caw_name'=>$info[0]['details_caw'], + 'getcawnotisjbgbycaw' => $getcawnotisjbgbycaw ? $getcawnotisjbgbycaw : '', + ]; + + array_push($senarai,$data); + } + + return view('callcenter.detailnotisjbg',compact('detailnotisjbg','senarai','notisid')); + } + + public function bycawnotisjbg($kodcaw,$notisid, 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/'. $kodcaw)->json(); + $bycawnotisjbg = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/bycawnotisjbg/'.$kodcaw.'/'.$notisid)->json(); + + return view('callcenter.bycawdetailnotisjbg',compact('cawangan_info','bycawnotisjbg','kodcaw','notisid')); + } + + public function detsagcallbyjbg($kodcaw, $notisid, $id) + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $kodcaw)->json(); + $bysagnotisjbg = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/arcc/bysagnotisjbg/'.$kodcaw.'/'.$notisid.'/'.$id)->json(); + $bysagnotisjbgCustomer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/arcc/bysagnotisjbgcustomer/'.$kodcaw.'/'.$notisid.'/'.$id)->json(); + return view('callcenter.callnotisjbg',compact('cawangan_info','bysagnotisjbg','bysagnotisjbgCustomer')); + } + + public function bycawnotisjbg2($kodcaw,$notisid, 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/'. $kodcaw)->json(); + $bycawnotisjbg = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/bycawnotisjbg2/'.$kodcaw.'/'.$notisid)->json(); + + return view('callcenter.bycawdetailnotisjbg2',compact('cawangan_info','bycawnotisjbg','kodcaw','notisid')); + } + + public function detsagcallbyjbg2($kodcaw, $notisid, $nokp) + { + $auth_user = Auth::user(); + $api_url = config('api.url'); + $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $kodcaw)->json(); + $bysagnotisjbg = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/arcc/bysagnotisjbg2/'.$kodcaw.'/'.$notisid.'/'.$nokp)->json(); + $bysagnotisjbgCustomer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/arcc/bysagnotisjbgcustomer2/'.$kodcaw.'/'.$notisid.'/'.$nokp)->json(); + // dd($bysagnotisjbg); + return view('callcenter.callnotisjbg2',compact('cawangan_info','bysagnotisjbg','bysagnotisjbgCustomer','kodcaw','notisid','nokp','api_url')); + } + } diff --git a/resources/views/callcenter/bycawdetailnotisjbg2.blade.php b/resources/views/callcenter/bycawdetailnotisjbg2.blade.php new file mode 100644 index 0000000..c0481fb --- /dev/null +++ b/resources/views/callcenter/bycawdetailnotisjbg2.blade.php @@ -0,0 +1,328 @@ +@extends('layouts.app_callcenter') + + + + +@section('content') +
+
+
+
+ + +
+
+
+
+
+
+
+ @if ($message = Session::get('success')) +
+

{{ $message }}

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

{{ $message }}

+
+ @endif + +
+ +
+ @csrf + + + + + + + + + + + + + + + + + + + + + + + + @php + $counter = 1; + $totalpinjaman = 0; + @endphp + + @foreach ($bycawnotisjbg['rekod'] as $index => $item) + @php + $totalpinjaman += $item['listsag'][0]['pinjaman']; + + if ($item['listnotis'][0]['statuscall'] == 0) { + $status = 'Belum Hubungi'; + } elseif ($item['listnotis'][0]['statuscall'] == 1) { + $status = 'Berjaya Hubungi'; + } else { + $status = 'Tidak Dapat Hubungi'; + } + + $nota = $item['listnotis'][0]['remark1']; + @endphp + + + + + + @php + $nokp = $item['info']['kpbaru'] ?? $item['info']['kplama']; + @endphp + + + + + + + + + + + + + + + + + @php $counter++; @endphp + @endforeach +
BilStatusNamaNo. KPNo. TelefonNorujukanTempohBaki Pembiayaan (RM)Keuntungan 6Bulan (RM)Amaun Telah Bayar (RM)Keuntungan Semasa (RM)Tarikh MatangTarikh Tamat KontrakTarikh PanggilanNotaTindakan
{{ $loop->iteration }}{{ $status ?? '-' }}{{ $item['info']['nama'] ?? '-' }}{{ $nokp }}{{ $item['info']['telefon'] ?? '-' }}@foreach($item['listsag'] as $item1){{ $item1['norujukan']}}
@endforeach
@foreach($item['listsag'] as $item1){{ $item1['jbg']}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['bakipjm'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['bakiupah'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['hargajualan']-$item1['bakihargajualan'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['keuntungan'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1) + @if($item1['t_matang'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang']); + $formattedtmatang = $myDateTime->format('d-m-Y'); + echo($formattedtmatang); + @endphp + @endif +
+ @endforeach +
+
@foreach($item['listsag'] as $item1) + @if($item1['t_matang1'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang1']); + $formattedtmatang1 = $myDateTime->format('d-m-Y'); + echo($formattedtmatang1); + @endphp + @endif +
+ @endforeach +
+
@foreach($item['listnotis'] as $item1) + @if($item1['tarikhcall1'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item1['tarikhcall1']); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp + @endif +
+ @endforeach +
+
{{$nota ?? ' '}} + + @if ($item['listnotis'][0]['statuscall'] == 0 || $item['listnotis'][0]['statuscall'] == 9) + Hubungi + + @else + - + @endif + +
+
+
+ + + +
+
+
+
+
+ + + + + +@endsection \ No newline at end of file diff --git a/resources/views/callcenter/callnotisjbg2.blade.php b/resources/views/callcenter/callnotisjbg2.blade.php new file mode 100644 index 0000000..37812b8 --- /dev/null +++ b/resources/views/callcenter/callnotisjbg2.blade.php @@ -0,0 +1,296 @@ +@extends('layouts.app_callcenter') + +@section('content') +
+
+
+ + +
+ @csrf + + + + + +
+
+
+
+ Nama +
+
+ +
+
+
+
+
+
+ No Kad Pengenalan +
+
+ @php + if($bysagnotisjbgCustomer['kpbaru'] != null){ + $noic = $bysagnotisjbgCustomer['kpbaru']; + }else{ + $noic = $bysagnotisjbgCustomer['kplama']; + } + @endphp + +
+
+
+
+ +
+
+ No Telefon +
+
+ +
+
+ +
+
+ Status Panggilan +
+
+ + + +
+
+ +
+ +
+ +
+
+ Alamat +
+
+ +
+
+ +
+
+ Nota +
+
+ @foreach($bysagnotisjbg['getstatusremark'] as $index => $remark) + + @endforeach +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + @php + $counter = 1; + $totalpinjaman = 0; + @endphp + @foreach ($bysagnotisjbg['rekodnotis'] as $index => $item) + @php + $totalpinjaman += $item['listsag'][0]['pinjaman']; + + if ($item['listnotis'][0]['tarikhcall1'] == null) { + $status = 'Belum'; + } else { + $status = 'Selesai'; + } + @endphp + + + + + + + + + + + + + + + + + @php $counter++; @endphp + @endforeach +
BilNorujukanTempohBaki Pembiayaan (RM)Keuntungan 6Bulan (RM)Amaun Telah Bayar (RM)Keuntungan Semasa (RM)Tarikh MatangTarikh Tamat KontrakTarikh PanggilanNota
@foreach($item['listsag'] as $item1){{ $loop->iteration }}
@endforeach
@foreach($item['listsag'] as $item1){{ $item1['norujukan']}}
@endforeach
@foreach($item['listsag'] as $item1){{ $item1['jbg']}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['bakipjm'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['bakiupah'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['hargajualan']-$item1['bakihargajualan'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1){{number_format($item1['keuntungan'], 2, '.', ',')}}
@endforeach
@foreach($item['listsag'] as $item1) + @if($item1['t_matang'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang']); + $formattedtmatang = $myDateTime->format('d-m-Y'); + echo($formattedtmatang); + @endphp + @endif +
+ @endforeach +
+
@foreach($item['listsag'] as $item1) + @if($item1['t_matang1'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang1']); + $formattedtmatang1 = $myDateTime->format('d-m-Y'); + echo($formattedtmatang1); + @endphp + @endif +
+ @endforeach +
+
@foreach($item['listnotis'] as $item1) + @if($item1['tarikhcall1'] == null) + + @else + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $item1['tarikhcall1']); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate); + @endphp + @endif +
+ @endforeach +
+
@foreach($item['listnotis'] as $item1){{ $item1['remark1']}}
@endforeach
+
+
+
+
+
+ +
+
+
+
+ + + + +@endsection \ No newline at end of file diff --git a/resources/views/callcenter/detailnotisperingatankedua.blade.php b/resources/views/callcenter/detailnotisperingatankedua.blade.php index 8cae719..32abc69 100644 --- a/resources/views/callcenter/detailnotisperingatankedua.blade.php +++ b/resources/views/callcenter/detailnotisperingatankedua.blade.php @@ -147,7 +147,9 @@ @if($item['totalsag'] == 0){{number_format($item['totalbakipjm'],2)}}@else {{number_format($item['totalbakipjm'],2)}}@endif {{-- Lihat --}} - Kemaskini + Kemaskini + +Notis JBG @endforeach diff --git a/resources/views/layouts/app_callcenter.blade.php b/resources/views/layouts/app_callcenter.blade.php new file mode 100644 index 0000000..ddda734 --- /dev/null +++ b/resources/views/layouts/app_callcenter.blade.php @@ -0,0 +1,253 @@ + + + + + + + + + + + SISTEM AR-RAHN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{-- jquery validation --}} + + + + {{-- Pusher --}} + + + + + + + +
+ + + @if(session()->has('iklan') && session()->get('iklan') == 0) + + + + @endif + + + +
+ @yield('content') +
+
+ @yield('footer') + + diff --git a/routes/web.php b/routes/web.php index a835915..a4173f3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -439,7 +439,15 @@ Route::get('/khazanah/print.suratwakil/{norujukan}',['as'=>'khazanah.print.surat Route::get('/penilai/print.suratwakil/{norujukan}',['as'=>'penilai.print.suratwakil','uses'=>'WakilController@printSuratWakilPenilai'])->middleware('auth','penilai'); - +Route::get('/notisjbg',['as'=>'arcc.notisjbg','uses'=>'CallCenterController@notisJbg'])->middleware('auth','callcenter'); +Route::get('/carianjbg',['as'=>'arcc.carianjbg','uses'=>'CallCenterController@carianJbg'])->middleware('auth','callcenter'); +Route::post('/janadatanotisjbg',['as'=>'arcc.janadatanotisjbg','uses'=>'CallCenterController@janadatanotisjbg'])->middleware('auth','callcenter'); +Route::get('/rekodnotisjbg',['as'=>'arcc.rekodnotisjbg','uses'=>'CallCenterController@rekodnotisjbg'])->middleware('auth','callcenter'); +Route::get('/detailnotisjbg/{notisid}',['as'=>'arcc.detailnotisjbg','uses'=>'CallCenterController@detailnotisjbg'])->middleware('auth','callcenter'); +Route::get('/bycawnotisjbg/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisjbg','uses'=>'CallCenterController@bycawnotisjbg'])->middleware('auth','callcenter'); +Route::get('/detsagcallbyjbg/{kodcaw}/{notisid}/{id}',['as'=>'arcc.detsagcallbyjbg','uses'=>'CallCenterController@detsagcallbyjbg'])->middleware('auth','callcenter'); +Route::get('/bycawnotisjbg2/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisjbg2','uses'=>'CallCenterController@bycawnotisjbg2'])->middleware('auth','callcenter'); +Route::get('/detsagcallbyjbg2/{kodcaw}/{notisid}/{nokp}',['as'=>'arcc.detsagcallbyjbg2','uses'=>'CallCenterController@detsagcallbyjbg2'])->middleware('auth','callcenter'); Route::get('supports/driver/mykad-reader',['as'=>'mykadreader.driver', function(){