fix skit2
This commit is contained in:
@@ -1851,7 +1851,13 @@ class AdminPageController extends Controller
|
|||||||
|
|
||||||
public function GetPermohonanCawangan($kodcaw,Request $request)
|
public function GetPermohonanCawangan($kodcaw,Request $request)
|
||||||
{
|
{
|
||||||
$listpermohonan = Permohonan::where('kodcaw', $kodcaw)->get();
|
|
||||||
|
if($kodcaw === 'admin')
|
||||||
|
{
|
||||||
|
$listpermohonan = Permohonan::where('tagterima',0)->orderBy('tarikh_permohonan','desc')->paginate(5);
|
||||||
|
}else{
|
||||||
|
$listpermohonan = Permohonan::where([['kodcaw', $kodcaw],['tagterima',0]])->get();
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json($listpermohonan);
|
return response()->json($listpermohonan);
|
||||||
}
|
}
|
||||||
@@ -1862,8 +1868,27 @@ class AdminPageController extends Controller
|
|||||||
$listpermohonan = Permohonan::where([['kodcaw', $kodcaw],['mohonid',$mohonid]])->first()->toArray();
|
$listpermohonan = Permohonan::where([['kodcaw', $kodcaw],['mohonid',$mohonid]])->first()->toArray();
|
||||||
$status = Status::where('mohonid',$mohonid)->get()->toArray();
|
$status = Status::where('mohonid',$mohonid)->get()->toArray();
|
||||||
|
|
||||||
$permohonanstatus = $listpermohonan + $status;
|
array_push($listpermohonan,(["status" => $status]));
|
||||||
|
|
||||||
return response()->json($permohonanstatus);
|
return response()->json($listpermohonan);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetDescriptionStatus($mohonid)
|
||||||
|
{
|
||||||
|
$statusarray = [];
|
||||||
|
|
||||||
|
$status = Status::where('mohonid',$mohonid)->get()->toArray();
|
||||||
|
|
||||||
|
foreach($status as $index=>$stat)
|
||||||
|
{
|
||||||
|
$status_lookup = LookupStatus::where('statusid',$stat['statusid'])->first()->toArray();
|
||||||
|
// $status_lookup = $stat['tarikhmasa'];
|
||||||
|
$date = date('d-m-Y',strtotime($stat['tarikhmasa']));
|
||||||
|
$time = date('g:i a',strtotime($stat['tarikhmasa']));
|
||||||
|
array_push($status_lookup,['tarikh' => $date, 'masa' => $time]);
|
||||||
|
array_push($statusarray,$status_lookup);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json($statusarray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-1
@@ -26,7 +26,10 @@ class Pengesahan extends Model
|
|||||||
'noresit',
|
'noresit',
|
||||||
'tarikh_bankin',
|
'tarikh_bankin',
|
||||||
'kodcaw',
|
'kodcaw',
|
||||||
'mohonid'
|
'mohonid',
|
||||||
|
'tagoperasi',
|
||||||
|
'tagakaun',
|
||||||
|
'tagpb'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-1
@@ -28,7 +28,8 @@ class Permohonan extends Model
|
|||||||
'tarikh_terima',
|
'tarikh_terima',
|
||||||
'nama_penerima',
|
'nama_penerima',
|
||||||
'outstandingsemasa',
|
'outstandingsemasa',
|
||||||
'nopermohonan'
|
'nopermohonan',
|
||||||
|
'tagterima'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -686,6 +686,9 @@ $router->group(['prefix'=>'admin'], function () use ($router){
|
|||||||
$router->post('permohonan/add/{kodcaw}',['uses'=>'AdminPageController@TambahPermohonan']);
|
$router->post('permohonan/add/{kodcaw}',['uses'=>'AdminPageController@TambahPermohonan']);
|
||||||
$router->get('permohonan/get/{kodcaw}',['uses'=>'AdminPageController@GetPermohonanCawangan']);
|
$router->get('permohonan/get/{kodcaw}',['uses'=>'AdminPageController@GetPermohonanCawangan']);
|
||||||
$router->get('permohonan/get/{kodcaw}/{mohonid}',['uses'=>'AdminPageController@GetPermohonanById']);
|
$router->get('permohonan/get/{kodcaw}/{mohonid}',['uses'=>'AdminPageController@GetPermohonanById']);
|
||||||
|
$router->get('permohonan/description/{mohonid}',['uses'=>'AdminPageController@GetDescriptionStatus']);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$router->group(['prefix'=>'kelantanpay'], function () use ($router){
|
$router->group(['prefix'=>'kelantanpay'], function () use ($router){
|
||||||
|
|||||||
Reference in New Issue
Block a user