コード例 #1
0
 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'));
     }
 }