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'));
     }
 }
Esempio n. 2
0
 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'));
     }
 }
Esempio n. 3
0
function user_fullname()
{
    if (Auth::check()) {
        $nip = Auth::user()->nip;
        $userData = MasterPegawai::where('nip', '=', $nip)->first();
        return $userData;
    } else {
        return false;
    }
}
Esempio n. 4
0
 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 getDetail($nip)
 {
     $competencyActive = Competency::getActive();
     $breadcrumbs = array(array("Kompetensi" => url("admin/competency/type")), array("Kolega & bawahan" => ""), array("Update data" => ""));
     //get jabatan
     //        $riwJabatan = RiwJabStruk::getJabatanOnCompetency($competencyActive->date_start, $nip);
     //list all pegawai
     $pegawai = MasterPegawai::mastertoDafUnitStaff($competencyActive)->get();
     //get user detail
     $masterPegawai = MasterPegawai::getDetailbyDate($competencyActive->date_start, $nip);
     //get peers
     $peers = CompetencyPeers::with('rater')->where('user_id', '=', $nip)->where('competency_id', '=', $competencyActive->id)->get();
     $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs'));
     $this->layout->content = View::make('competency::adminPeers.update', compact('masterPegawai', 'peers', 'pegawai'));
 }
Esempio n. 6
0
 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'));
     }
 }
Esempio n. 7
0
 public function doRegister()
 {
     // validate the info, create rules for the inputs
     $rules = array('nip' => 'required', 'password' => 'required', 'password_conf' => 'required|same:password');
     // run the validation rules on the inputs from the form
     $validator = Validator::make(Input::all(), $rules);
     // if the validator fails, redirect back to the form
     if ($validator->fails()) {
         return Redirect::to('registration')->withErrors($validator);
         // send back all errors to the login form
     } else {
         //if user not found create it
         $user = User::where('nip', '=', Input::get('username'))->first();
         if (is_null($user)) {
             //cek di bagian master pegawai
             $masterPegawai = MasterPegawai::where('nip', '=', Input::get('nip'))->first();
             if (!is_null($masterPegawai)) {
                 // Validate, then create if valid
                 $newUser = new User();
                 $newUser->nip = Input::get('nip');
                 $newUser->username = Input::get('nip');
                 $newUser->password = Hash::make(Input::get('password'));
                 if ($newUser->save()) {
                     //attach to user roles
                     $newUser->group()->attach(2);
                     return View::make('employeemenpan::auth.successregistration');
                 }
             } else {
                 //                    dd('error 303');
                 return Redirect::to('registration')->with('message', 'nip tidak ditemukan dalam siAsik');
             }
         } else {
             //                dd('error 403');
             return Redirect::to('registration')->with('message', 'nip sudah terdaftar dalam siMSDM-TBK ');
         }
     }
 }
Esempio n. 8
0
 public function postUpdate($dictionary_id, $peersNip)
 {
     $userNip = Auth::user()->nip;
     $pegawai = MasterPegawai::find($peersNip);
     // cek memiliki recap_id atau enggak
     $recap = CompetencyRecap::where('competency_id', '=', $this->competencyData->id)->where('user_nip', '=', $pegawai->nip)->first();
     if (is_null($recap)) {
         //get jabatan
         $riwJabatan = RiwJabStruk::getJabatanOnCompetency($this->competencyData->date_start, $pegawai->nip);
         $recap = new CompetencyRecap();
         $recap->competency_id = $this->competencyData->id;
         $recap->user_nip = $pegawai->nip;
         $recap->occupation_id = $riwJabatan->unit_staf_id;
         $recap->save();
     }
     //simpan ke dalam database
     $test = new CompetencyTest();
     $test->competency_id = $this->competencyData->id;
     $test->competency_recap_id = $recap->id;
     $test->competency_dictionary_id = Input::get('compId');
     $test->user_id = $pegawai->nip;
     $test->rater_id = $userNip;
     $test->level = Input::get('level');
     $test->evidence = Input::get('evidence');
     if ($test->save()) {
         return Redirect::to('competency/progress/prs');
     }
 }