update tukar kemaskini by cawangan shj
This commit is contained in:
@@ -433,7 +433,7 @@ class CallCenterController extends Controller
|
|||||||
// $notis = Notis::select('tarikh_notis','id')
|
// $notis = Notis::select('tarikh_notis','id')
|
||||||
// ->groupBy('tarikh_notis')
|
// ->groupBy('tarikh_notis')
|
||||||
// ->get();
|
// ->get();
|
||||||
$notis = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/senarainotisperingatan')->json();
|
$notis = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/senarainotisperingatankedua')->json();
|
||||||
// dd($notis);
|
// dd($notis);
|
||||||
foreach($notis as $info)
|
foreach($notis as $info)
|
||||||
{
|
{
|
||||||
@@ -583,5 +583,49 @@ class CallCenterController extends Controller
|
|||||||
return view('callcenter.detailnotisperingatankedua',compact('detailnotis','senarai','notisid'));
|
return view('callcenter.detailnotisperingatankedua',compact('detailnotis','senarai','notisid'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function kemaskininotisperingatanbycaw($kodcaw,$notisid)
|
||||||
|
{
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$api_url = config('api.url');
|
||||||
|
|
||||||
|
$senarai = [];
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $kodcaw)->json();
|
||||||
|
$bycawnotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/bycawnotisperingatan/'.$kodcaw.'/'.$notisid)->json();
|
||||||
|
$kemaskininotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url'). '/arcc/kemaskininotisperingatan', [
|
||||||
|
'kodcaw' => $kodcaw,
|
||||||
|
'notisid' => $notisid
|
||||||
|
])->json();
|
||||||
|
if($kemaskininotisperingatan == 'success'){
|
||||||
|
return view('callcenter.bycawdetailnotisperingatan',compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid'));
|
||||||
|
// return redirect()->route('arcc.detailnotisperingatan',['notisid' => $notisid])
|
||||||
|
// ->with('success','Data Telah Dikemaskini.');
|
||||||
|
}elseif($kemaskininotisperingatan == 'failed'){
|
||||||
|
return redirect()->route('arcc.detailnotisperingatan',['notisid' => $notisid])
|
||||||
|
->with('failed','Data Tidak Dikemaskini. Sila Semak Semula...');
|
||||||
|
}
|
||||||
|
|
||||||
|
// return view('callcenter.bycawdetailnotisperingatan',compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function kemaskininotisperingatankeduabycaw($kodcaw,$notisid)
|
||||||
|
{
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$api_url = config('api.url');
|
||||||
|
|
||||||
|
$senarai = [];
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $kodcaw)->json();
|
||||||
|
$bycawnotisperingatankedua = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/bycawnotisperingatankedua/'.$kodcaw.'/'.$notisid)->json();
|
||||||
|
$kemaskininotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url'). '/arcc/kemaskininotisperingatan', [
|
||||||
|
'kodcaw' => $kodcaw,
|
||||||
|
'notisid' => $notisid
|
||||||
|
])->json();
|
||||||
|
if($kemaskininotisperingatan == 'success'){
|
||||||
|
return view('callcenter.bycawdetailnotisperingatankedua',compact('cawangan_info','bycawnotisperingatankedua','kodcaw','notisid','api_url'));
|
||||||
|
}elseif($kemaskininotisperingatan == 'failed'){
|
||||||
|
return redirect()->route('arcc.detailnotisperingatankedua',['notisid' => $notisid])
|
||||||
|
->with('failed','Data Tidak Dikemaskini. Sila Semak Semula...');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,13 +144,16 @@
|
|||||||
<td style="white-space: nowrap;"> @if($item['namacaw'][$index]['status'] == 2)
|
<td style="white-space: nowrap;"> @if($item['namacaw'][$index]['status'] == 2)
|
||||||
<img src="{{ asset('img/success.png') }}" style="width:20px"></img>
|
<img src="{{ asset('img/success.png') }}" style="width:20px"></img>
|
||||||
@endif{{$item['namacaw'][$index]['details_caw']}}</td>
|
@endif{{$item['namacaw'][$index]['details_caw']}}</td>
|
||||||
<td align="center" style="white-space: nowrap;">{{$item['totalsag']}}</td>
|
<td align="center" style="white-space: nowrap;">@if($item['totalsag'] == 0)<a style="color: #e74c3c; nowrap">{{$item['totalsag']}}</a>@else {{$item['totalsag']}}@endif/{{$item['totalsagall']}}</td>
|
||||||
<td style="white-space: nowrap;">{{number_format($item['totalbakipjm'],2)}}</td>
|
<td style="white-space: nowrap;">@if($item['totalsag'] == 0)<a style="color: #e74c3c; nowrap">{{number_format($item['totalbakipjm'],2)}}</a>@else {{number_format($item['totalbakipjm'],2)}}@endif</td>
|
||||||
<td style="white-space: nowrap;"><a href="{{ route('arcc.bycawnotisperingatan', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'], 'notisid' => $notisid ]) }}" class="btn btn-info text-white">Lihat</a>
|
<td style="white-space: nowrap;">
|
||||||
|
{{-- <a href="{{ route('arcc.bycawnotisperingatan', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'], 'notisid' => $notisid ]) }}" class="btn btn-info text-white">Lihat</a> --}}
|
||||||
|
<a href="{{ route('arcc.kemaskininotisperingatanbycaw', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'],'notisid' => $notisid] ) }}" class="btn btn-warning text-white">Kemaskini</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
<div style="color: #e74c3c" align=left> <i>*jika bilangan berkurang bermaksud telah masuk ke Notis Peringatan Kedua</i></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -143,10 +143,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ $loop->iteration }}</td>
|
<td>{{ $loop->iteration }}</td>
|
||||||
<td style="white-space: nowrap;">{{$item['namacaw'][$index]['details_caw']}}</td>
|
<td style="white-space: nowrap;">{{$item['namacaw'][$index]['details_caw']}}</td>
|
||||||
<td align="center" style="white-space: nowrap;">{{$item['totalsag']}}</td>
|
<td align="center" style="white-space: nowrap;">@if($item['totalsag'] == 0)<a style="color: #e74c3c; nowrap">{{$item['totalsag']}}</a>@else {{$item['totalsag']}}@endif/{{$item['totalsagall']}}</td>
|
||||||
<td style="white-space: nowrap;">{{number_format($item['totalbakipjm'],2)}}</td>
|
<td style="white-space: nowrap;">@if($item['totalsag'] == 0)<a style="color: #e74c3c; nowrap">{{number_format($item['totalbakipjm'],2)}}</a>@else {{number_format($item['totalbakipjm'],2)}}@endif</td>
|
||||||
<td style="white-space: nowrap;"><a href="{{ route('arcc.bycawnotisperingatankedua', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'], 'notisid' => $notisid ]) }}" class="btn btn-info text-white">Lihat</a>
|
<td style="white-space: nowrap;">
|
||||||
</td>
|
{{-- <a href="{{ route('arcc.bycawnotisperingatankedua', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'], 'notisid' => $notisid ]) }}" class="btn btn-info text-white">Lihat</a> --}}
|
||||||
|
<a href="{{ route('arcc.kemaskininotisperingatankeduabycaw', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'],'notisid' => $notisid] ) }}" class="btn btn-warning text-white">Kemaskini</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
<input type='hidden' name="radaktif" value="aktif">
|
<input type='hidden' name="radaktif" value="aktif">
|
||||||
<table class="table table-striped table-hover" id="myTable">
|
<table class="table table-striped table-hover" id="myTable">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Bil</th>
|
<th>ID Notis</th>
|
||||||
<th>Tarikh Notis</th>
|
<th>Tarikh Notis</th>
|
||||||
<th>Cawangan</th>
|
<th>Cawangan</th>
|
||||||
<th>Fasa</th>
|
<th>Fasa</th>
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
@if($item2['status'] == 2)
|
@if($item2['status'] == 2)
|
||||||
<img src="{{ asset('img/success.png') }}" style="width:20px"></img>
|
<img src="{{ asset('img/success.png') }}" style="width:20px"></img>
|
||||||
@endif
|
@endif
|
||||||
{{ $item2['details_caw']}}<br>
|
{{ $item2['details_caw']}} : {{ $item2['bakitotalsag']}}/{{ $item2['totalsag']}} <br>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endforeach</td>
|
@endforeach</td>
|
||||||
<td style="white-space: nowrap;">@if($item['info']['daritempoh'] == '5' )
|
<td style="white-space: nowrap;">@if($item['info']['daritempoh'] == '5' )
|
||||||
@@ -161,12 +161,13 @@
|
|||||||
@endif</td>
|
@endif</td>
|
||||||
{{-- <td style="white-space: nowrap;">{{ $item['info']['hinggatempoh'] ?? '-' }}</td> --}}
|
{{-- <td style="white-space: nowrap;">{{ $item['info']['hinggatempoh'] ?? '-' }}</td> --}}
|
||||||
<td style="white-space: nowrap;">
|
<td style="white-space: nowrap;">
|
||||||
{{-- <a href="{{ route('arcc.detailnotisperingatan', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-info text-white">Lihat</a> --}}
|
<a href="{{ route('arcc.detailnotisperingatan', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-info text-white">Lihat</a></td>
|
||||||
<a href="{{ route('arcc.kemaskininotisperingatan', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-warning text-white">Kemaskini</a></td>
|
{{-- <a href="{{ route('arcc.kemaskininotisperingatan', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-warning text-white">Kemaskini</a> --}}
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
<div style="color: #e74c3c" align=left> <i>*jika bilangan berkurang bermaksud telah masuk ke Notis Peringatan Kedua</i></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,9 @@
|
|||||||
@if($item2['status'] == 3)
|
@if($item2['status'] == 3)
|
||||||
<img src="{{ asset('img/surat.png') }}" style="width:20px"></img>
|
<img src="{{ asset('img/surat.png') }}" style="width:20px"></img>
|
||||||
@endif
|
@endif
|
||||||
{{ $item2['details_caw']}}<br>
|
@if($item2['bakitotalsagkedua'] > 0)<a style="color: #27ae60"><b>{{ $item2['details_caw']}} : {{ $item2['bakitotalsagkedua']}}/{{ $item2['totalsag']}} </b></a>
|
||||||
|
@else {{ $item2['details_caw']}} : {{ $item2['bakitotalsagkedua']}}/{{ $item2['totalsag']}}
|
||||||
|
@endif<br>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endforeach</td>
|
@endforeach</td>
|
||||||
<td style="white-space: nowrap;">@if($item['info']['daritempoh'] == '5' )
|
<td style="white-space: nowrap;">@if($item['info']['daritempoh'] == '5' )
|
||||||
@@ -162,7 +164,8 @@
|
|||||||
@endif</td>
|
@endif</td>
|
||||||
<td style="white-space: nowrap;">
|
<td style="white-space: nowrap;">
|
||||||
{{-- <a href="{{ route('arcc.detailnotisperingatankedua', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-info text-white">Lihat</a> --}}
|
{{-- <a href="{{ route('arcc.detailnotisperingatankedua', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-info text-white">Lihat</a> --}}
|
||||||
<a href="{{ route('arcc.kemaskininotisperingatankedua', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-warning text-white">Kemaskini</a></td>
|
<a href="{{ route('arcc.detailnotisperingatankedua', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-info text-white">Lihat</a></td>
|
||||||
|
{{-- <a href="{{ route('arcc.kemaskininotisperingatankedua', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-warning text-white">Kemaskini</a></td> --}}
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@@ -420,7 +420,14 @@ Route::get('/detailnotisperingatankedua/{notisid}',['as'=>'arcc.detailnotisperin
|
|||||||
Route::get('/bycawnotisperingatankedua/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisperingatankedua','uses'=>'CallCenterController@bycawnotisperingatankedua'])->middleware('auth','callcenter');
|
Route::get('/bycawnotisperingatankedua/{kodcaw}/{notisid}',['as'=>'arcc.bycawnotisperingatankedua','uses'=>'CallCenterController@bycawnotisperingatankedua'])->middleware('auth','callcenter');
|
||||||
Route::post('/blastkedua/{kodcaw}/{notisid}',['as'=>'arcc.blastkedua','uses'=>'CallCenterController@blastkedua'])->middleware('auth','callcenter');
|
Route::post('/blastkedua/{kodcaw}/{notisid}',['as'=>'arcc.blastkedua','uses'=>'CallCenterController@blastkedua'])->middleware('auth','callcenter');
|
||||||
Route::get('/kemaskininotisperingatankedua/{notisid}',['as'=>'arcc.kemaskininotisperingatankedua','uses'=>'CallCenterController@kemaskininotisperingatankedua'])->middleware('auth','callcenter');
|
Route::get('/kemaskininotisperingatankedua/{notisid}',['as'=>'arcc.kemaskininotisperingatankedua','uses'=>'CallCenterController@kemaskininotisperingatankedua'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/kemaskininotisperingatanbycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatanbycaw','uses'=>'CallCenterController@kemaskininotisperingatanbycaw'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/kemaskininotisperingatankeduabycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatankeduabycaw','uses'=>'CallCenterController@kemaskininotisperingatankeduabycaw'])->middleware('auth','callcenter');
|
||||||
|
|
||||||
|
//taraf pc atau ppc
|
||||||
|
Route::get('/cawangan/notisperingatan',['as'=>'laporan.notisperingatan','uses'=>'KhazanahController@notisperingatan'])->middleware('auth','khazanah');
|
||||||
|
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');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user