Commit 8fbeaac1 by Siti Aisah

tes error nik

parent 93f8f257
...@@ -99,7 +99,7 @@ public function store(Request $request){ ...@@ -99,7 +99,7 @@ public function store(Request $request){
foreach($reviewer as $r){ foreach($reviewer as $r){
$isdm = DB::connection('isdm')->table('v_detil_pegawai')->where('noktp',$r->nik)->select('namalengkap','nip')->first(); $isdm = DB::connection('isdm')->table('v_detil_pegawai')->where('noktp',$r->nik)->select('namalengkap','nip')->first();
if(!empty($isdm)){ // if(!empty($isdm)){
$saku = [ $saku = [
'id_pengajuan' => $hasil->id, 'id_pengajuan' => $hasil->id,
...@@ -108,14 +108,14 @@ public function store(Request $request){ ...@@ -108,14 +108,14 @@ public function store(Request $request){
'nip' => $isdm->nip 'nip' => $isdm->nip
]; ];
} else { // } else {
$saku = [ // $saku = [
'id_pengajuan' => $hasil->id, // 'id_pengajuan' => $hasil->id,
'nik' => $r->nik, // 'nik' => $r->nik,
'nama' => $r->penelaah, // 'nama' => $r->penelaah,
'nip' => 'NIK belum terdaftar di ISDM. Silakan update ke Kepegawaian.' // 'nip' => 'NIK belum terdaftar di ISDM. Silakan update ke Kepegawaian.'
]; // ];
} // }
Penelaah::query()->create($saku); Penelaah::query()->create($saku);
} }
...@@ -130,7 +130,7 @@ public function store(Request $request){ ...@@ -130,7 +130,7 @@ public function store(Request $request){
DB::rollBack(); DB::rollBack();
return Redirect::route('transaksi.index') 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