public function getAjaxListUnit($value = '')
 {
     $unit = Unit::all();
     return Datatables::of($unit)->addColumn('atasan', function ($unit) {
         return $unit['atasan']['singkatan'];
     })->addColumn('action', function ($unit) {
         return '<a href="' . route('hapus-personil') . '/' . $unit->id . '" class="btn btn-xs btn-danger"><i class="glyphicon glyphicon-trash"></i> Hapus</a>';
     })->make(true);
 }
 public function getPersonilEdit($value = '')
 {
     $unit = Unit::all();
     $jabatan = Jabatan::all();
     $atasan = Personil::all();
     $edit = Personil::where('id', $value)->firstOrFail();
     $url = 'personil/personil-edit';
     return view('personil.tambah', compact('unit', 'jabatan', 'atasan', 'edit', 'url'));
 }
예제 #3
0
파일: Unit.php 프로젝트: spitzgoby/dwa15_p4
 public static function validationIDs($filter = -1)
 {
     $units = Unit::all(['id', 'unit_type']);
     $ids = [];
     foreach ($units as $unit) {
         if ($unit->unit_type & $filter) {
             $ids[] = $unit->id;
         }
     }
     $csv = '';
     for ($i = 0; $i < count($ids); $i++) {
         $csv = $csv . $ids[$i];
         if ($i != count($ids) - 1) {
             $csv .= ',';
         }
     }
     return $csv;
 }
 public function getModalUpload(Request $request)
 {
     $jenis_id = $request->input('jenis');
     $checklist_id = $request->input('checklist');
     $unit_id = $request->input('unit');
     $actifity_id = $request->input('actifity');
     $actifity = Actifity::where('id', $actifity_id)->firstOrFail();
     $unit = unit::where('id', $unit_id)->firstOrFail();
     $jenis = Sub_jenis_dokumen::where('id', $jenis_id)->firstOrFail();
     $unit_tujuan = unit::all();
     $visibility = Visibility::all();
     // dd($unit);
     return view('checklist._upload-dokumen-modal', compact('jenis_id', 'jenis', 'checklist_id', 'actifity', 'unit', 'unit_tujuan', 'visibility'));
 }
 public function getTambahActifity()
 {
     $jenis_dokumen = Jenis_dokumen::all();
     $unit = Unit::all();
     return view('datamaster.tambah_actifity', compact('jenis_dokumen', 'unit'));
 }