Esempio n. 1
0
 function getPrint($id)
 {
     $karyawan = data_karyawan::find($id);
     $keluarga = data_karyawan_klrg::where('id_karyawan', $karyawan->id_karyawan)->get();
     $status_karyawan = data_personalia::join('ref_status_karyawan', 'ref_status_karyawan.id', '=', 'data_personalia.id_status')->where('tipe_status', 1)->where('id_karyawan', $karyawan->id_karyawan)->get();
     $catatan = data_personalia::join('ref_status_karyawan', 'ref_status_karyawan.id', '=', 'data_personalia.id_status')->where('tipe_status', 3)->orWhere('tipe_status', 4)->orWhere('tipe_status', 5)->where('id_karyawan', $karyawan->id_karyawan)->get();
     $jabatan = ref_jabatan::where('id', $karyawan->jabatan)->first();
     $agama = ref_agama::where('id', $karyawan->agama)->first();
     return view('Print.Personalia.karyawan', ['karyawan' => $karyawan, 'keluarga' => $keluarga, 'status_karyawan' => $status_karyawan, 'jabatan' => $jabatan, 'agama' => $agama, 'catatan' => $catatan]);
 }
Esempio n. 2
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle()
 {
     data_karyawan_klrg::find($this->req['id'])->update(['id_karyawan' => $this->req['id_karyawan'], 'nm_depan' => $this->req['nm_depan'], 'nm_belakang' => $this->req['nm_belakang'], 'hubungan' => $this->req['hubungan'], 'sex' => $this->req['gender'], 'tempat_lahir' => $this->req['tempat_lahir'], 'tgl_lahir' => date('Y-m-d', strtotime($this->req['tgl_lahir'])), 'pendidikan' => $this->req['pendidikan'], 'pekerjaan' => $this->req['pekerjaan']]);
     return $this->req;
 }