Commit 9cf90b69 by Alfiro Pratama

Upload Laporan Magang Monev I

parent 69f3f68d
...@@ -69,8 +69,10 @@ class LuaranController extends Controller ...@@ -69,8 +69,10 @@ class LuaranController extends Controller
'judul' => $luaran['judul'], 'judul' => $luaran['judul'],
'jenis_luaran' => $luaran['jenis_luaran'], 'jenis_luaran' => $luaran['jenis_luaran'],
'keterangan_luaran' => $luaran['keterangan_luaran'], 'keterangan_luaran' => $luaran['keterangan_luaran'],
'kategori_luaran' => $luaran['jenis_luaran_lainnya'] === 'Lainnya' ? $luaran['jenis_luaran_lainnya'] : null,
'file_luaran' => $file_nama, 'file_luaran' => $file_nama,
'created_user' => Auth::user()->id 'created_user' => Auth::user()->id,
'updated_user' => Auth::user()->id
]); ]);
return redirect()->route('mahasiswa.luaran.show', encrypt($luaran['proposal_id']))->with('success', 'Proposal Berhasil ditambahkan'); return redirect()->route('mahasiswa.luaran.show', encrypt($luaran['proposal_id']))->with('success', 'Proposal Berhasil ditambahkan');
...@@ -85,7 +87,7 @@ class LuaranController extends Controller ...@@ -85,7 +87,7 @@ class LuaranController extends Controller
public function show($id) public function show($id)
{ {
// //
$title = 'Proposal Luaran Mahasiswa'; $title = 'Unggah Laporan Magang Mahasiswa';
$proposal = Proposal::with(['rluaran', 'rPeriode'])->find(decrypt($id)); $proposal = Proposal::with(['rluaran', 'rPeriode'])->find(decrypt($id));
$data = [ $data = [
...@@ -100,15 +102,18 @@ class LuaranController extends Controller ...@@ -100,15 +102,18 @@ class LuaranController extends Controller
{ {
$pro = $request->except('_token'); $pro = $request->except('_token');
$proposal = Proposal::query()->find(decrypt($pro['id'])); // Dekripsi ID hanya sekali
$id = decrypt($pro['id']);
Storage::disk('static')->delete('simpmw/luaran/'.$proposal->jenis_luaran.'/'.$proposal->file_luaran);
$proposal = ProposalLuaran::query()->find($id);
$proposal->delete();
if ($proposal) {
Alert::success('Berhasil dihapus'); Storage::disk('static')->delete('simpmw/luaran/'.$proposal->jenis_luaran.'/'.$proposal->file_luaran);
$proposal->delete();
return redirect()->route('mahasiswa.luaran.index'); return response()->json(['status' => 'success', 'message' => 'Berhasil dihapus']);
} else {
return response()->json(['status' => 'error', 'message' => 'Proposal tidak ditemukan']);
}
} }
public function dosen($id) public function dosen($id)
......
...@@ -176,7 +176,7 @@ class DaftarProposalController extends Controller ...@@ -176,7 +176,7 @@ class DaftarProposalController extends Controller
$lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '1')"; $lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '1')";
$tidak_lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '2')"; $tidak_lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '2')";
$batalkanNilai1 = // $batalkanNilai1 =
$disable_1 = $disable_2 = ''; $disable_1 = $disable_2 = '';
......
...@@ -12,7 +12,7 @@ class DaftarProposal extends Model ...@@ -12,7 +12,7 @@ class DaftarProposal extends Model
protected $keyType = 'string'; protected $keyType = 'string';
protected $fillable = [ protected $fillable = [
'proposal_id', 'jenis_id', 'kode', 'jenis_pkm', 'judul', 'status', 'status_hapus', 'status_administrasi_1', 'status_administrasi_2', 'reviewer_id_1', 'reviewer_id_2', 'status_final', 'nidn_reviewer_id_1', 'nidn_reviewer_id_2', 'upload_dokumen', 'date_upload', 'date_approval', 'identitas_ketua', 'identitas_dospem', 'periode' 'proposal_id', 'jenis_id', 'kode', 'jenis_pkm', 'judul', 'status', 'status_hapus', 'status_administrasi_1', 'status_administrasi_2', 'reviewer_id_1', 'reviewer_id_2', 'status_final', 'nidn_reviewer_id_1', 'nidn_reviewer_id_2', 'upload_dokumen', 'date_upload', 'date_approval', 'identitas_ketua', 'identitas_dospem', 'periode', 'url'
]; ];
public function rKelompokDetil() public function rKelompokDetil()
......
...@@ -23,4 +23,9 @@ class DaftarProposalMonev extends Model ...@@ -23,4 +23,9 @@ class DaftarProposalMonev extends Model
{ {
return $this->hasMany(\App\Models\KelompokDetail::class, 'kelompok_id', 'kelompok_id'); return $this->hasMany(\App\Models\KelompokDetail::class, 'kelompok_id', 'kelompok_id');
} }
public function proposalUrl()
{
return $this->belongsTo(ProposalUrl::class, 'proposal_id', 'proposal_id');
}
} }
...@@ -22,7 +22,7 @@ class ProposalLuaran extends Model ...@@ -22,7 +22,7 @@ class ProposalLuaran extends Model
'proposal_id', 'proposal_id',
'judul', 'judul',
'jenis_luaran', 'jenis_luaran',
'ketegori_luaran', 'kategori_luaran',
'keterangan_luaran', 'keterangan_luaran',
'file_luaran', 'file_luaran',
'created_user', 'created_user',
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</td> </td>
<td align="center"> <td align="center">
<button data-bs-toggle="modal" data-bs-target="{{ '#lihat'.$item->id }}" class="btn btn-success btn-sm form-control mb-2"><i class="fas fa-search"></i> Hasil Penilaian</button> <button data-bs-toggle="modal" data-bs-target="{{ '#lihat'.$item->id }}" class="btn btn-success btn-sm form-control mb-2"><i class="fas fa-search"></i> Hasil Penilaian</button>
<a href="{{ URL::to('mahasiswa/monev-revisi/'.encrypt($item->id.'__proposal__I')) }}" type="button" class="btn btn-danger btn-sm waves-effect waves-light form-control" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Revisi Proposal"><i class="fas fa-file-upload"></i> Revisi</a> <a href="{{ URL::to('mahasiswa/monev-revisi/'.encrypt($item->proposal_id.'__proposal__I')) }}" type="button" class="btn btn-danger btn-sm waves-effect waves-light form-control" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Revisi Proposal"><i class="fas fa-file-upload"></i> Revisi</a>
<div id="{{ 'lihat'.$item->id }}" class="modal fade" tabindex="-1" role="dialog" <div id="{{ 'lihat'.$item->id }}" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="lihatLabel" aria-hidden="true"> aria-labelledby="lihatLabel" aria-hidden="true">
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<div class="mb-0"> <div class="mb-0">
<div> <div>
<button type="submit" class="btn btn-primary waves-effect waves-light me-1"> Submit </button> <button type="submit" class="btn btn-primary waves-effect waves-light me-1"> Submit </button>
<button type="button" onclick="window.location.href='{{ URL::to('/mahasiswa/monev/II') }}'" class="btn btn-secondary waves-effect"> Cancel </button> <button type="button" onclick="window.history.back();" class="btn btn-secondary waves-effect"> Cancel </button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="col-md-8"> <div class="col-md-8">
<h6 class="page-title">{!! $title !!}</h6> <h6 class="page-title">{!! $title !!}</h6>
<ol class="breadcrumb m-0"> <ol class="breadcrumb m-0">
<li class="breadcrumb-item">Monev Internal I</li> <li class="breadcrumb-item">{{ $jenis_monev->nama }}</li>
<li class="breadcrumb-item">{!! $title !!}</li> <li class="breadcrumb-item">{!! $title !!}</li>
</ol> </ol>
</div> </div>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<br> <br>
<div class="table-responsive"> <div class="table-responsive">
<table id="example" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;"> <table id="example" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead> <thead align="center" style="vertical-align: middle;">
<tr> <tr>
<th rowspan="2">id</th> <th rowspan="2">id</th>
<th rowspan="2">Kode Kelompok</th> <th rowspan="2">Kode Kelompok</th>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment