public function getIndex() { $breadcrumbs = array(array('Kompetensi' => ""), array('Realiasi' => ""), array('Diklat' => "")); $diklat = DiklatEvaluasi::all(); $page = DiklatEvaluasi::paginate(5); set_time_limit(0); $user = Auth::user(); //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); } //return $data; $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs')); $this->layout->content = View::make('development::userrealisasidiklat.index', compact('data', 'masterPegawai', 'diklat', 'page')); } }
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 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')); } }
<div class="panel-body"> <table class="table table-bordered table-striped table-advance table-hover"> <thead> <tr> <th>Nama</th> <th>Kemajuan</th> <th style="width: 15%">Aksi</th> </tr> </thead> <tbody> @foreach ($listData as $data) <tr> <td> {{ $data->name }} </td> <td> <?php $totalProfile = count(\Meniqa\Competency\Models\CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $competencyData->id, $data->id)); $checkProfile = count(\Meniqa\Competency\Models\CompetencyProfile::checkTestInv($user->nip, $riwJabatan->unit_staf_id, $competencyData->id, $data->id)); ?> {{ $totalProfile - $checkProfile }} pengisian dari {{ $totalProfile }} kompetensi </td> <td> <a href="{{ url('competency/test/inv/type/'.$data->id) }}" class="btn btn-primary"><i class="fa fa-edit"></i> Pengukuran</a> </td> </tr> @endforeach </tbody> </table> </div> </section> </div> </div>
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 getAction($type, $id) { $user = Auth::user(); $peers = CompetencyPeers::find($id); if ($peers != null) { //get User $pegawai = MasterPegawai::find($peers->user_id); } else { $pegawai = MasterPegawai::find($id); } //get jabatan $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $pegawai->nip); if ($riwJabatan != false) { $profile = CompetencyProfile::getTestPrs($pegawai->nip, $user->nip, $riwJabatan->unit_staf_id, $this->competencyData->id, $type); $totalProfile = count(CompetencyProfile::getProfile($riwJabatan->unit_staf_id, $this->competencyData->id, $type)); $checkProfile = count(CompetencyProfile::checkTestPrsType($pegawai->nip, $user->nip, $riwJabatan->unit_staf_id, $this->competencyData->id, $type)); $this->layout->content = View::make('competency::testPrs.type', compact('profile', 'pegawai', 'totalProfile', 'checkProfile')); } }