Commit 516fd734 by novanbagus

Merge branch 'master' of http://git.unesa.ac.id/farendi/simpkm

parents 84444659 0cdb5a2d
......@@ -15,7 +15,9 @@ use App\Models\Jenis;
use Session;
use Alert;
use App\Models\DaftarProposal;
use Auth;
use DB;
class SeleksiController extends Controller
{
......@@ -72,4 +74,69 @@ class SeleksiController extends Controller
return view('backend.dosen.seleksi.index_belmawa', $data);
}
public function lihatInternal(Request $request)
{
$item = DaftarProposal::where('proposal_id', $request->proposal_id)->first();
$nilai_1= DB::select("select ambil_jumlah_penilaian_seleksi('".$item->reviewer_proposal_id_1."', '".$item->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$nilai_2= DB::select("select ambil_jumlah_penilaian_seleksi('".$item->reviewer_proposal_id_2."', '".$item->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$rata = number_format((float) (($nilai_1 + $nilai_2) / 2), 0, '.', '');
$data = '';;
if($item->upload_dokumen){
$dokumen = ' <a href="https://statik.unesa.ac.id/simpkm/proposal/'. $item->periode .'/'. $item->upload_dokumen.'" target="_blank" class="btn btn-success btn-sm"> <i class="far fa-eye"></i> Lihat Proposal</a>
<iframe id="view-pdf" width="100%" height="400px" src="https://statik.unesa.ac.id/simpkm/proposal/'. $item->periode .'/'.$item->upload_dokumen .'" frameborder="0"></iframe>';
}else{
$dokumen = '<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert">
<strong>Informasi!</strong><br/> File tidak ditemukan.
</div>';
}
if(is_null($item->status)){
$status = '<span class="badge bg-danger">Menunggu Persetujuan Dosen</span>';
}else{
$status = '<span class="badge bg-success">Sudah Disetujui Dosen</span>';
}
$data .= "
<tr>
<td>Judul Proposal</td>
<td>".$item->judul."</td>
</tr>
<tr>
<td>Jenis PKM</td>
<td>".$item->jenis_pkm."</td>
</tr>
<tr>
<td>Status</td>
<td>".$status."</td>
</tr>
<tr>
<td>Proposal</td>
<td>".$dokumen."</td>
</tr>
<tr>
<td>Komentar</td>
<td>
<h4 class='card-title mb-4'>Nilai Total </h4>
<p class='text-muted mb-3 pb-4'>". $rata ."</p>
<h4 class='card-title mb-4'>Reviewer 1 </h4>
<p class='text-muted mb-3 pb-4'>".$item->reviewer_komentar_1."</p>
<h4 class='card-title mb-4'>Reviewer 2 </h4>
<p class='text-muted mb-3 pb-4'>".$item->reviewer_komentar_2."</p>
</td>
</tr>
";
$response['html'] = $data;
echo json_encode($response);
}
}
......@@ -11,6 +11,7 @@ use App\Models\KelompokDetail;
use Session;
use Alert;
use App\Helpers\InseoHelper;
class AnggotaController extends Controller
{
......@@ -57,6 +58,8 @@ class AnggotaController extends Controller
//
$kelompok = $request->except('_token');
$kelompok['fakultas'] = InseoHelper::singkatan_fakultas()[strtolower($kelompok['fakultas'])];
$cek = KelompokDetail::where('kelompok_id', $kelompok['kelompok_id'])->where('nim', $kelompok['nim'])->count();
if ($cek > 0) {
......
......@@ -15,7 +15,9 @@ use App\Models\Jenis;
use Session;
use Alert;
use App\Models\DaftarProposal;
use Auth;
use DB;
class SeleksiController extends Controller
{
......@@ -152,4 +154,70 @@ class SeleksiController extends Controller
return redirect()->route('mahasiswa.seleksi-belmawa')->with('success', 'Proposal Berhasil revisi');
}
public function lihatInternal(Request $request)
{
$item = DaftarProposal::where('proposal_id', $request->proposal_id)->first();
$nilai_1= DB::select("select ambil_jumlah_penilaian_seleksi('".$item->reviewer_proposal_id_1."', '".$item->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$nilai_2= DB::select("select ambil_jumlah_penilaian_seleksi('".$item->reviewer_proposal_id_2."', '".$item->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
$rata = number_format((float) (($nilai_1 + $nilai_2) / 2), 0, '.', '');
$data = '';
$no = 1;
if($item->upload_dokumen){
$dokumen = ' <a href="https://statik.unesa.ac.id/simpkm/proposal/'. $item->periode .'/'. $item->upload_dokumen.'" target="_blank" class="btn btn-success btn-sm"> <i class="far fa-eye"></i> Lihat Proposal</a>
<iframe id="view-pdf" width="100%" height="400px" src="https://statik.unesa.ac.id/simpkm/proposal/'. $item->periode .'/'.$item->upload_dokumen .'" frameborder="0"></iframe>';
}else{
$dokumen = '<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert">
<strong>Informasi!</strong><br/> File tidak ditemukan.
</div>';
}
if(is_null($item->status)){
$status = '<span class="badge bg-danger">Menunggu Persetujuan Dosen</span>';
}else{
$status = '<span class="badge bg-success">Sudah Disetujui Dosen</span>';
}
$data .= "
<tr>
<td>Judul Proposal</td>
<td>".$item->judul."</td>
</tr>
<tr>
<td>Jenis PKM</td>
<td>".$item->jenis_pkm."</td>
</tr>
<tr>
<td>Status</td>
<td>".$status."</td>
</tr>
<tr>
<td>Proposal</td>
<td>".$dokumen."</td>
</tr>
<tr>
<td>Komentar</td>
<td>
<h4 class='card-title mb-4'>Nilai Total </h4>
<p class='text-muted mb-3 pb-4'>". $rata ."</p>
<h4 class='card-title mb-4'>Reviewer 1 </h4>
<p class='text-muted mb-3 pb-4'>".$item->reviewer_komentar_1."</p>
<h4 class='card-title mb-4'>Reviewer 2 </h4>
<p class='text-muted mb-3 pb-4'>".$item->reviewer_komentar_2."</p>
</td>
</tr>
";
$response['html'] = $data;
echo json_encode($response);
}
}
......@@ -85,56 +85,8 @@
@endif
</td>
<td>
<button data-bs-toggle="modal" data-bs-target="{{ '#lihat'.$item->proposal_id }}" href="{{ URL::to('mahasiswa/kelompok-new', encrypt($item->proposal_id)) }}" class="btn btn-info btn-sm">Lihat</button>
<a data-toggle="tooltip" data-id="{{ $item->proposal_id }}" data-original-title="Lihat" class="btn btn-info btn-sm lihatDet"><i class="far fa-eye"></i> Lihat</a>
<div id="{{ 'lihat'.$item->proposal_id }}" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="lihatLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="lihatLabel">Detail Proposal </h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
<div class="table-responsive">
<table class="table mb-0">
<tr>
<th>Judul Proposal</th>
<td>{{ $item->judul }}</td>
</tr>
<tr>
<th>Jenis PKM</th>
<td>{{ $item->rJenis->nama }}</td>
</tr>
<tr>
<th>Status</th>
<td>
@if(is_null($item->status))
<span class="badge bg-danger">Lolos Seleksi Internal</span>
@else
<span class="badge bg-success">Tidak Lolos Seleksi Internal</span>
@endif
</td>
</tr>
<tr>
<th>Proposal</th>
<td>
<a href="https://statik.unesa.ac.id/simpkm/proposal/{{ $item->rPeriode->nama }}/{{ $item->upload_dokumen }}" target="_blank" class="btn btn-success btn-sm"> <i class="far fa-eye"></i> Lihat Proposal</a>
<iframe id="view-pdf" width="100%" height="200px" src="https://statik.unesa.ac.id/simpkm/proposal/{{ $item->rPeriode->nama }}/{{ $item->upload_dokumen }}" frameborder="0"></iframe>
</td>
</tr>
<tr>
<th>Komentar</th>
<td> </td>
</tr>
</table>
</div>
</p>
</div>
</div>
</div>
</div>
</div>
</td>
......@@ -148,40 +100,27 @@
</div> <!-- end col -->
</div> <!-- end row -->
<div id="uploadRev" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div id="lihatDetail" class="modal fade">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<form action="{{ route('mahasiswa.kelompok.store') }}" method="POST">
@csrf
<div class="modal-header">
<h5 class="modal-title" id="myModalLabel">Tambah Kelompok Baru</h5>
<h5 class="modal-title" id="lihatLabel">Detail Proposal </h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="col-12">
<h5 class="font-size-16">Silahkan pilih dosen pembimbing : </h5>
<p>
<div class="row mb-3" class="dropzone">
<label for="kode" class="col-sm-2 col-form-label">Upload Proposal</label>
<div class="col-sm-10">
<input type="file" name="file" class="form-control" id="input-file">
<br/>
<iframe id="view-pdf" width="100%" height="320px" src="" frameborder="0"></iframe>
</div>
<div class="table-responsive">
<table class="table mb-0" id="tableDetail">
<tbody>
</tbody>
</table>
</div>
</p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary waves-effect waves-light">Save changes</button>
</div>
</form>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
@endsection
......@@ -235,5 +174,33 @@
}
})
}
$(document).ready(function(){
$('#datatable').on('click','.lihatDet',function(){
var proId = $(this).attr('data-id');
if(proId != null || proId != ''){
// Empty modal data
$('#tableDetail tbody').empty();
$.ajax({
url: "{{route('dosen.seleksi-internal.lihat')}}",
data : {
"proposal_id": proId,
},
dataType: 'json',
success: function(response){
// Add user details
$('#tableDetail tbody').html(response.html);
// Display Modal
$('#lihatDetail').modal('show');
}
});
}
});
});
</script>
@endsection
......@@ -87,11 +87,22 @@
@endif
</td>
<td>
<a data-toggle="tooltip" data-id="{{ $item->proposal_id }}" data-original-title="Lihat" class="btn btn-info btn-sm lihatDet"><i class="far fa-eye"></i> Lihat</a>
<button data-bs-toggle="modal" data-bs-target="{{ '#lihat'.$item->proposal_id }}" href="{{ URL::to('mahasiswa/kelompok-new', encrypt($item->proposal_id)) }}" class="btn btn-info btn-sm">Lihat</button>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
<div id="{{ 'lihat'.$item->proposal_id }}" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="lihatLabel" aria-hidden="true">
<div id="lihatDetail" class="modal fade">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
......@@ -101,46 +112,11 @@
<div class="modal-body">
<p>
<div class="table-responsive">
<table class="table mb-0">
<tr>
<th>Judul Proposal</th>
<td>{{ $item->judul }}</td>
</tr>
<tr>
<th>Jenis PKM</th>
<td>{{ $item->rJenis->nama }}</td>
</tr>
<tr>
<th>Status</th>
<td>
@if(is_null($item->status))
<span class="badge bg-danger">Lolos Seleksi Internal</span>
@else
<span class="badge bg-success">Tidak Lolos Seleksi Internal</span>
@endif
</td>
</tr>
<tr>
<th>Proposal</th>
<td>
<a href="https://statik.unesa.ac.id/simpkm/proposal/{{ $item->rPeriode->nama }}/{{ $item->upload_dokumen }}" target="_blank" class="btn btn-success btn-sm"> <i class="far fa-eye"></i> Lihat Proposal</a>
</td>
</tr>
<tr>
<th>Komentar</th>
<td>
<h4 class="card-title mb-4">Nilai Total </h4>
@php $rata = ($item->rNilai->nilai_1 + $item->rNilai->nilai_2) / 2; @endphp
<p class="text-muted mb-3 pb-4"> {{ $rata }}</p>
<table class="table mb-0" id="tableDetail">
<tbody>
<h4 class="card-title mb-4">Reviewer 1 </h4>
<p class="text-muted mb-3 pb-4">" {{ $item->rNilai->reviewer_komentar_1 }}"</p>
</tbody>
<h4 class="card-title mb-4">Reviewer 2 </h4>
<p class="text-muted mb-3 pb-4">" {{ $item->rNilai->reviewer_komentar_2 }}"</p>
</td>
</tr>
</table>
</div>
</p>
......@@ -148,20 +124,6 @@
</div>
</div>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
@endsection
@section('js')
......@@ -205,5 +167,33 @@
}
})
}
$(document).ready(function(){
$('#datatable').on('click','.lihatDet',function(){
var proId = $(this).attr('data-id');
if(proId != null || proId != ''){
// Empty modal data
$('#tableDetail tbody').empty();
$.ajax({
url: "{{route('mahasiswa.seleksi-internal.lihat')}}",
data : {
"proposal_id": proId,
},
dataType: 'json',
success: function(response){
// Add user details
$('#tableDetail tbody').html(response.html);
// Display Modal
$('#lihatDetail').modal('show');
}
});
}
});
});
</script>
@endsection
......@@ -90,6 +90,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::get('/seleksi-internal', [SeleksiMahasiswa::class, 'seleksiInternal'])->name('seleksi-internal');
Route::get('/seleksi-belmawa', [SeleksiMahasiswa::class, 'seleksiBelmawa'])->name('seleksi-belmawa');
Route::get('/seleksi-internal-revisi', [SeleksiMahasiswa::class, 'internalRevisi'])->name('seleksi-internal-revisi');
Route::get('/seleksi-internal-lihat', [SeleksiMahasiswa::class, 'lihatInternal'])->name('seleksi-internal.lihat');
Route::get('/seleksi-belmawa/revisi/{id}', [SeleksiMahasiswa::class, 'editBelmawa'])->name('seleksi-belmawa-revisi');
Route::post('/seleksi-belmawa/upload', [SeleksiMahasiswa::class, 'uploadBelmawa'])->name('seleksi-belmawa-upload');
......@@ -134,6 +135,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::get('/seleksi-internal', [DosenSeleksi::class, 'seleksiInternal'])->name('seleksi-internal');
Route::get('/seleksi-belmawa', [DosenSeleksi::class, 'seleksiBelmawa'])->name('seleksi-belmawa');
Route::get('/seleksi-internal-revisi', [DosenSeleksi::class, 'internalRevisi'])->name('seleksi-internal-revisi');
Route::get('/seleksi-internal-lihat', [DosenSeleksi::class, 'lihatInternal'])->name('seleksi-internal.lihat');
//monev
Route::get('/monev/{id}', [DosenMonev::class, 'monev'])->name('monev-index');
......
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