Exemplo n.º 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $data = Karyawan::find($id)->toArray();
     $jabatans = Jabatan::all()->toArray();
     //dd($data);
     return view('karyawan.edit', compact('data', 'jabatans'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function getIndex()
 {
     $data['pembudidaya'] = User::where('profesi', 'Pembudidaya')->get();
     // $data['kelompok'] = Kelompok::where('tipe','Pembudidaya')->get();
     $data['kelompok'] = Kelompok::all();
     $data['jabatan'] = Jabatan::all();
     return view('app.pembudidaya.index', $data);
 }
Exemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Start Check Authorization
     $invalid_auth = 1;
     $authRole = Auth::user()->UserRoles->role;
     if ($authRole == 1 or $authRole == 3) {
         $invalid_auth = 0;
     }
     if ($invalid_auth == 1) {
         Alert::error('Anda tidak memilik akses ini')->persistent('close');
         return redirect('dashboard');
     }
     // End Check Authorization
     $jabatan = Jabatan::all();
     return view('dropmin/jabatan/index')->with('jabatans', $jabatan);
 }
Exemplo n.º 4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $jabatan = Jabatan::all();
     return view('dropmin/jabatan/index')->with('jabatans', $jabatan);
 }
 public function getExportPdf(Request $r)
 {
     $nelayan = User::where('profesi', 'Nelayan')->whereBetween('created_at', [$r->offset, $r->limit])->orderBy('id', 'desc');
     $data['nelayan'] = $nelayan->get();
     $data['kelompok'] = Kelompok::where('tipe', '2')->get();
     $data['jabatan'] = Jabatan::all();
     $data['tgl_awal'] = $r->offset;
     $data['tgl_akhir'] = $r->limit;
     $pdf = PDF::loadView('app.nelayan.export-pdf', $data);
     return $pdf->setPaper('legal')->setOrientation('landscape')->setWarnings(false)->download('Data Nelayan.pdf');
 }
Exemplo n.º 6
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $data = Jabatan::all()->toArray();
     return view('jabatan.index', compact('data'));
 }
 public function getExportPdf(Request $r)
 {
     $pembudidaya = User::where('profesi', 'Pembudidaya')->whereBetween('created_at', [$r->offset, $r->limit])->orderBy('id', 'desc');
     if ($r->f != "") {
         $pembudidaya->where('jenis_usaha', $r->f);
     }
     $data['pembudidaya'] = $pembudidaya->get();
     $data['kelompok'] = Kelompok::where('tipe', 'Pembudidaya')->get();
     $data['jabatan'] = Jabatan::all();
     $data['tgl_awal'] = $r->offset;
     $data['tgl_akhir'] = $r->limit;
     $pdf = PDF::loadView('app.pembudidaya.export-pdf', $data);
     return $pdf->setPaper('legal')->setOrientation('landscape')->setWarnings(false)->download('Data Pembudidaya.pdf');
 }
Exemplo n.º 8
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $data = Employee::find($id);
     $province = Province::all();
     $cities = City::all();
     $citmin = City::whereRaw('id = (select min(`id`) from cities)')->get();
     $citmax = City::whereRaw('id = (select max(`id`) from cities)')->get();
     $grade = Grade::all();
     $jabatans = Jabatan::all();
     $pt = array('sd' => 'SD', 'smp' => 'SMP', 'sma' => 'SMA', 'd3' => 'D3', 's1' => 'S1', 'S2' => 'S2');
     $citsel = unserialize($data->id_cities);
     $tls = Teamleader::where('id_users', $data->id)->get();
     $pos = ProjectOfficer::where('id_users', $data->id)->get();
     $adms = Admin::where('id_users', $data->id)->get();
     return view('dropmin/data/edit')->with('data', $data)->with('province', $province)->with('grade', $grade)->with('tls', $tls)->with('pos', $pos)->with('adms', $adms)->with('jabatans', $jabatans)->with('pt', $pt)->with('citsel', $citsel)->with('cities', $cities);
 }
Exemplo n.º 9
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     // Start Check Authorization
     /**
      * 1. FullAccess - 1
      * 2. HRD - 3
      * 3. Creator - 5
      * 4. Handler - 7
      */
     $invalid_auth = 1;
     $authRole = Auth::user()->UserRoles->role;
     if ($authRole == 7 or $authRole == 1 or $authRole == 3) {
         $invalid_auth = 0;
     }
     if ($invalid_auth == 1) {
         Alert::error('Anda tidak memilik akses ini')->persistent('close');
         return redirect('data/list');
     }
     // End Check Authorization
     $data = Employee::find($id);
     $province = Province::all();
     $cities = City::all();
     $citmin = City::whereRaw('id = (select min(`id`) from cities)')->get();
     $citmax = City::whereRaw('id = (select max(`id`) from cities)')->get();
     $grade = Grade::all();
     $jabatans = Jabatan::all();
     $pt = array('sd' => 'SD', 'smp' => 'SMP', 'sma' => 'SMA', 'd3' => 'D3', 's1' => 'S1', 'S2' => 'S2');
     $citsel = unserialize($data->id_cities);
     $tls = Teamleader::where('id_users', $data->id)->get();
     $pos = ProjectOfficer::where('id_users', $data->id)->get();
     $adms = Admin::where('id_users', $data->id)->get();
     return view('dropmin/data/edit')->with('data', $data)->with('province', $province)->with('grade', $grade)->with('tls', $tls)->with('pos', $pos)->with('adms', $adms)->with('jabatans', $jabatans)->with('pt', $pt)->with('citsel', $citsel)->with('cities', $cities);
 }