Commit 8fbeaac1 by Siti Aisah

tes error nik

parent 93f8f257
......@@ -99,7 +99,7 @@ public function store(Request $request){
foreach($reviewer as $r){
$isdm = DB::connection('isdm')->table('v_detil_pegawai')->where('noktp',$r->nik)->select('namalengkap','nip')->first();
if(!empty($isdm)){
// if(!empty($isdm)){
$saku = [
'id_pengajuan' => $hasil->id,
......@@ -108,14 +108,14 @@ public function store(Request $request){
'nip' => $isdm->nip
];
} else {
$saku = [
'id_pengajuan' => $hasil->id,
'nik' => $r->nik,
'nama' => $r->penelaah,
'nip' => 'NIK belum terdaftar di ISDM. Silakan update ke Kepegawaian.'
];
}
// } else {
// $saku = [
// 'id_pengajuan' => $hasil->id,
// 'nik' => $r->nik,
// 'nama' => $r->penelaah,
// 'nip' => 'NIK belum terdaftar di ISDM. Silakan update ke Kepegawaian.'
// ];
// }
Penelaah::query()->create($saku);
}
......@@ -130,7 +130,7 @@ public function store(Request $request){
DB::rollBack();
return Redirect::route('transaksi.index')
->with('error', 'Data kategori gagal diupdate');
->with('error', 'NIK tidak terdaftar, silakan update di ISDM');
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment