Commit 4651c25d by novanbagus

update cetak excel seleksi internal, seleksi belmawa dan monev internal

parent ad07dac1
<?php
namespace App\Exports;
use App\Models\DaftarProposalBelmawa;
use Illuminate\Support\Facades\DB;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
class DaftarProposalBelmawaExport implements FromView,ShouldAutoSize
{
/**
* @return \Illuminate\Support\Collection
*/
public function __construct($jenis,$status,$tahun)
{
$this->jenis= $jenis;
$this->status = $status;
$this->tahun= $tahun;
}
public function view(): View
{
$statement = " STATUS_HAPUS = '0' ";
if($this->jenis != "0")
{
$statement .= " AND jenis_id = '".$this->jenis."'";
}
if($this->status != "0")
{
// dikurang 1 karena di view mulai dari 0 sedangkan 0 itu menunggu persetujuan
$status = $this->status - 1;
$statement .= " AND STATUS = '".$status."'";
}
if($this->tahun != "0")
{
$statement .= " AND PERIODE = '".$this->tahun."'";
}
$data = DaftarProposalBelmawa::with('rKelompokDetil')->whereRaw($statement)->get();
$result = [];
$no = 0;
foreach ($data as $key => $value) {
$dospem = "(".str_replace("###",") ",$value->identitas_dospem);
$url = "https://statik.unesa.ac.id/simpkm/proposal/".$value->periode."/".$value->upload_dokumen;
$urut = 1;
foreach ($value->rKelompokDetil as $keys => $detil) {
if($detil->status_ketua == '1')
{
$keanggotaan = "Ketua";
}
else
{
$keanggotaan = "Anggota ".$urut;
$urut++;
}
$result[$no]['rowspan'] = count($value->rKelompokDetil);
$result[$no]['kode'] = $value->kode_kelompok;
$result[$no]['jenis'] = $value->jenis_pkm;
$result[$no]['fak'] = $detil->fakultas;
$result[$no]['nama'] = $detil->nama;
$result[$no]['nim'] = $detil->nim;
$result[$no]['keanggotaan'] = $keanggotaan;
$result[$no]['judul'] = $value->judul;
$result[$no]['dospem'] = $dospem;
$result[$no]['link'] = $url;
$result[$no]['status'] = $value->status_desc;
$no++;
}
}
$datas['list_proposal'] = $result;
$datas['jenis_monev'] = 'Seleksi Belmawa';
return view('backend.operator.daftar_proposal.excel', $datas);
}
}
<?php
namespace App\Exports;
use App\Models\DaftarProposal;
use Illuminate\Support\Facades\DB;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
class DaftarProposalExport implements FromView,ShouldAutoSize
{
/**
* @return \Illuminate\Support\Collection
*/
public function __construct($jenis,$status,$tahun)
{
$this->jenis= $jenis;
$this->status = $status;
$this->tahun= $tahun;
}
public function view(): View
{
$statement = " STATUS_HAPUS = '0' ";
if($this->jenis != "0")
{
$statement .= " AND jenis_id = '".$this->jenis."'";
}
if($this->status != "0")
{
// dikurang 1 karena di view mulai dari 0 sedangkan 0 itu menunggu persetujuan
$status = $this->status - 1;
$statement .= " AND STATUS = '".$status."'";
}
if($this->tahun != "0")
{
$statement .= " AND PERIODE = '".$this->tahun."'";
}
$data = DaftarProposal::with('rKelompokDetil')->whereRaw($statement)->get();
$result = [];
$no = 0;
foreach ($data as $key => $value) {
$dospem = "(".str_replace("###",") ",$value->identitas_dospem);
$url = "https://statik.unesa.ac.id/simpkm/proposal/".$value->periode."/".$value->upload_dokumen;
if($value->status_final == '1')
$status_final = "Lolos";
elseif($value->status_final == '2')
$status_final = "Tidak Lolos";
else
$status_final = "Menunggu Persetujuan";
$urut = 1;
foreach ($value->rKelompokDetil as $keys => $detil) {
if($detil->status_ketua == '1')
{
$keanggotaan = "Ketua";
}
else
{
$keanggotaan = "Anggota ".$urut;
$urut++;
}
$result[$no]['rowspan'] = count($value->rKelompokDetil);
$result[$no]['kode'] = $value->kode;
$result[$no]['jenis'] = $value->jenis_pkm;
$result[$no]['fak'] = $detil->fakultas;
$result[$no]['nama'] = $detil->nama;
$result[$no]['nim'] = $detil->nim;
$result[$no]['keanggotaan'] = $keanggotaan;
$result[$no]['judul'] = $value->judul;
$result[$no]['dospem'] = $dospem;
$result[$no]['link'] = $url;
$result[$no]['status'] = $status_final;
$no++;
}
}
$datas['list_proposal'] = $result;
$datas['jenis_monev'] = 'Seleksi Internal';
return view('backend.operator.daftar_proposal.excel', $datas);
}
}
<?php
namespace App\Exports;
use App\Models\DaftarProposalBelmawa;
use Illuminate\Support\Facades\DB;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
class DaftarProposalMonevExport implements FromView,ShouldAutoSize
{
/**
* @return \Illuminate\Support\Collection
*/
public function __construct($jenis,$status,$tahun)
{
$this->jenis= $jenis;
$this->status = $status;
$this->tahun= $tahun;
}
public function view(): View
{
$statement = " STATUS_HAPUS = '0' ";
if($this->jenis != "0")
{
$statement .= " AND jenis_id = '".$this->jenis."'";
}
if($this->status != "0")
{
// dikurang 1 karena di view mulai dari 0 sedangkan 0 itu menunggu persetujuan
$status = $this->status - 1;
$statement .= " AND STATUS = '".$status."'";
}
if($this->tahun != "0")
{
$statement .= " AND PERIODE = '".$this->tahun."'";
}
$data = DaftarProposalBelmawa::with('rKelompokDetil')->whereRaw($statement)->get();
$result = [];
$no = 0;
foreach ($data as $key => $value) {
$dospem = "(".str_replace("###",") ",$value->identitas_dospem);
$url = "https://statik.unesa.ac.id/simpkm/proposal/".$value->periode."/".$value->upload_dokumen;
$urut = 1;
foreach ($value->rKelompokDetil as $keys => $detil) {
if($detil->status_ketua == '1')
{
$keanggotaan = "Ketua";
}
else
{
$keanggotaan = "Anggota ".$urut;
$urut++;
}
$result[$no]['rowspan'] = count($value->rKelompokDetil);
$result[$no]['kode'] = $value->kode_kelompok;
$result[$no]['jenis'] = $value->jenis_pkm;
$result[$no]['fak'] = $detil->fakultas;
$result[$no]['nama'] = $detil->nama;
$result[$no]['nim'] = $detil->nim;
$result[$no]['keanggotaan'] = $keanggotaan;
$result[$no]['judul'] = $value->judul;
$result[$no]['dospem'] = $dospem;
$result[$no]['link'] = $url;
$result[$no]['status'] = $value->status_desc;
$no++;
}
}
$datas['list_proposal'] = $result;
$datas['jenis_monev'] = 'Seleksi Belmawa';
return view('backend.operator.daftar_proposal.excel', $datas);
}
}
......@@ -23,7 +23,26 @@ class ProposalExport implements FromView,ShouldAutoSize
public function view(): View
{
$data = DaftarProposal::with('rKelompokDetil')->get();
$statement = " STATUS_HAPUS = '0' ";
if($this->jenis != "0")
{
$statement .= " AND jenis_id = '".$this->jenis."'";
}
if($this->status != "0")
{
// dikurang 1 karena di view mulai dari 0 sedangkan 0 itu menunggu persetujuan
$status = $this->status - 1;
$statement .= " AND STATUS = '".$status."'";
}
if($this->tahun != "0")
{
$statement .= " AND PERIODE = '".$this->tahun."'";
}
$data = DaftarProposal::with('rKelompokDetil')->whereRaw($statement)->get();
$result = [];
$no = 0;
......
......@@ -9,8 +9,10 @@ use Auth;
use Uuid;
use Alert;
use Crypt;
use GuzzleHttp\Client;
use App\Models\Jenis;
use GuzzleHttp\Client;
use App\Models\Periode;
use App\Models\Reviewer;
use Illuminate\Http\Request;
use App\Models\DaftarProposal;
......@@ -18,8 +20,12 @@ use App\Models\SeleksiBelmawa;
use Illuminate\Support\Carbon;
use App\Models\ReviewerProposal;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel;
use App\Exports\DaftarProposalExport;
use App\Models\DaftarProposalBelmawa;
use App\Models\ReviewerProposalDetil;
use App\Exports\DaftarProposalMonevExport;
use App\Exports\DaftarProposalBelmawaExport;
class DaftarProposalController extends Controller
{
......@@ -27,11 +33,17 @@ class DaftarProposalController extends Controller
public function index()
{
return view('backend.operator.daftar_proposal.index')->withTitle('Daftar Proposal Seleksi Internal');
$periode = Periode::query()->get();
$jenis = Jenis::query()->where('status_hapus', '0')->get();
return view('backend.operator.daftar_proposal.index', compact('periode', 'jenis'))->withTitle('Daftar Proposal Seleksi Internal');
}
/* AJAX request */
public function getData(Request $request){
// parameter
$jenis= $request->get('jenis');
$status = $request->get('status');
$tahun= $request->get('tahun');
## Read value
$draw = $request->get('draw');
......@@ -50,6 +62,24 @@ class DaftarProposalController extends Controller
// Total records
$statementGlobal = " 1=1 ";
if($jenis != "0")
{
$statementGlobal .= " AND JENIS_ID = '".$jenis."'";
}
if($status != "0")
{
// dikurang 1 karena di view mulai dari 0 sedangkan 0 itu menunggu persetujuan
$status = $status - 1;
$statementGlobal .= " AND STATUS_FINAL = '".$status."'";
}
if($tahun != "0")
{
$statementGlobal .= " AND PERIODE = '".$tahun."'";
}
$totalRecords = DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$statement = " AND (UPPER(JUDUL) LIKE '%".$searchValue."%') ";
......@@ -176,11 +206,17 @@ class DaftarProposalController extends Controller
public function index_belmawa()
{
return view('backend.operator.daftar_proposal.belmawa')->withTitle('Daftar Proposal Seleksi Belmawa');
$periode = Periode::query()->get();
$jenis = Jenis::query()->where('status_hapus', '0')->get();
return view('backend.operator.daftar_proposal.belmawa', compact('periode', 'jenis'))->withTitle('Daftar Proposal Seleksi Belmawa');
}
/* AJAX request */
public function getDataBelmawa(Request $request){
// parameter
$jenis= $request->get('jenis');
$status = $request->get('status');
$tahun= $request->get('tahun');
## Read value
$draw = $request->get('draw');
......@@ -199,6 +235,23 @@ class DaftarProposalController extends Controller
// Total records
$statementGlobal = " 1=1 ";
if($jenis != "0")
{
$statementGlobal .= " AND JENIS_ID = '".$jenis."'";
}
if($status != "0")
{
// dikurang 1 karena di view mulai dari 0 sedangkan 0 itu menunggu persetujuan
$status = $status - 1;
$statementGlobal .= " AND STATUS = '".$status."'";
}
if($tahun != "0")
{
$statementGlobal .= " AND PERIODE = '".$tahun."'";
}
$totalRecords = DaftarProposalBelmawa::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$statement = " AND (UPPER(JUDUL) LIKE '%".$searchValue."%') ";
......@@ -476,4 +529,24 @@ class DaftarProposalController extends Controller
]);
}
}
public function cetak_daftar_proposal(Request $request)
{
ini_set('max_execution_time', 0);
$jenis = $request->jenis;
$status = $request->status;
$tahun= $request->tahun;
return Excel::download(new DaftarProposalExport($jenis, $status, $tahun), 'seleksi_export.xlsx');
}
public function cetak_daftar_belmawa(Request $request)
{
ini_set('max_execution_time', 0);
$jenis = $request->jenis;
$status = $request->status;
$tahun= $request->tahun;
return Excel::download(new DaftarProposalBelmawaExport($jenis, $status, $tahun), 'seleksi_belmawa_export.xlsx');
}
}
......@@ -9,18 +9,22 @@ use Auth;
use Uuid;
use Alert;
use Crypt;
use GuzzleHttp\Client;
use App\Models\Jenis;
use GuzzleHttp\Client;
use App\Models\Periode;
use App\Models\Reviewer;
use App\Models\JenisMonev;
use Illuminate\Http\Request;
use App\Models\ReviewerMonev;
use App\Models\SeleksiBelmawa;
use Illuminate\Support\Carbon;
use App\Models\ReviewerMonev;
use App\Models\ReviewerMonevDetil;
use App\Models\DaftarProposalMonev;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel;
use App\Models\DaftarProposalBelmawa;
use App\Models\ReviewerMonevDetil;
use App\Exports\DaftarProposalMonevExport;
class MonevProposalController extends Controller
{
......@@ -32,11 +36,17 @@ class MonevProposalController extends Controller
$data = [
'id'=> $id
];
return view('backend.operator.daftar_proposal.monev', compact('data'))->withTitle('Daftar Proposal '.$jenis_monev->nama);
$periode = Periode::query()->get();
$jenis = Jenis::query()->where('status_hapus', '0')->get();
return view('backend.operator.daftar_proposal.monev', compact('data', 'periode', 'jenis'))->withTitle('Daftar Proposal '.$jenis_monev->nama);
}
/* AJAX request */
public function getData(Request $request){
// parameter
$jenis= $request->get('jenis');
$status = $request->get('status');
$tahun= $request->get('tahun');
$jenis_monev_id = Crypt::decrypt($request->get('jenis_monev_id'));
......@@ -57,6 +67,25 @@ class MonevProposalController extends Controller
// Total records
$statementGlobal = " 1=1 ";
if($jenis != "0")
{
$statementGlobal .= " AND JENIS_ID = '".$jenis."'";
}
if($status != "0")
{
if($status == '1')
$statementGlobal .= " AND NILAI_1 != 0 AND NILAI_2 != 0";
else
$statementGlobal .= " AND NILAI_1 = 0 AND NILAI_2 = 0";
}
if($tahun != "0")
{
$statementGlobal .= " AND PERIODE = '".$tahun."'";
}
$totalRecords = DaftarProposalMonev::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$statement = " AND (UPPER(JUDUL) LIKE '%".$searchValue."%') ";
$statement .= " AND JENIS_MONEV_ID = '".$jenis_monev_id."'";
......@@ -378,4 +407,15 @@ class MonevProposalController extends Controller
]);
}
}
public function cetak_daftar_monev_internal(Request $request)
{
ini_set('max_execution_time', 0);
$id = $request->id;
$jenis = $request->jenis;
$status = $request->status;
$tahun= $request->tahun;
return Excel::download(new DaftarProposalMonevExport($jenis, $status, $tahun), 'seleksi_monev_export.xlsx');
}
}
......@@ -11,6 +11,11 @@ class DaftarProposalBelmawa extends Model
public $incrementing = false;
protected $fillable = [
'seleksi_belmawa_id', 'kode_kelompok', 'jenis_pkm', 'judul_proposal', 'nama_dosen', 'upload_dokumen', 'status', 'status_desc', 'periode'
'seleksi_belmawa_id', 'kelompok_id', 'kode_kelompok', 'jenis_pkm', 'judul_proposal', 'nama_dosen', 'identitas_dospem', 'upload_dokumen', 'status', 'status_desc', 'periode', 'status_hapus'
];
public function rKelompokDetil()
{
return $this->hasMany(\App\Models\KelompokDetail::class, 'kelompok_id', 'kelompok_id');
}
}
......@@ -14,8 +14,13 @@ class DaftarProposalMonev extends Model
'monev_internal_id', 'proposal_id', 'jenis_monev_id', 'kode', 'judul',
'jenis_pkm', 'jenis_monev', 'status', 'status_administrasi_1', 'status_administrasi_2',
'nilai_1', 'nilai_2', 'reviewer_komentar_1', 'reviewer_komentar_2', 'reviewer_monev_id_1',
'reviewer_monev_id_2', 'reviewer_id_1', 'reviewer_id_2'
'reviewer_monev_id_2', 'reviewer_id_1', 'reviewer_id_2', 'kelompok_id'
// 'proposal_id', 'reviewer_monev_id', 'jenis_id', 'kode', 'jenis_pkm', 'judul', 'status', 'status_administrasi_1', 'status_administrasi_2', 'nilai_1', 'nilai_2', 'reviewer_monev_id_1', 'reviewer_monev_id_1', 'status_final'
];
public function rKelompokDetil()
{
return $this->hasMany(\App\Models\KelompokDetail::class, 'kelompok_id', 'kelompok_id');
}
}
......@@ -21,6 +21,11 @@
<li class="breadcrumb-item">{!! $title !!}</li>
</ol>
</div>
<div class="col-md-4">
<div class="float-end d-none d-md-block">
<button onclick="cetak()" class="btn btn-primary waves-effect waves-light"> <i class="fas fa-file-excel"></i> Unduh</button>
</div>
</div>
</div>
</div>
<!-- end page title -->
......@@ -31,7 +36,53 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="example" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
{!! csrf_field() !!}
<div class="row">
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Jenis PKM : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqJenisPkm" id="reqJenisPkm">
<option value="0">Semua</option>
@foreach ($jenis as $res)
<option value="{{ $res->jenis_id }}">{{ $res->nama }}</option>
@endforeach
</select>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Status : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqStatus" id="reqStatus">
<option value="0">Semua</option>
<option value="1">Menunggu Persetujuan</option>
<option value="2">Lolos</option>
<option value="3">Tidak Lolos</option>
</select>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Tahun : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqTahun" id="reqTahun">
<option value="0">Semua</option>
@foreach ($periode as $res)
<option value="{{ $res->nama }}">{{ $res->nama }}</option>
@endforeach
</select>
</select>
</div>
</div>
</div>
</div>
<br>
<table id="example" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>id</th>
......@@ -55,13 +106,25 @@
@section('js')
<script>
$("#reqJenisPkm, #reqStatus, #reqTahun").select2({
placeholder: "Semua",
allowClear: true
});
$(document).ready(function(){
// DataTable
var oTable = $('#example').DataTable({
processing: true,
serverSide: true,
ajax: {
"url" : "{{route('operator.getDaftarProposalBelmawa')}}"
"url" : "{{route('operator.getDaftarProposalBelmawa')}}",
"data" : function ( data )
{
data.jenis = $("#reqJenisPkm").val();
data.status = $("#reqStatus").val();
data.tahun = $("#reqTahun").val();
}
},
columns: [
{ data: 'seleksi_belmawa_id' },
......@@ -80,6 +143,10 @@
}
],
});
$('#reqJenisPkm, #reqStatus, #reqTahun').change(function(){
oTable.draw();
});
});
function confirmFinal(reqId, reqStatus)
......@@ -133,6 +200,14 @@
})
}
function cetak() {
var _token = $('input[name="_token"]').val();
var jenis = $("#reqJenisPkm").val();
var status = $("#reqStatus").val();
var tahun = $("#reqTahun").val();
window.open('{{url("/operator/cetak-daftar-belmawa/")}}?jenis='+jenis+'&tahun='+tahun+'&status='+status+'&_token='+_token, '_blank');
};
</script>
@endsection
<table border="1">
<thead>
<tr>
<td style="border: 1px solid #000000;"><strong>No</strong></td>
<td style="border: 1px solid #000000;"><strong>Kode Kelompok</strong></td>
<td style="border: 1px solid #000000;"><strong>Jenis PKM</strong></td>
<td style="border: 1px solid #000000;"><strong>Fak.</strong></td>
<td style="border: 1px solid #000000;"><strong>Nama</strong></td>
<td style="border: 1px solid #000000;"><strong>NIM</strong></td>
<td style="border: 1px solid #000000;"><strong>Ketua/Anggota</strong></td>
<td style="border: 1px solid #000000;"><strong>Judul Proposal</strong></td>
<td style="border: 1px solid #000000;"><strong>Dosen Pembimbing</strong></td>
<td style="border: 1px solid #000000;"><strong>Link Proposal</strong></td>
<td style="border: 1px solid #000000;"><strong>Status {{ $jenis_monev }}</strong></td>
</tr>
</thead>
<tbody>
@php
$no = 1;
$tempKode = '';
@endphp
@foreach ($list_proposal as $proposal)
@if($tempKode != $proposal['kode'])
<tr>
<th rowspan="{{ $proposal['rowspan'] }}" style="vertical-align: top; border: 1px solid #000000;">{{ $no++ }}</th>
<th rowspan="{{ $proposal['rowspan'] }}" style="vertical-align: top; border: 1px solid #000000;">{{ $proposal['kode'] }}</th>
<th rowspan="{{ $proposal['rowspan'] }}" style="vertical-align: top; border: 1px solid #000000;">{{ $proposal['jenis'] }}</th>
<th style="border: 1px solid #000000;">{{ $proposal['fak'] }}</th>
<th style="border: 1px solid #000000;">{{ $proposal['nama'] }}</th>
<th style="border: 1px solid #000000;">{{ $proposal['nim'] }}</th>
<th style="border: 1px solid #000000;">{{ $proposal['keanggotaan'] }}</th>
<th rowspan="{{ $proposal['rowspan'] }}" style="vertical-align: top; border: 1px solid #000000;">{{ $proposal['judul'] }}</th>
<th rowspan="{{ $proposal['rowspan'] }}" style="vertical-align: top; border: 1px solid #000000;">{{ $proposal['dospem'] }}</th>
<th rowspan="{{ $proposal['rowspan'] }}" style="vertical-align: top; border: 1px solid #000000;"><a href="{{ $proposal['link'] }}" target="_blank">Link</a></th>
<th rowspan="{{ $proposal['rowspan'] }}" style="vertical-align: top; border: 1px solid #000000;">{{ $proposal['status'] }}</th>
</tr>
@else
<tr valign="top">
<th style="border: 1px solid #000000;">{{ $proposal['fak'] }}</th>
<th style="border: 1px solid #000000;">{{ $proposal['nama'] }}</th>
<th style="border: 1px solid #000000;">{{ $proposal['nim'] }}</th>
<th style="border: 1px solid #000000;">{{ $proposal['keanggotaan'] }}</th>
</tr>
@endif
@php
$tempKode = $proposal['kode'];
@endphp
@endforeach
</tbody>
</table>
......@@ -21,6 +21,11 @@
<li class="breadcrumb-item">{!! $title !!}</li>
</ol>
</div>
<div class="col-md-4">
<div class="float-end d-none d-md-block">
<button onclick="cetak()" class="btn btn-primary waves-effect waves-light"> <i class="fas fa-file-excel"></i> Unduh</button>
</div>
</div>
</div>
</div>
<!-- end page title -->
......@@ -31,7 +36,53 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="example" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
{!! csrf_field() !!}
<div class="row">
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Jenis PKM : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqJenisPkm" id="reqJenisPkm">
<option value="0">Semua</option>
@foreach ($jenis as $res)
<option value="{{ $res->jenis_id }}">{{ $res->nama }}</option>
@endforeach
</select>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Status : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqStatus" id="reqStatus">
<option value="0">Semua</option>
<option value="1">Menunggu Persetujuan</option>
<option value="2">Lolos</option>
<option value="3">Tidak Lolos</option>
</select>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Tahun : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqTahun" id="reqTahun">
<option value="0">Semua</option>
@foreach ($periode as $res)
<option value="{{ $res->nama }}">{{ $res->nama }}</option>
@endforeach
</select>
</select>
</div>
</div>
</div>
</div>
<br>
<table id="example" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th rowspan="2">id</th>
......@@ -61,13 +112,25 @@
@section('js')
<script>
$("#reqJenisPkm, #reqStatus, #reqTahun").select2({
placeholder: "Semua",
allowClear: true
});
$(document).ready(function(){
// DataTable
var oTable = $('#example').DataTable({
processing: true,
serverSide: true,
ajax: {
"url" : "{{route('operator.getDaftarProposal')}}"
"url" : "{{route('operator.getDaftarProposal')}}",
"data" : function ( data )
{
data.jenis = $("#reqJenisPkm").val();
data.status = $("#reqStatus").val();
data.tahun = $("#reqTahun").val();
}
},
columns: [
{ data: 'proposal_id' },
......@@ -92,6 +155,10 @@
$('.select2').select2();
}
});
$('#reqJenisPkm, #reqStatus, #reqTahun').change(function(){
oTable.draw();
});
});
$('#example tbody').on('change', '.reviewer', function () {
......@@ -216,6 +283,14 @@
})
}
function cetak() {
var _token = $('input[name="_token"]').val();
var jenis = $("#reqJenisPkm").val();
var status = $("#reqStatus").val();
var tahun = $("#reqTahun").val();
window.open('{{url("/operator/cetak-daftar-proposal/")}}?jenis='+jenis+'&tahun='+tahun+'&status='+status+'&_token='+_token, '_blank');
};
</script>
@endsection
......@@ -25,6 +25,11 @@
<li class="breadcrumb-item">{!! $title !!}</li>
</ol>
</div>
<div class="col-md-4">
<div class="float-end d-none d-md-block">
<button onclick="cetak()" class="btn btn-primary waves-effect waves-light"> <i class="fas fa-file-excel"></i> Unduh</button>
</div>
</div>
</div>
</div>
<!-- end page title -->
......@@ -35,7 +40,52 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="example" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
{!! csrf_field() !!}
<div class="row">
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Jenis PKM : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqJenisPkm" id="reqJenisPkm">
<option value="0">Semua</option>
@foreach ($jenis as $res)
<option value="{{ $res->jenis_id }}">{{ $res->nama }}</option>
@endforeach
</select>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Status : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqStatus" id="reqStatus">
<option value="0">Semua</option>
<option value="1">Sudah dinilai</option>
<option value="2">Belum dinilai</option>
</select>
</select>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<label class="col-sm-3 col-form-label">Tahun : </label>
<div class="col-sm-6">
<select class="form-select select2" name="reqTahun" id="reqTahun">
<option value="0">Semua</option>
@foreach ($periode as $res)
<option value="{{ $res->nama }}">{{ $res->nama }}</option>
@endforeach
</select>
</select>
</div>
</div>
</div>
</div>
<br>
<table id="example" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th rowspan="2">id</th>
......@@ -65,6 +115,12 @@
@section('js')
<script>
$("#reqJenisPkm, #reqStatus, #reqTahun").select2({
placeholder: "Semua",
allowClear: true
});
$(document).ready(function(){
// DataTable
var oTable = $('#example').DataTable({
......@@ -75,6 +131,9 @@
"data" : function ( data )
{
data.jenis_monev_id = '{{ $reqId }}';
data.jenis = $("#reqJenisPkm").val();
data.status = $("#reqStatus").val();
data.tahun = $("#reqTahun").val();
}
},
columns: [
......@@ -100,6 +159,10 @@
$('.select2').select2();
}
});
$('#reqJenisPkm, #reqStatus, #reqTahun').change(function(){
oTable.draw();
});
});
$('#example tbody').on('change', '.reviewer', function () {
......@@ -226,5 +289,15 @@
}
function cetak() {
var _token = $('input[name="_token"]').val();
var id = '{{ $reqId }}';
var jenis = $("#reqJenisPkm").val();
var status = $("#reqStatus").val();
var tahun = $("#reqTahun").val();
window.open('{{url("/operator/cetak-daftar-monev-internal/")}}?id='+id+'&jenis='+jenis+'&tahun='+tahun+'&status='+status+'&_token='+_token, '_blank');
};
</script>
@endsection
......@@ -36,7 +36,7 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="example" class="table table-bordered dt-responsive nowrap" 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>
<tr>
......
......@@ -31,7 +31,7 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="example" class="table table-bordered dt-responsive nowrap" 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>
<tr>
......
......@@ -62,7 +62,7 @@
</div>
<br>
{!! csrf_field() !!}
<table id="example" class="table table-bordered dt-responsive nowrap" 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>
<tr>
......
......@@ -81,7 +81,7 @@
</div>
</div>
<br>
<table id="example" class="table table-bordered dt-responsive nowrap" 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>
<tr>
......
......@@ -81,7 +81,7 @@
</select>
</div>
</div><br>
<table id="example1" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<table id="example1" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>Nama Reviewer</th>
......
......@@ -75,7 +75,7 @@
aria-label="Close"></button>
</div>
<div class="modal-body" style="min-height: 500px !important">
<table id="example1" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<table id="example1" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>Nama Reviewer</th>
......
......@@ -35,7 +35,7 @@
<div class="card">
<div class="card-body">
<table id="datatable" class="table table-bordered dt-responsive" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<table id="datatable" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>No.</th>
......
......@@ -35,7 +35,7 @@
<div class="card">
<div class="card-body">
<table id="datatable" class="table table-bordered dt-responsive" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<table id="datatable" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>No.</th>
......
......@@ -162,15 +162,18 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::get('getReviewer', [ReviewerController::class, 'getData'])->name('getReviewer');
Route::get('getDosen', [ReviewerController::class, 'getDosen'])->name('getDosen');
// SELEKSI INTERNAL
Route::resource('seleksi_internal_reviewer', ReviewerController::class);
Route::resource('seleksi-internal-proposal', DaftarProposalController::class);
Route::get('/seleksi-internal-reviewer-approval/{id}/{status}', [DaftarProposalController::class, 'approval'])->name('seleksi-internal.approval');
Route::get('getDaftarProposal', [DaftarProposalController::class, 'getData'])->name('getDaftarProposal');
Route::get('cetak-daftar-proposal', [DaftarProposalController::class, 'cetak_daftar_proposal'])->name('cetak-daftar-proposal');
// SELEKSI BELMAWA
Route::get('seleksi-belmawa', [DaftarProposalController::class, 'index_belmawa'])->name('seleksi-belmawa');
Route::get('/seleksi-belmawa-approval/{id}/{status}', [DaftarProposalController::class, 'approval_belmawa'])->name('seleksi-belmawa.approval_belmawa');
Route::get('getDaftarProposalBelmawa', [DaftarProposalController::class, 'getDataBelmawa'])->name('getDaftarProposalBelmawa');
Route::get('cetak-daftar-belmawa', [DaftarProposalController::class, 'cetak_daftar_belmawa'])->name('cetak-daftar-belmawa');
// Route::resource('monev-internal-reviewer', ReviewerMonevController::class);
Route::get('getReviewerMonev', [ReviewerMonevController::class, 'getDataMonev'])->name('getReviewerMonev');
......@@ -178,11 +181,12 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::get('monev-internal-reviewer/{id}', [ReviewerMonevController::class, 'index'])->name('monev-internal-reviewer');
Route::resource('monev-internal-reviewer', ReviewerMonevController::class)->except(['index']);
// MONEV INTERNAL
Route::get('monev-internal-proposal/{id}', [MonevProposalController::class, 'index'])->name('monev-internal-proposal');
Route::resource('monev-internal-proposal', MonevProposalController::class)->except(['index']);
Route::get('/monev-internal-reviewer-approval/{id}/{status}', [MonevProposalController::class, 'approval'])->name('monev-internal.approval');
Route::get('getMonevProposal', [MonevProposalController::class, 'getData'])->name('getMonevProposal');
Route::get('cetak-daftar-monev-internal', [MonevProposalController::class, 'cetak_daftar_monev_internal'])->name('cetak-daftar-monev-internal');
Route::resource('user', UserController::class);
Route::post('/user/remove-role', [UserController::class, 'removeRole'])->name('remove-role');
......
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