Merged in izzati-ujrah (pull request #78)

update arcc notis peringatan ejas table
This commit is contained in:
izzati zulkifli
2024-01-07 08:53:58 +00:00
7 changed files with 42 additions and 11 deletions
@@ -538,4 +538,31 @@ class CallCenterController extends Controller
} }
public function kemaskininotisperingatankedua($notisid)
{
$auth_user = Auth::user();
$api_url = config('api.url');
$senarai = [];
$detailnotis = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/getcawnotis/'.$notisid)->json();
foreach($detailnotis as $info)
{
$kemaskininotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url'). '/arcc/kemaskininotisperingatan', [
'kodcaw' => $info[0]['kodcaw'],
'notisid' => $notisid
])->json();
if($kemaskininotisperingatan == 'success'){
return redirect()->route('arcc.detailnotisperingatankedua',['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.detailnotisperingatankedua',compact('detailnotis','senarai','notisid'));
}
} }
@@ -70,7 +70,7 @@
#details th { #details th {
padding: 8px; padding: 8px;
font-size: 11px; font-size: 14px;
} }
#details tr:nth-child(even) { #details tr:nth-child(even) {
@@ -123,7 +123,7 @@
</div> </div>
@endif @endif
<div class="container"> <div class="container-fluid">
<form id="exportpdf" action="{{route('arcc.blastpertama',['kodcaw' => $kodcaw, 'notisid' => $notisid])}}" target="_blank" method="POST"> <form id="exportpdf" action="{{route('arcc.blastpertama',['kodcaw' => $kodcaw, 'notisid' => $notisid])}}" target="_blank" method="POST">
@csrf @csrf
@@ -260,7 +260,7 @@
alert("ADAKAH ANDA PASTI?"); alert("ADAKAH ANDA PASTI?");
$('#typedonwload').val('whatsapp'); $('#typedonwload').val('whatsapp');
$("#exportpdf").submit(); $("#exportpdf").submit();
}); });
} }
} }
@@ -70,7 +70,7 @@
#details th { #details th {
padding: 8px; padding: 8px;
font-size: 11px; font-size: 14px;
} }
#details tr:nth-child(even) { #details tr:nth-child(even) {
@@ -123,7 +123,7 @@
</div> </div>
@endif @endif
<div class="container"> <div class="container-fluid">
<form id="exportpdf" action="{{route('arcc.blastkedua',['kodcaw' => $kodcaw, 'notisid' => $notisid])}}" target="_blank" method="POST"> <form id="exportpdf" action="{{route('arcc.blastkedua',['kodcaw' => $kodcaw, 'notisid' => $notisid])}}" target="_blank" method="POST">
{{-- <form id="exportpdf" action="" target="_blank" method="POST"> --}} {{-- <form id="exportpdf" action="" target="_blank" method="POST"> --}}
@@ -138,10 +138,10 @@
->get($api_url . '/arcc/getfasa', ['kodcaw' => $kodcaw, 'notisid' => $notisid]) ->get($api_url . '/arcc/getfasa', ['kodcaw' => $kodcaw, 'notisid' => $notisid])
->json(); ->json();
@endphp @endphp
<input type='hidden' name="fasa" value="{{$getfasa['fasa']}}"> <input type='hidden' name="fasa" value="{{$getfasa['fasa'] ?? ''}}">
<table class="table table-striped table-hover" id="details"> <table class="table table-striped table-hover" id="details" align="center">
<thead> <thead>
<th>Bil</th> <th>Bil</th>
<th>No.Rujukan</th> <th>No.Rujukan</th>
@@ -162,6 +162,7 @@
</thead> </thead>
{{-- {{dd($bycawnotisperingatankedua)}} --}}
@foreach ($bycawnotisperingatankedua as $index => $item) @foreach ($bycawnotisperingatankedua as $index => $item)
<tr> <tr>
<td>{{ $loop->iteration }}</td> <td>{{ $loop->iteration }}</td>
@@ -174,7 +174,7 @@
<div class="row"> <div class="row">
<div class="btn-group-toggle col-md-12 col-sm-12 mb-4"> <div class="btn-group-toggle col-md-12 col-sm-12 mb-4">
<label class="btn btn-lg green"> <label class="btn btn-lg green">
<a href="{{ route('arcc.rekodnotisperingatan') }}" class="btn btn-dark btn-lg btn-block mb-3">Rekod Notis Peringatan</a> <a href="{{ route('arcc.rekodnotisperingatan') }}" class="btn btn-dark btn-lg btn-block mb-3">Rekod Notis Peringatan Pertama</a>
</label> </label>
<label class="btn btn-lg radio-green"> <label class="btn btn-lg radio-green">
<a href="{{ route('arcc.notisperingatankedua') }}" class="btn btn-dark btn-lg btn-block mb-3">Jana Notis Peringatan Kedua</a> <a href="{{ route('arcc.notisperingatankedua') }}" class="btn btn-dark btn-lg btn-block mb-3">Jana Notis Peringatan Kedua</a>
@@ -160,7 +160,8 @@
Fasa 2 Fasa 2
@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;"><a href="{{ route('arcc.detailnotisperingatan', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-info text-white">Lihat</a> <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.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></td>
</tr> </tr>
@@ -160,8 +160,9 @@
@elseif($item['info']['daritempoh'] == '11' ) @elseif($item['info']['daritempoh'] == '11' )
Fasa 2 Fasa 2
@endif</td> @endif</td>
<td style="white-space: nowrap;"><a href="{{ route('arcc.detailnotisperingatankedua', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-info text-white">Lihat</a> <td style="white-space: nowrap;">
<a href="{{ route('arcc.kemaskininotisperingatan', [ '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> --}}
<a href="{{ route('arcc.kemaskininotisperingatankedua', [ 'notisid' => $item['info']['id']] ) }}" class="btn btn-warning text-white">Kemaskini</a></td>
</tr> </tr>
@endforeach @endforeach
+1
View File
@@ -419,6 +419,7 @@ Route::get('/cariansagnotiskedua',['as'=>'arcc.cariansagnotiskedua','uses'=>'Cal
Route::get('/detailnotisperingatankedua/{notisid}',['as'=>'arcc.detailnotisperingatankedua','uses'=>'CallCenterController@detailnotisperingatankedua'])->middleware('auth','callcenter'); Route::get('/detailnotisperingatankedua/{notisid}',['as'=>'arcc.detailnotisperingatankedua','uses'=>'CallCenterController@detailnotisperingatankedua'])->middleware('auth','callcenter');
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');