public function getUpdate($id)
 {
     $breadcrumbs = array(array("Kompetensi" => url("admin/competency/type")), array("Jadwal Kompetensi" => ""), array("Ubah Data" => ""));
     $schedule = Competency::find($id);
     $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs'));
     $this->layout->content = View::make('competency::adminSchedule.create', compact('schedule'));
 }
 public function getEva()
 {
     $competency = Competency::all();
     $competencyAll = CompetencyType::all();
     return $competencyAll;
     $this->layout->content = View::make('development::userrealisasidiklat.index', compact('data', 'masterPegawai'));
 }
Ejemplo n.º 3
0
 public function jabatanpengukuran()
 {
     $competency = Competency::getActive();
     return $this->hasMany('Meniqa\\EmployeeMenpan\\Models\\RiwJabStruk', 'nip', 'nip')->where('tmt_mulai', '<=', $competency->date_start)->where(function ($query) use($competency) {
         $query->where('tmt_selesai', '>=', $competency->date_start)->orWhere('tmt_selesai', '=', '0000-00-00');
     });
 }
 public function postIndex()
 {
     $breadcrumbs = array(array('Competency' => ""), array('Diklat' => ""));
     $competencyAll = Competency::all();
     $recap = CompetencyRecap::where('competency_id', Input::get('cli'))->first();
     $recapInv = CompetencyRecapIndividuals::with('dictionary')->where('competency_recap_id', $recap->id)->where('gap', '<', 0)->get();
     //return $recapInv;
     $this->layout->content = View::make('development::useridentification.index', compact('competencyAll', 'recap', 'recapInv'));
 }
Ejemplo n.º 5
0
 function __construct()
 {
     //get competency schedule active
     $competencyActive = Competency::where('status', '=', 'active')->first();
     if ($competencyActive->count()) {
         $this->competencyData = $competencyActive;
     } else {
         $this->layout->content = View::make('competency::test.forbidden');
     }
 }
Ejemplo n.º 6
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'));
 }
Ejemplo n.º 7
0
 public function getOfflinetest()
 {
     //q1 => jabatan_id
     $dataScheduleActive = Competency::where('status', '=', 'active')->first();
     $dataJabatan = DafUnitStaff::where('aktif_id', '=', 1)->get();
     $dataProfile = null;
     if (Input::has('q1')) {
         $jabatanTerpilih = DafUnitStaff::where('unit_staf_id', Input::get('q1'))->first();
         $dataProfile = CompetencyProfile::with('competencyDictionary.competencyType', 'competencyDictionary.level')->where('competency_id', '=', $dataScheduleActive->id)->where('jabatan_id', '=', Input::get('q1'))->get();
         //            return $jabatanTerpilih;
         $html = View::make('competency::adminProfile.downloadoffflinetest', compact('dataProfile', 'jabatanTerpilih'));
         return PDF::load($html, 'A4', 'portrait')->download('offline test competency');
     } else {
         $this->layout->content = View::make('competency::adminProfile.offlineTest', compact('dataScheduleActive', 'dataJabatan'));
     }
 }
Ejemplo n.º 8
0
 public static function checkActive()
 {
     $competency = Competency::where('status', '=', 'active')->first();
     if (count($competency) > 0) {
         $dateStart = strtotime($competency->date_start);
         $dateEnd = strtotime($competency->date_end);
         $now = strtotime('now');
         if ($now < $dateStart) {
             return 200;
         } elseif ($now > $dateEnd) {
             return 300;
         } else {
             return 1;
         }
     } else {
         return false;
     }
 }
Ejemplo n.º 9
0
 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'));
     }
 }
Ejemplo n.º 10
0
 public function postResult()
 {
     //        return Input::all();
     $competencyAll = Competency::all();
     $competency = Competency::find(Input::get('competency'));
     $recap = CompetencyRecap::with('pegawai', 'jabatan')->where('competency_id', $competency->id)->get();
     $this->layout->content = View::make('competency::adminRecap.result', compact('competencyAll', 'competency', 'recap'));
 }
Ejemplo n.º 11
0
 public function apiDetail($id)
 {
     $competencyActive = Competency::getActive();
     $peers = CompetencyPeers::with('rater.jabatanpengukuran.jabatan.unit')->find($id);
     return $peers;
 }