Commit d01b8225 by Siti Aisah

tampilan gagal update nik kosong

parent 48464d45
......@@ -98,26 +98,29 @@ public function store(Request $request){
$reviewer = DB::table('bantuan_penelaah')->where('id_pengajuan',$request->idpengajuan)->get();
foreach($reviewer as $r){
$isdm = DB::connection('isdm')->table('v_detil_pegawai')->where('noktp',$r->nik)->select('namalengkap','nip')->first();
// if(!empty($isdm)){
$rev[$r->nik] = $r->nik;
}
$isdm = DB::connection('isdm')->table('v_detil_pegawai')->whereIn('noktp',$rev)->select('namalengkap','nip','noktp')->get();
if(count($isdm) >= 2){
foreach($isdm as $sdm){
$saku = [
'id_pengajuan' => $hasil->id,
'nik' => $r->nik,
'nama' => $isdm->namalengkap,
'nip' => $isdm->nip
'nik' => $sdm->noktp,
'nama' => $sdm->namalengkap,
'nip' => $sdm->nip
];
// } 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);
} else {
foreach($isdm as $sdm){
$data['kosong'] = DB::table('bantuan_penelaah')->where('id_pengajuan',$request->idpengajuan)->where('nik','!=', $sdm->noktp)->first();
}
return view('transaksi-gagal', $data);
}
DB::commit();
......@@ -130,7 +133,7 @@ public function store(Request $request){
DB::rollBack();
return Redirect::route('transaksi.index')
->with('error', 'NIK tidak terdaftar, silakan update di ISDM');
->with('error', 'Data Kategori gagal diupdate');
}
}
}
@extends('layouts.master')
@section('content')
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Notifikasi</h3>
</div>
<div class="card-body">
<h4>{{ $kosong->penelaah }} gagal update karena:<br>
NIK {{ $kosong->nik }} belum terdaftar di ISDM. Silakan update ke Kepegawaian.</h4><br>
<a href="{{ route('transaksi.index') }}">Kembali</a>
</div>
</div>
</div>
</div>
@push('js')
@endpush
@stop
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