fix(penilai/so): perbaikkan menu sla unfreeze
This commit is contained in:
@@ -450,7 +450,7 @@ class PenilaianController extends Controller
|
||||
|
||||
public function otorisatorUpdate(Request $request, $id, $context)
|
||||
{
|
||||
if ($context === 'Freze SLA') {
|
||||
if ($context === 'Freze SLA' || $context === 'Unfreeze SLA') {
|
||||
$authorization = Authorization::with(['user'])->find($id);
|
||||
if (!$authorization) {
|
||||
return response()->json([
|
||||
@@ -595,6 +595,14 @@ class PenilaianController extends Controller
|
||||
]);
|
||||
}
|
||||
break;
|
||||
case 'unfreeze sla':
|
||||
$authorization->update([
|
||||
'request' => 'unfreeze-sla',
|
||||
]);
|
||||
$permohonan->update([
|
||||
'status' => 'unfreeze-sla',
|
||||
]);
|
||||
break;
|
||||
|
||||
default:
|
||||
return response()->json([
|
||||
@@ -891,7 +899,7 @@ class PenilaianController extends Controller
|
||||
|
||||
public function revisiLaporan(Request $request, $id)
|
||||
{
|
||||
// dd($request->all());
|
||||
// dd($id);
|
||||
if($request->dataHeader=='Paparan' || $request->dataHeader=='Freze SLA'){
|
||||
$authorization = Authorization::find($id);
|
||||
$permohonan = Permohonan::find($authorization->permohonan_id);
|
||||
@@ -906,7 +914,7 @@ class PenilaianController extends Controller
|
||||
}
|
||||
|
||||
$status = 'revisi-paparan';
|
||||
}else if($permohonan->status === 'freeze'){
|
||||
}else if($permohonan->status === 'request-freeze'){
|
||||
if ($authorization) {
|
||||
$authorization->delete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user