2024-03-10 09:07:03 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
use App\Models\PengajuanDpuDpa;
|
2024-03-15 18:36:20 +07:00
|
|
|
use App\Models\PengajuanSempro;
|
2024-03-20 17:08:09 +07:00
|
|
|
use App\Models\PengajuanSidangAkhir;
|
2024-03-10 09:07:03 +07:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
class MonitoringController extends Controller
|
|
|
|
{
|
|
|
|
|
2024-03-15 18:36:20 +07:00
|
|
|
public function index(){
|
|
|
|
return view('monitoring.index',['title' => 'Cari Pengajuan Anda Menggunakan CASEID yang Dikirim Lewat Email']);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function search(Request $request){
|
|
|
|
return redirect()->route('monitoring.caseid',['caseid'=>$request->caseid]);
|
|
|
|
}
|
|
|
|
|
2024-03-10 09:07:03 +07:00
|
|
|
public function caseid($caseid){
|
2024-03-15 18:36:20 +07:00
|
|
|
$cek_caseid = substr($caseid, 0, 2);
|
|
|
|
if($cek_caseid=="LS"){
|
|
|
|
$data = PengajuanDpuDpa::where('caseid', $caseid)
|
|
|
|
->select(
|
|
|
|
'pengajuan_dpu_dpas.*',
|
|
|
|
'mahasiswas.nim',
|
|
|
|
'mahasiswas.nama',
|
|
|
|
'mahasiswas.judul_seminar_proposal',
|
|
|
|
'dosen_dpu.nama_gelar as dosen_dpu_nama_gelar',
|
|
|
|
'dosen_dpa.nama_gelar as dosen_dpa_nama_gelar',
|
|
|
|
)
|
|
|
|
->join('mahasiswas','mahasiswas_id','=','mahasiswas.id')
|
|
|
|
->join('users as dosen_dpu','mahasiswas.dosen_dpu_id','=','dosen_dpu.id')
|
|
|
|
->join('users as dosen_dpa','mahasiswas.dosen_dpa_id','=','dosen_dpa.id')
|
|
|
|
->first();
|
|
|
|
if($data==null){
|
|
|
|
return redirect()->route('monitoring.index')->with('error','CaseID Tidak Ditemukan');
|
|
|
|
}
|
|
|
|
return view('monitoring.dpu_dpa',['title' => 'Monitoring Pengajuan DPU/DPA - '.$caseid,'data' => $data]);
|
|
|
|
}
|
|
|
|
elseif($cek_caseid=="LP"){
|
|
|
|
$data = PengajuanSempro::where('caseid',$caseid)
|
|
|
|
->select(
|
|
|
|
'pengajuan_sempros.*',
|
|
|
|
'mahasiswas.nim',
|
|
|
|
'mahasiswas.nama',
|
|
|
|
'mahasiswas.judul_seminar_proposal',
|
|
|
|
'dosen_dpu.nama_gelar as dosen_dpu_nama_gelar',
|
|
|
|
)
|
|
|
|
->join('mahasiswas','mahasiswas_id','=','mahasiswas.id')
|
|
|
|
->join('users as dosen_dpu','mahasiswas.dosen_dpu_id','=','dosen_dpu.id')
|
|
|
|
->first();
|
|
|
|
if($data==null){
|
|
|
|
return redirect()->route('monitoring.index')->with('error','CaseID Tidak Ditemukan');
|
|
|
|
}
|
|
|
|
return view('monitoring.sempro',['title' => 'Monitoring Pengajuan Seminar Proposal - '.$caseid,'data' => $data]);
|
|
|
|
}
|
2024-03-20 17:08:09 +07:00
|
|
|
elseif($cek_caseid=="LA"){
|
|
|
|
$data = PengajuanSidangAkhir::where('caseid',$caseid)
|
|
|
|
->select(
|
|
|
|
'pengajuan_sidang_akhirs.*',
|
|
|
|
'mahasiswas.nim',
|
|
|
|
'mahasiswas.nama',
|
|
|
|
'mahasiswas.judul_skripsi_id',
|
|
|
|
'mahasiswas.judul_skripsi_en',
|
|
|
|
'dosen_dpu.nama_gelar as dosen_dpu_nama_gelar',
|
|
|
|
)
|
|
|
|
->join('mahasiswas','mahasiswas_id','=','mahasiswas.id')
|
|
|
|
->join('users as dosen_dpu','mahasiswas.dosen_dpu_id','=','dosen_dpu.id')
|
|
|
|
->first();
|
|
|
|
if($data==null){
|
|
|
|
return redirect()->route('monitoring.index')->with('error','CaseID Tidak Ditemukan');
|
|
|
|
}
|
|
|
|
return view('monitoring.sidangakhir',['title' => 'Monitoring Pengajuan Sidang Akhir - '.$caseid,'data' => $data]);
|
|
|
|
}
|
2024-03-15 18:36:20 +07:00
|
|
|
else{
|
|
|
|
return redirect()->route('monitoring.index')->with('error','CaseID Tidak Valid');
|
|
|
|
}
|
2024-03-10 09:07:03 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|