public function getEva() { $competency = Competency::all(); $competencyAll = CompetencyType::all(); return $competencyAll; $this->layout->content = View::make('development::userrealisasidiklat.index', compact('data', 'masterPegawai')); }
public function getIndex() { set_time_limit(0); $user = Auth::user(); $breadcrumbs = array(array('Kompetensi' => ""), array('Realiasi' => ""), array('Diklat' => "")); $prioritas = PreoritasDiklat::all(); //ambil jabatan $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $user->nip); // return $riwJabatan; //ambil detail user $masterPegawai = MasterPegawai::getDetailbyDate($this->competencyData->date_start, $user->nip); if ($riwJabatan != false) { $profileSoft = CompetencyProfile::getProfilebyJabatan($riwJabatan->unit_staf_id, 1)->get(); $profileBusiness = CompetencyProfile::getProfilebyJabatan($riwJabatan->unit_staf_id, 2)->get(); $competencyType = CompetencyType::all(); $data = array(); foreach ($competencyType as $rowType) { $profile = CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $this->competencyData->id, $rowType->id); $data[] = array('type' => array('id' => $rowType->id, 'name' => $rowType->name), 'profile' => $profile); } // $db = DB::table('db_pegawai.master_pegawai')->get(); //return $db; //ambil data recap individual $preoritask = DB::table('competency_recap_individuals')->join('competency_recaps', 'competency_recap_individuals.competency_recap_id', '=', 'competency_recaps.id')->join('competency_dictionaries', 'competency_recap_individuals.competency_dictionary_id', '=', 'competency_dictionaries.id')->join('db_pegawai.master_pegawai', 'db_pegawai.master_pegawai.nip', '=', 'competency_recaps.user_nip')->join('db_pegawai.daf_unit_staf', 'db_pegawai.daf_unit_staf.unit_staf_id', '=', 'competency_recaps.occupation_id')->select(db::RAW('round(min(competency_recap_individuals.gap),2) as gap, count(competency_recaps.user_nip) as nip'), 'competency_recap_individuals.rcl', 'competency_recap_individuals.itj', 'competency_recap_individuals.ccl', 'competency_recap_individuals.gap', 'competency_recaps.id', 'db_pegawai.master_pegawai.nip', 'db_pegawai.daf_unit_staf.nama_lengkap', 'competency_dictionaries.id')->orderBy('rcl', 'asc')->orderBy('itj', 'desc')->groupBy('competency_dictionary_id')->paginate(8); $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs')); $this->layout->content = View::make('development::useridentificationdiklat.index', compact('data', 'masterPegawai', 'deputi', 'unit', 'prioritas', 'preoritask')); } }
public function postIndex() { $nip = Auth::user()->nip; $competency = Competency::all(); $recap = CompetencyRecap::with('competency')->where('competency_id', '=', Input::get('competency_id'))->where('user_nip', '=', $nip)->first(); $competencyType = CompetencyType::all(); $masterPegawai = MasterPegawai::getDetailbyDate($recap->competency->date_start, $nip); foreach ($competencyType as $rowCT) { $profiles = CompetencyProfile::getProfilebyRecapType($recap->user_nip, $rowCT->id); $result[] = array('name' => $rowCT->name, 'data' => $profiles); } // return $result; $this->layout->content = View::make('competency::result.index', compact('competency', 'recap', 'result', 'masterPegawai')); }
public function getProfile() { $rules = array('competency' => 'required', 'type' => 'required'); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { dd(Input::all()); Redirect::back()->with('errorMessage', 'inputan salah'); } else { $competencies = Competency::all(); $competencyTypes = CompetencyType::all(); $type = Input::get('type'); $competency = Input::get('competency'); $nip = Auth::user()->nip; $profile = CompetencyProfile::getProfile($nip, $competency, $type)->get(); // return $profile; $this->layout->content = View::make('competency::userprofile.index', compact('competencies', 'competencyTypes', 'profile')); } }
public function getIndex() { $breadcrumbs = array(array("Kompetensi" => ""), array("Profil Kompetensi" => "")); set_time_limit(0); $user = Auth::user(); //get jabatan $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $user->nip); //get user detail $masterPegawai = MasterPegawai::getDetailbyDate($this->competencyData->date_start, $user->nip); if ($riwJabatan != false) { $profileSoft = CompetencyProfile::getProfilebyJabatan($riwJabatan->unit_staf_id, 1)->get(); $profileBusiness = CompetencyProfile::getProfilebyJabatan($riwJabatan->unit_staf_id, 2)->get(); $competencyType = CompetencyType::all(); $data = array(); foreach ($competencyType as $rowType) { $profile = CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $this->competencyData->id, $rowType->id); $data[] = array('type' => array('id' => $rowType->id, 'name' => $rowType->name), 'profile' => $profile); } // return $data; $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs')); $this->layout->content = View::make('competency::profile.index', compact('data', 'masterPegawai')); } }
public function getPrs() { $breadcrumbs = array(array("Kompetensi" => ""), array("Pengukuran" => ""), array("Kemajuan" => ""), array("Orang Lain" => "")); $user = Auth::user(); //list Peers $listPeers = CompetencyPeers::with('user', 'rater')->where('rater_id', '=', $user->nip)->where(function ($query) { $query->where('status', '=', 'kolega'); // ->orWhere('status', '=', 'customer'); })->get(); $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $user->nip); $bawahan = DafUnitStaff::with('bawahan.bawahan')->where('unit_staf_id', '=', $riwJabatan->unit_staf_id)->first(); $atasan = DafUnitStaff::with('atasan')->where('unit_staf_id', '=', $riwJabatan->unit_staf_id)->first(); $data = array(); $competencyType = CompetencyType::all(); foreach ($listPeers as $peers) { //get jabatan $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $peers->user_id); $totalProfile = count(CompetencyProfile::getProfileAll($riwJabatan->unit_staf_id, $this->competencyData->id)); $checkProfile = count(CompetencyProfile::checkTestPrs($peers->user_id, $user->nip, $riwJabatan->unit_staf_id, $this->competencyData->id)); $result = array(); foreach ($competencyType as $rowType) { $profile = CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $this->competencyData->id, $rowType->id); $result[] = array('type' => array('id' => $rowType->id, 'name' => $rowType->name), 'profile' => $profile); } $data[] = array('id' => $peers->id, 'nip' => $peers->user_id, 'nama' => $peers->user->nama, 'status' => $peers->status, 'progress' => "" . $totalProfile - $checkProfile . " pengisian dari " . $totalProfile . " kompetensi", 'data' => $result); } //list bawahan level 1 & 2 if (isset($bawahan->bawahan) && $bawahan->bawahan != null) { foreach ($bawahan->bawahan as $rowBawahanlvl1) { //get user $userBawahan = RiwJabStruk::getUser($this->competencyData->date_start, $rowBawahanlvl1->unit_staf_id); if (isset($userBawahan) && $userBawahan != null) { $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $userBawahan->nip); $totalProfile = count(CompetencyProfile::getProfileAll($riwJabatan->unit_staf_id, $this->competencyData->id)); $checkProfile = count(CompetencyProfile::checkTestPrs($userBawahan->nip, $user->nip, $riwJabatan->unit_staf_id, $this->competencyData->id)); $result = array(); foreach ($competencyType as $rowType) { $profile = CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $this->competencyData->id, $rowType->id); $result[] = array('type' => array('id' => $rowType->id, 'name' => $rowType->name), 'profile' => $profile); } $data[] = array('id' => $userBawahan->nip, 'nip' => $userBawahan->nip, 'nama' => $userBawahan->pegawai->nama, 'status' => 'bawahan level 1', 'progress' => "" . $totalProfile - $checkProfile . " pengisian dari " . $totalProfile . " kompetensi", 'data' => $result); } //list bawahan level 2 if (isset($bawahan->bawahan->bawahan) && $bawahan->bawahan->bawahan != null) { foreach ($bawahan->bawahan as $rowBawahanlvl2) { //get user $userBawahan = RiwJabStruk::getUser($this->competencyData->date_start, [$rowBawahanlvl2->unit_staf_id]); if (isset($userBawahan) && $userBawahan != null) { $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $userBawahan->nip); $totalProfile = count(CompetencyProfile::getProfileAll($riwJabatan->unit_staf_id, $this->competencyData->id)); $checkProfile = count(CompetencyProfile::checkTestPrs($userBawahan->nip, $user->nip, $riwJabatan->unit_staf_id, $this->competencyData->id)); $result = array(); foreach ($competencyType as $rowType) { $profile = CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $this->competencyData->id, $rowType->id); $result[] = array('type' => array('id' => $rowType->id, 'name' => $rowType->name), 'profile' => $profile); } $data[] = array('id' => $userBawahan->nip, 'nip' => $userBawahan->nip, 'nama' => $userBawahan->pegawai->nama, 'status' => 'bawahan level 2', 'progress' => "" . $totalProfile - $checkProfile . " pengisian dari " . $totalProfile . " kompetensi", 'data' => $result); } } } } } //list atasan if (isset($atasan->atasan) && $atasan->atasan != null) { $rowAtasan = $atasan->atasan; //get user $userBawahan = RiwJabStruk::getUser($this->competencyData->date_start, $rowAtasan->unit_staf_id); if (isset($userBawahan) && $userBawahan != null) { $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $userBawahan->nip); $totalProfile = count(CompetencyProfile::getProfileAll($riwJabatan->unit_staf_id, $this->competencyData->id)); $checkProfile = count(CompetencyProfile::checkTestPrs($userBawahan->nip, $user->nip, $riwJabatan->unit_staf_id, $this->competencyData->id)); $result = array(); foreach ($competencyType as $rowType) { $profile = CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $this->competencyData->id, $rowType->id); $result[] = array('type' => array('id' => $rowType->id, 'name' => $rowType->name), 'profile' => $profile); } $data[] = array('id' => $userBawahan->nip, 'nip' => $userBawahan->nip, 'nama' => $userBawahan->pegawai->nama, 'status' => 'atasan', 'progress' => "" . $totalProfile - $checkProfile . " pengisian dari " . $totalProfile . " kompetensi", 'data' => $result); } } // return $data; $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs')); $this->layout->content = View::make('competency::progress.peers', compact('data')); }
public function getUpdate($id) { $breadcrumbs = array(array("Kompetensi" => url("admin/competency/type")), array("Kamus Kompetensi" => ""), array("Ubah Data" => "")); $data = CompetencyDictionary::find($id); $dataType = CompetencyType::all(); $dataParent = CompetencyDictionary::where('parent', '=', 0)->get(); $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs')); $this->layout->content = View::make('competency::adminDictionary.update', compact('data', 'dataType', 'dataParent')); }