Commit 437f8dde by novanbagus

update 07-11-2022

parent 3784e949
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Operator;
use DB; use DB;
use URL; use URL;
use Auth; use Auth;
use Uuid; use Uuid;
use Alert; use Alert;
use Crypt; use Crypt;
use GuzzleHttp\Client; use GuzzleHttp\Client;
use App\Models\Reviewer; use App\Models\Reviewer;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\DaftarProposal; use App\Models\DaftarProposal;
use App\Models\SeleksiBelmawa;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use App\Models\ReviewerProposal; use App\Models\ReviewerProposal;
use App\Http\Controllers\Controller;
use App\Models\DaftarProposalBelmawa;
use App\Models\ReviewerProposalDetil; use App\Models\ReviewerProposalDetil;
class DaftarProposalController extends Controller class DaftarProposalController extends Controller
...@@ -24,7 +27,7 @@ class DaftarProposalController extends Controller ...@@ -24,7 +27,7 @@ class DaftarProposalController extends Controller
public function index() public function index()
{ {
return view('backend.daftar_proposal.index')->withTitle('Daftar Proposal Seleksi Internal'); return view('backend.operator.daftar_proposal.index')->withTitle('Daftar Proposal Seleksi Internal');
} }
/* AJAX request */ /* AJAX request */
...@@ -75,6 +78,7 @@ class DaftarProposalController extends Controller ...@@ -75,6 +78,7 @@ class DaftarProposalController extends Controller
$nilai_2 = $record->nilai_2; $nilai_2 = $record->nilai_2;
$reviewer_id_1 = $record->reviewer_id_1; $reviewer_id_1 = $record->reviewer_id_1;
$reviewer_id_2 = $record->reviewer_id_2; $reviewer_id_2 = $record->reviewer_id_2;
$status_final = $record->status_final;
$rata = ($nilai_1 + $nilai_2) / 2; $rata = ($nilai_1 + $nilai_2) / 2;
...@@ -101,18 +105,49 @@ class DaftarProposalController extends Controller ...@@ -101,18 +105,49 @@ class DaftarProposalController extends Controller
$opt2 .= '<option value="'.Crypt::encrypt($proposal_id.'###'.$value->reviewer_id).'" '.$selected2.'>'.$value->nama.'</option>'; $opt2 .= '<option value="'.Crypt::encrypt($proposal_id.'###'.$value->reviewer_id).'" '.$selected2.'>'.$value->nama.'</option>';
} }
$lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '1')";
$tidak_lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '2')";
$disable_1 = $disable_2 = '';
if($nilai_1 > '0')
{
$disable_1 = "disabled='true'";
}
if($nilai_2 > '0')
{
$disable_2 = "disabled='true'";
}
$pilihan_1 = '<td class="table-action"> $pilihan_1 = '<td class="table-action">
<select class="form-control select2 reviewer" data-urut="1"> <select class="form-control select2 reviewer" data-urut="1" '.$disable_1.'>
'.$opt1.' '.$opt1.'
</select> </select>
</td>'; </td>';
$pilihan_2 = '<td class="table-action"> $pilihan_2 = '<td class="table-action">
<select class="form-control select2 reviewer" data-urut="2"> <select class="form-control select2 reviewer" data-urut="2" '.$disable_2.'>
'.$opt2.' '.$opt2.'
</select> </select>
</td>'; </td>';
if($status_final == '1')
{
$aksi = '<span class="badge bg-success">Lolos</span>';
}
elseif($status_final == '2')
{
$aksi = '<span class="badge bg-danger">Tidak Lolos</span>';
}
else
{
$aksi = '<td class="table-action">
<a href="#!" class="btn btn-icon-sm btn-success" onclick="'.$lolos.'"><i class="fas fa-check"></i></a>
<a href="#!" class="btn btn-icon-sm btn-danger" onclick="'.$tidak_lolos.'"><i class="fas fa-ban"></i></a>
</td>';
}
$data_arr[] = array( $data_arr[] = array(
"reviewer_proposal_id" => $reviewer_proposal_id, "reviewer_proposal_id" => $reviewer_proposal_id,
"kode" => $kode, "kode" => $kode,
...@@ -123,10 +158,98 @@ class DaftarProposalController extends Controller ...@@ -123,10 +158,98 @@ class DaftarProposalController extends Controller
"nilai_1" => $nilai_1, "nilai_1" => $nilai_1,
"nilai_2" => $nilai_2, "nilai_2" => $nilai_2,
"rata" => $rata, "rata" => $rata,
"aksi"=> '' "aksi" => $aksi
// "aksi" => '<td class="table-action"> );
// <a href="#!" class="btn btn-icon-sm btn-danger" onclick="'.$delete.'"><i class="fas fa-trash"></i></a> }
// </td>'
$response = array(
"draw" => intval($draw),
"iTotalRecords" => $totalRecords,
"iTotalDisplayRecords" => $totalRecordswithFilter,
"aaData" => $data_arr
);
echo json_encode($response);
exit;
}
public function index_belmawa()
{
return view('backend.operator.daftar_proposal.belmawa')->withTitle('Daftar Proposal Seleksi Belmawa');
}
/* AJAX request */
public function getDataBelmawa(Request $request){
## Read value
$draw = $request->get('draw');
$start = $request->get("start");
$rowperpage = $request->get("length"); // Rows display per page
$columnIndex_arr = $request->get('order');
$columnName_arr = $request->get('columns');
$order_arr = $request->get('order');
$search_arr = $request->get('search');
$columnIndex = $columnIndex_arr[0]['column']; // Column index
$columnName = $columnName_arr[$columnIndex]['data']; // Column name
$columnSortOrder = $order_arr[0]['dir']; // asc or desc
$searchValue = strtoupper($search_arr['value']); // Search value
// Total records
$statementGlobal = " 1=1 ";
$totalRecords = DaftarProposalBelmawa::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$statement = " AND (UPPER(JUDUL) LIKE '%".$searchValue."%') ";
$totalRecordswithFilter = DaftarProposalBelmawa::select('count(1) as allcount')
->whereRaw($statementGlobal.$statement)->count();
// Fetch records
$records = DaftarProposalBelmawa::orderBy($columnName,$columnSortOrder)
->whereRaw($statementGlobal.$statement)
->select('daftar_proposal_belmawa.*')
->skip($start)
->take($rowperpage)
->get();
$data_arr = array();
foreach($records as $record){
$seleksi_belmawa_id = $record->seleksi_belmawa_id;
$kode_kelompok = $record->kode_kelompok;
$jenis_pkm = $record->jenis_pkm;
$judul = $record->judul;
$nama_dosen = $record->nama_dosen;
$upload_dokumen = $record->upload_dokumen;
$status = $record->status;
$status_desc = $record->status_desc;
$lolos = "confirmFinal('".Crypt::encrypt($seleksi_belmawa_id)."', '1')";
$tidak_lolos = "confirmFinal('".Crypt::encrypt($seleksi_belmawa_id)."', '2')";
if($status == '1')
{
$aksi = '<span class="badge bg-success">Lolos</span>';
}
elseif($status == '2')
{
$aksi = '<span class="badge bg-danger">Tidak Lolos</span>';
}
else
{
$aksi = '<td class="table-action">
<a href="#!" class="btn btn-icon-sm btn-success" onclick="'.$lolos.'"><i class="fas fa-check"></i></a>
<a href="#!" class="btn btn-icon-sm btn-danger" onclick="'.$tidak_lolos.'"><i class="fas fa-ban"></i></a>
</td>';
}
$data_arr[] = array(
"seleksi_belmawa_id" => $seleksi_belmawa_id,
"kode_kelompok" => $kode_kelompok,
"jenis_pkm" => $jenis_pkm,
"judul" => $judul,
"nama_dosen" => $nama_dosen,
"upload_dokumen" => $upload_dokumen,
"aksi" => $aksi
); );
} }
...@@ -279,4 +402,74 @@ class DaftarProposalController extends Controller ...@@ -279,4 +402,74 @@ class DaftarProposalController extends Controller
return json_decode($response->getBody(), true); return json_decode($response->getBody(), true);
} }
public function approval($id, $status)
{
try {
$delete = ReviewerProposal::where('proposal_id', Crypt::decrypt($id))->update(['status_final'=>$status]);
if ($delete) {
if($status == '1')
{
$status = 'success';
$message = "Proposal Seleksi Internal Lolos.";
}
elseif($status == '2')
{
$status = 'success';
$message = "Proposal Seleksi Internal Tidak Lolos.";
}
}
else{
$status = 'error';
$message = "Proposal Seleksi Internal tidak ada.";
}
return response()->json([
'status' => $status,
'message' => $message,
]);
} catch (\Exception $id) {
return response()->json([
'status' => 'error',
'message' => "Data gagal diproses.",
]);
}
}
public function approval_belmawa($id, $status)
{
try {
$delete = SeleksiBelmawa::where('seleksi_belmawa_id', Crypt::decrypt($id))->update(['status'=>$status]);
if ($delete) {
if($status == '1')
{
$status = 'success';
$message = "Proposal Seleksi Belmawa Lolos.";
}
elseif($status == '2')
{
$status = 'success';
$message = "Proposal Seleksi Belmawa Tidak Lolos.";
}
}
else{
$status = 'error';
$message = "Proposal Seleksi Belmawa tidak ada.";
}
return response()->json([
'status' => $status,
'message' => $message,
]);
} catch (\Exception $id) {
return response()->json([
'status' => 'error',
'message' => "Data gagal diproses.",
]);
}
}
} }
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Operator;
use App\Http\Controllers\Controller;
use DB; use DB;
use URL; use URL;
...@@ -25,7 +26,7 @@ class JadwalKegiatanController extends Controller ...@@ -25,7 +26,7 @@ class JadwalKegiatanController extends Controller
$data['jadwal_kegiatan'] = JadwalKegiatan::where('status_hapus', '0')->where('periode_id', $periode_id)->orderBy('urut')->get(); $data['jadwal_kegiatan'] = JadwalKegiatan::where('status_hapus', '0')->where('periode_id', $periode_id)->orderBy('urut')->get();
return view('backend.jadwal_kegiatan.index', compact('data'))->withTitle('Jadwal Kegiatan'); return view('backend.operator.jadwal_kegiatan.index', compact('data'))->withTitle('Jadwal Kegiatan');
} }
/* AJAX request */ /* AJAX request */
...@@ -54,7 +55,7 @@ class JadwalKegiatanController extends Controller ...@@ -54,7 +55,7 @@ class JadwalKegiatanController extends Controller
Alert::success('Data berhasil disimpan')->persistent('Ok'); Alert::success('Data berhasil disimpan')->persistent('Ok');
$successmessage = "Proses Setting Jadwal Berhasil."; $successmessage = "Proses Setting Jadwal Berhasil.";
return redirect()->route('jadwal_kegiatan.index')->with('successMessage', $successmessage); return redirect()->route('operator.jadwal-kegiatan.index')->with('successMessage', $successmessage);
} }
public function edit($id) public function edit($id)
......
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Operator;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use DB; use DB;
...@@ -17,7 +18,7 @@ class JenisController extends Controller ...@@ -17,7 +18,7 @@ class JenisController extends Controller
{ {
public function index() public function index()
{ {
return view('backend.jenis.index')->withTitle('Jenis PKM'); return view('backend.operator.jenis.index')->withTitle('Jenis PKM');
} }
/* AJAX request */ /* AJAX request */
...@@ -61,7 +62,7 @@ class JenisController extends Controller ...@@ -61,7 +62,7 @@ class JenisController extends Controller
$keterangan = $record->keterangan; $keterangan = $record->keterangan;
// $edit = route('admin/users/create',$id); // $edit = route('admin/users/create',$id);
$edit = URL::to('jenis/'.Crypt::encrypt($jenis_id).'/edit'); $edit = URL::to('operator/jenis/'.Crypt::encrypt($jenis_id).'/edit');
$delete = "confirmDelete('".Crypt::encrypt($jenis_id)."')"; $delete = "confirmDelete('".Crypt::encrypt($jenis_id)."')";
$data_arr[] = array( $data_arr[] = array(
...@@ -88,7 +89,7 @@ class JenisController extends Controller ...@@ -88,7 +89,7 @@ class JenisController extends Controller
public function create() public function create()
{ {
return view('backend.jenis.create')->withTitle('Tambah Jenis PKM'); return view('backend.operator.jenis.create')->withTitle('Tambah Jenis PKM');
} }
public function store(Request $request) public function store(Request $request)
...@@ -111,7 +112,7 @@ class JenisController extends Controller ...@@ -111,7 +112,7 @@ class JenisController extends Controller
$successmessage = "Proses Tambah Kuesioner Gagal."; $successmessage = "Proses Tambah Kuesioner Gagal.";
} }
return redirect()->route('jenis.index')->with('successMessage', $successmessage); return redirect()->route('operator.jenis.index')->with('successMessage', $successmessage);
} }
public function edit($id) public function edit($id)
...@@ -122,7 +123,7 @@ class JenisController extends Controller ...@@ -122,7 +123,7 @@ class JenisController extends Controller
'jenis' => $jenis 'jenis' => $jenis
]; ];
return view('backend.jenis.edit', compact('data'))->withTitle('Ubah Jenis PKM'); return view('backend.operator.jenis.edit', compact('data'))->withTitle('Ubah Jenis PKM');
} }
public function update(Request $request, $id) public function update(Request $request, $id)
...@@ -135,7 +136,7 @@ class JenisController extends Controller ...@@ -135,7 +136,7 @@ class JenisController extends Controller
Alert::success('Data berhasil disimpan.')->persistent('Ok'); Alert::success('Data berhasil disimpan.')->persistent('Ok');
return redirect()->route('jenis.index'); return redirect()->route('operator.jenis.index');
} }
......
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Operator;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use DB; use DB;
...@@ -18,7 +19,7 @@ class JenisPenilaianMonevController extends Controller ...@@ -18,7 +19,7 @@ class JenisPenilaianMonevController extends Controller
{ {
public function index() public function index()
{ {
return view('backend.jenis_penilaian_monev.index')->withTitle('Jenis PKM'); return view('backend.operator.jenis_penilaian_monev.index')->withTitle('Jenis PKM');
} }
/* AJAX request */ /* AJAX request */
...@@ -51,7 +52,7 @@ class JenisPenilaianMonevController extends Controller ...@@ -51,7 +52,7 @@ class JenisPenilaianMonevController extends Controller
$records = Jenis::orderBy($columnName,$columnSortOrder) $records = Jenis::orderBy($columnName,$columnSortOrder)
->whereRaw($statementGlobal.$statement) ->whereRaw($statementGlobal.$statement)
->select('jenis.*') ->select('jenis.*')
->selectRaw('ambil_jumlah_penilaian_monev(jenis.jenis_id) jumlah_komponen') ->selectRaw('ambil_jumlah_jenis_penilaian(jenis.jenis_id) jumlah_komponen')
->skip($start) ->skip($start)
->take($rowperpage) ->take($rowperpage)
->get(); ->get();
...@@ -63,7 +64,7 @@ class JenisPenilaianMonevController extends Controller ...@@ -63,7 +64,7 @@ class JenisPenilaianMonevController extends Controller
$keterangan = $record->keterangan; $keterangan = $record->keterangan;
$jumlah_komponen = $record->jumlah_komponen; $jumlah_komponen = $record->jumlah_komponen;
$edit = URL::to('jenis_penilaian_monev/'.Crypt::encrypt($jenis_id).'/edit'); $edit = URL::to('operator/jenis-penilaian-monev/'.Crypt::encrypt($jenis_id).'/edit');
$data_arr[] = array( $data_arr[] = array(
"jenis_id" => $jenis_id, "jenis_id" => $jenis_id,
...@@ -107,7 +108,7 @@ class JenisPenilaianMonevController extends Controller ...@@ -107,7 +108,7 @@ class JenisPenilaianMonevController extends Controller
'jenis_penilaian_monev' => $jenis_penilaian_monev 'jenis_penilaian_monev' => $jenis_penilaian_monev
]; ];
return view('backend.jenis_penilaian_monev.edit', compact('data'))->withTitle('Ubah Jenis PKM'); return view('backend.operator.jenis_penilaian_monev.edit', compact('data'))->withTitle('Ubah Jenis PKM');
} }
public function update(Request $request, $id) public function update(Request $request, $id)
...@@ -127,7 +128,7 @@ class JenisPenilaianMonevController extends Controller ...@@ -127,7 +128,7 @@ class JenisPenilaianMonevController extends Controller
Alert::success('Data berhasil disimpan.')->persistent('Ok'); Alert::success('Data berhasil disimpan.')->persistent('Ok');
return redirect()->route('jenis_penilaian_monev.index'); return redirect()->route('operator.jenis-penilaian-monev.index');
} }
......
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Operator;
use App\Http\Controllers\Controller;
use DB; use DB;
use URL; use URL;
...@@ -18,12 +19,14 @@ class ReviewerController extends Controller ...@@ -18,12 +19,14 @@ class ReviewerController extends Controller
{ {
public function index() public function index()
{ {
return view('backend.reviewer.index')->withTitle('Reviewer Seleksi Internal'); return view('backend.operator.reviewer.index')->withTitle('Reviewer Seleksi Internal');
} }
/* AJAX request */ /* AJAX request */
public function getData(Request $request){ public function getData(Request $request){
$jenis_monev_id = 'ba11c2b5-d65d-4360-9717-98e4fa9b9188';
## Read value ## Read value
$draw = $request->get('draw'); $draw = $request->get('draw');
$start = $request->get("start"); $start = $request->get("start");
...@@ -44,6 +47,8 @@ class ReviewerController extends Controller ...@@ -44,6 +47,8 @@ class ReviewerController extends Controller
$totalRecords = Reviewer::select('count(1) as allcount')->whereRaw($statementGlobal)->count(); $totalRecords = Reviewer::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$statement = " AND (UPPER(NAMA) LIKE '%".$searchValue."%') "; $statement = " AND (UPPER(NAMA) LIKE '%".$searchValue."%') ";
$statement .= " AND JENIS_MONEV_ID = '".$jenis_monev_id."'";
$totalRecordswithFilter = Reviewer::select('count(1) as allcount') $totalRecordswithFilter = Reviewer::select('count(1) as allcount')
->whereRaw($statementGlobal.$statement)->count(); ->whereRaw($statementGlobal.$statement)->count();
...@@ -93,7 +98,7 @@ class ReviewerController extends Controller ...@@ -93,7 +98,7 @@ class ReviewerController extends Controller
public function create() public function create()
{ {
return view('backend.reviewer.create')->withTitle('Tambah Reviewer'); return view('backend.operator.reviewer.create')->withTitle('Tambah Reviewer');
} }
public function store(Request $request) public function store(Request $request)
......
<?php
namespace App\Http\Controllers\Operator;
use DB;
use URL;
use Auth;
use Uuid;
use Alert;
use Crypt;
use GuzzleHttp\Client;
use App\Models\Reviewer;
use App\Models\JenisMonev;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class ReviewerMonevController extends Controller
{
public function index($id)
{
$jenis_monev = JenisMonev::select('nama')->where('jenis_monev_id', Crypt::decrypt($id))->first();
$data = [
'id'=> $id
];
return view('backend.operator.reviewer.monev', compact('data'))->withTitle('Reviewer '.$jenis_monev->nama);
}
/* AJAX request */
public function getDataMonev(Request $request){
$jenis_monev_id = Crypt::decrypt($request->get('jenis_monev_id'));
## Read value
$draw = $request->get('draw');
$start = $request->get("start");
$rowperpage = $request->get("length"); // Rows display per page
$columnIndex_arr = $request->get('order');
$columnName_arr = $request->get('columns');
$order_arr = $request->get('order');
$search_arr = $request->get('search');
$columnIndex = $columnIndex_arr[0]['column']; // Column index
$columnName = $columnName_arr[$columnIndex]['data']; // Column name
$columnSortOrder = $order_arr[0]['dir']; // asc or desc
$searchValue = strtoupper($search_arr['value']); // Search value
$statement = " AND (UPPER(NAMA) LIKE '%".$searchValue."%' OR NIDN LIKE '%".$searchValue."%') ";
if($jenis_monev_id != "0")
{
$statement .= " AND JENIS_MONEV_ID = '".$jenis_monev_id."'";
}
// Total records
$statementGlobal = " STATUS_HAPUS = '0' ";
$totalRecords = Reviewer::select('count(1) as allcount')->whereRaw($statementGlobal.$statement)->count();
$totalRecordswithFilter = Reviewer::select('count(1) as allcount')
->whereRaw($statementGlobal.$statement)->count();
// Fetch records
$records = Reviewer::orderBy($columnName,$columnSortOrder)
->whereRaw($statementGlobal.$statement)
->select('reviewer.*')
->selectRaw("ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '0') jumlah_harus_review, ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '1') jumlah_sudah_review")
->skip($start)
->take($rowperpage)
->get();
$data_arr = array();
foreach($records as $record){
$reviewer_id = $record->reviewer_id;
$nama = $record->nama;
$nidn = $record->nidn;
$fakultas = $record->fakultas;
$jumlah_harus_review = $record->jumlah_harus_review;
$jumlah_sudah_review = $record->jumlah_sudah_review;
$delete = "confirmDelete('".Crypt::encrypt($reviewer_id)."')";
$data_arr[] = array(
"reviewer_id" => $reviewer_id,
"nama" => $nama,
"nidn" => $nidn,
"fakultas" => $fakultas,
"jumlah_harus_review" => $jumlah_harus_review,
"jumlah_sudah_review" => $jumlah_sudah_review,
"aksi" => '<td class="table-action">
<a href="#!" class="btn btn-icon-sm btn-danger" onclick="'.$delete.'"><i class="fas fa-trash"></i></a>
</td>'
);
}
$response = array(
"draw" => intval($draw),
"iTotalRecords" => $totalRecords,
"iTotalDisplayRecords" => $totalRecordswithFilter,
"aaData" => $data_arr
);
echo json_encode($response);
exit;
}
public function create()
{
return view('backend.operator.reviewer.create')->withTitle('Tambah Reviewer');
}
public function store(Request $request)
{
$reqPeriodeId = '9857a29d-521f-413a-b811-94cda7b45897';
$reqJenisMonevId = Crypt::decrypt($request->input('jenis_monev_id'));
$ada_data = Reviewer::where([
['id_sdm', '=', $request->input('id_sdm')],
['periode_id', '=', $reqPeriodeId],
['jenis_monev_id', '=', $reqJenisMonevId],
['status_hapus', '=', '0'],
])->count();
if($ada_data > 0)
{
return response()->json([
'status' => 'error',
'message' => 'Data reviewer sudah ada.',
]);
}
$uuid = Uuid::generate();
$data['reviewer_id'] = $uuid;
$data['periode_id'] = $reqPeriodeId;
$data['jenis_monev_id'] = $reqJenisMonevId;
$data['id_sdm'] = $request->input('id_sdm');
$data['nama'] = $request->input('nama');
$data['nidn'] = $request->input('nidn');
$data['fakultas'] = $request->input('fakultas');
$data['prodi'] = $request->input('prodi');
// BACKUP NVN
// $data['created_user'] = Auth::user()->name;
if(Reviewer::create($data))
{
return response()->json([
'status' => 'success',
'message' => 'Data berhasil ditambahkan.',
]);
}
else
{
return response()->json([
'status' => 'error',
'message' => 'Data gagal ditambahkan.',
]);
}
}
public function edit($id)
{
}
public function update(Request $request, $id)
{
}
public function destroy($id)
{
try {
$delete = Reviewer::where('reviewer_id', Crypt::decrypt($id))->update(['status_hapus'=>'1']);
if ($delete == 1) {
$info = 'Deleted!';
$status = 'success';
$message = "Reviewer berhasil dihapus.";
}
else{
$info = 'Error!';
$status = 'error';
$message = "Reviewer tidak ada.";
}
return response()->json([
'info' => $info,
'status' => $status,
'message' => $message,
]);
} catch (\Exception $id) {
return response()->json([
'status' => 'error',
'message' => "Data gagal dihapus.",
]);
}
}
public function getDosen(Request $request)
{
$client = new Client(['base_uri' => 'https://siakadu.unesa.ac.id/']);
$response = $client->request('POST', '/api/dashboard',
['form_params' => [
'kondisi' => 'dosen_aktif'
],
'http_errors' => false]);
return json_decode($response->getBody(), true);
}
}
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Operator;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\Kelompok; use App\Models\Kelompok;
......
...@@ -11,6 +11,6 @@ class DaftarProposal extends Model ...@@ -11,6 +11,6 @@ class DaftarProposal extends Model
public $incrementing = false; public $incrementing = false;
protected $fillable = [ protected $fillable = [
'proposal_id', 'reviewer_proposal_id', 'jenis_id', 'kode', 'jenis_pkm', 'judul', 'status', 'status_administrasi_1', 'status_administrasi_2', 'nilai_1', 'nilai_2', 'reviewer_id_1', 'reviewer_id_2' 'proposal_id', 'reviewer_proposal_id', 'jenis_id', 'kode', 'jenis_pkm', 'judul', 'status', 'status_administrasi_1', 'status_administrasi_2', 'nilai_1', 'nilai_2', 'reviewer_id_1', 'reviewer_id_2', 'status_final'
]; ];
} }
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class DaftarProposalBelmawa extends Model
{
protected $table = 'daftar_proposal_belmawa';
protected $primaryKey = 'seleksi_belmawa_id';
public $incrementing = false;
protected $fillable = [
'seleksi_belmawa_id', 'kode_kelompok', 'jenis_pkm', 'judul_proposal', 'nama_dosen', 'upload_dokumen', 'status', 'status_desc'
];
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class DaftarProposalMonev extends Model
{
protected $table = 'daftar_proposal_monev';
protected $primaryKey = 'reviewer_monev_id';
public $incrementing = false;
protected $fillable = [
'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'
// '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'
];
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ReviewerMonev extends Model
{
protected $table = 'reviewer_monev';
protected $primaryKey = 'reviewer_monev_id';
public $incrementing = false;
protected $keyType = 'string';
protected $fillable = [
'reviewer_monev_id', 'jenis_monev_id', 'proposal_id', 'reviewer_id', 'status_administrasi', 'komentar', 'urut', 'created_user', 'updated_user'
];
public function rReviewerProposalDetil()
{
return $this->hasMany(\App\Models\ReviewerProposalDetil::class, 'reviewer_monev_id', 'reviewer_monev_id');
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ReviewerMonevDetil extends Model
{
protected $table = 'reviewer_monev_detil';
protected $primaryKey = 'reviewer_monev_detil_id';
public $incrementing = false;
protected $fillable = [
'reviewer_monev_detil_id', 'reviewer_monev_id', 'jenis_penilaian_monev_id', 'skor', 'created_user', 'updated_user'
];
}
<?php
namespace App\Models;
use App\Models\Proposal;
use Illuminate\Database\Eloquent\Model;
class SeleksiBelmawa extends Model
{
protected $table = 'seleksi_belmawa';
protected $primaryKey = 'seleksi_belmawa_id';
public $incrementing = false;
protected $keyType = 'string';
protected $fillable = [
'seleksi_belmawa_id', 'proposal_id', 'upload_dokumen', 'date_upload', 'status', 'komentar', 'date_approval', 'created_user', 'created_at', 'updated_user', 'updated_at'
];
}
@extends('layouts.master')
@section('title')
Dashboard
@endsection
@section('header')
<div class="page-title">
<h3>Dashboard</h3>
</div>
@endsection
@section('contents')
<!-- start page title -->
<div class="page-title-box">
<div class="row align-items-center">
<div class="col-md-8">
<h6 class="page-title">{!! $title !!}</h6>
<ol class="breadcrumb m-0">
<li class="breadcrumb-item">Seleksi Belmawa</li>
<li class="breadcrumb-item">{!! $title !!}</li>
</ol>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<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%;">
<thead>
<tr>
<th>id</th>
<th>Kode Kelompok</th>
<th>Jenis PKM</th>
<th>Judul Proposal</th>
<th>Dosen Pembimbing</th>
<th>Proposal</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
@endsection
@section('js')
<script>
$(document).ready(function(){
// DataTable
var oTable = $('#example').DataTable({
processing: true,
serverSide: true,
ajax: {
"url" : "{{route('operator.getDaftarProposalBelmawa')}}"
},
columns: [
{ data: 'seleksi_belmawa_id' },
{ data: 'kode_kelompok' },
{ data: 'jenis_pkm' },
{ data: 'judul' },
{ data: 'nama_dosen' },
{ data: 'upload_dokumen' },
{ data: 'aksi' },
],
columnDefs: [
{
"targets": [ 0 ],
"visible": false,
"searchable": false
}
],
});
});
function confirmFinal(reqId, reqStatus)
{
if(reqStatus == '1')
{
var kata = "Lolos seleksi!";
}
else
{
var kata = "Tidak Lolos seleksi!";
}
Swal.fire({
title: "Apakah Anda Yakin?",
text: "Anda akan meloloskan data ini!",
icon: "warning",
showCancelButton: !0,
confirmButtonText: "Ya, "+ kata,
cancelButtonText: "Tidak, Kembali!",
confirmButtonClass: "btn btn-success mt-2",
cancelButtonClass: "btn btn-danger ms-2 mt-2",
buttonsStyling: !1,
allowOutsideClick: !1,
showLoaderOnConfirm: true
}).then((result) => {
if (result.value){
$.ajax({
url:'{{url("/operator/seleksi-belmawa-approval/")}}/' +reqId+'/'+reqStatus,
type:'GET',
data:{
"_token": "{{ csrf_token() }}",
},
dataType: "JSON",
})
.done(function(response){
swal.fire('Updated!', response.message, response.status).then(function(){
location.reload();
});
})
.fail(function(){
swal.fire('Oops...', 'Something went wrong with ajax !', 'error');
});
}
else
{
swal.fire('Batal!', 'Data batal diproses.', 'error');
}
})
}
</script>
@endsection
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
processing: true, processing: true,
serverSide: true, serverSide: true,
ajax: { ajax: {
"url" : "{{route('getDaftarProposal')}}" "url" : "{{route('operator.getDaftarProposal')}}"
}, },
columns: [ columns: [
{ data: 'reviewer_proposal_id' }, { data: 'reviewer_proposal_id' },
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
var urut = $(this).attr('data-urut'); var urut = $(this).attr('data-urut');
var isi = this.value; var isi = this.value;
$.ajax({ $.ajax({
url:'{{url("/seleksi_internal_proposal")}}', url:'{{url("/operator/seleksi-internal-proposal")}}',
type:'POST', type:'POST',
data:{ data:{
"_token": "{{ csrf_token() }}", "_token": "{{ csrf_token() }}",
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
}).then((result) => { }).then((result) => {
if (result.value){ if (result.value){
$.ajax({ $.ajax({
url:'{{url("/seleksi_internal_proposal/")}}', url:'{{url("/operator/seleksi-internal-proposal/")}}',
type:'POST', type:'POST',
data:{ data:{
"_token": "{{ csrf_token() }}", "_token": "{{ csrf_token() }}",
...@@ -165,6 +165,55 @@ ...@@ -165,6 +165,55 @@
}); });
}); });
function confirmFinal(reqId, reqStatus)
{
if(reqStatus == '1')
{
var kata = "Lolos seleksi!";
}
else
{
var kata = "Tidak Lolos seleksi!";
}
Swal.fire({
title: "Apakah Anda Yakin?",
text: "Anda akan meloloskan data ini!",
icon: "warning",
showCancelButton: !0,
confirmButtonText: "Ya, "+ kata,
cancelButtonText: "Tidak, Kembali!",
confirmButtonClass: "btn btn-success mt-2",
cancelButtonClass: "btn btn-danger ms-2 mt-2",
buttonsStyling: !1,
allowOutsideClick: !1,
showLoaderOnConfirm: true
}).then((result) => {
if (result.value){
$.ajax({
url:'{{url("/operator/seleksi-internal-reviewer-approval/")}}/' +reqId+'/'+reqStatus,
type:'GET',
data:{
"_token": "{{ csrf_token() }}",
},
dataType: "JSON",
})
.done(function(response){
swal.fire('Updated!', response.message, response.status).then(function(){
location.reload();
});
})
.fail(function(){
swal.fire('Oops...', 'Something went wrong with ajax !', 'error');
});
}
else
{
swal.fire('Batal!', 'Data batal diproses.', 'error');
}
})
}
</script> </script>
@endsection @endsection
@extends('layouts.master')
@section('title')
Dashboard
@endsection
@section('header')
<div class="page-title">
<h3>Dashboard</h3>
</div>
@endsection
@php
$reqId = $data['id'];
@endphp
@section('contents')
<!-- start page title -->
<div class="page-title-box">
<div class="row align-items-center">
<div class="col-md-8">
<h6 class="page-title">{!! $title !!}</h6>
<ol class="breadcrumb m-0">
<li class="breadcrumb-item">Seleksi Internal</li>
<li class="breadcrumb-item">{!! $title !!}</li>
</ol>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<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%;">
<thead>
<tr>
<th rowspan="2">id</th>
<th rowspan="2">Kode Kelompok</th>
<th rowspan="2">Jenis PKM</th>
<th rowspan="2">Judul Proposal</th>
<th rowspan="2">Reviewer 1</th>
<th rowspan="2">Reviewer 2</th>
<th colspan="2" style="text-align: center">Nilai</th>
<th rowspan="2">Nilai Akhir</th>
<th rowspan="2">Aksi</th>
</tr>
<tr>
<th>Reviewer 1</th>
<th>Reviewer 2</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
@endsection
@section('js')
<script>
$(document).ready(function(){
// DataTable
var oTable = $('#example').DataTable({
processing: true,
serverSide: true,
ajax: {
"url" : "{{route('operator.getMonevProposal')}}",
"data" : function ( data )
{
data.jenis_monev_id = '{{ $reqId }}';
}
},
columns: [
{ data: 'monev_internal_id' },
{ data: 'kode' },
{ data: 'jenis_pkm' },
{ data: 'judul' },
{ data: 'reviewer_1' },
{ data: 'reviewer_2' },
{ data: 'nilai_1' },
{ data: 'nilai_2' },
{ data: 'rata' },
{ data: 'aksi' },
],
columnDefs: [
{
"targets": [ 0 ],
"visible": false,
"searchable": false
}
],
drawCallback: function() {
$('.select2').select2();
}
});
});
$('#example tbody').on('change', '.reviewer', function () {
var urut = $(this).attr('data-urut');
var isi = this.value;
$.ajax({
url:'{{url("/operator/monev-internal-proposal")}}',
type:'POST',
data:{
"_token": "{{ csrf_token() }}",
"urut": urut,
"data": isi,
"jenisMonevId" : "{{ $reqId }}",
},
dataType: "JSON",
})
.done(function(response){
if(response.status == 'info')
{
Swal.fire({
title: "Apakah Anda Yakin?",
text: response.message,
icon: "warning",
showCancelButton: !0,
confirmButtonText: "Ya, Ubah Reviewer!",
cancelButtonText: "Tidak, Kembali!",
confirmButtonClass: "btn btn-success mt-2",
cancelButtonClass: "btn btn-danger ms-2 mt-2",
buttonsStyling: !1,
allowOutsideClick: !1,
showLoaderOnConfirm: true
}).then((result) => {
if (result.value){
$.ajax({
url:'{{url("/operator/monev-internal-proposal/")}}',
type:'POST',
data:{
"_token": "{{ csrf_token() }}",
"reqId" : response.id,
"jenisMonevId" : "{{ $reqId }}",
"urut": urut,
"data": isi,
},
dataType: "JSON",
})
.done(function(response){
swal.fire(response.info, response.message, response.status).then(function(){
location.reload();
});
})
.fail(function(){
swal.fire('Oops...', 'Something went wrong with ajax !', 'error');
});
}
else
{
swal.fire('Batal!', 'Data batal diubah.', 'error');
}
})
}
else
{
swal.fire(response.status, response.message, response.status).then(function(){
// oTable.ajax.reload();
location.reload();
});
}
})
.fail(function(){
swal.fire('Oops...', 'Something went wrong with ajax !', 'error');
});
});
function confirmFinal(reqId, reqStatus)
{
if(reqStatus == '1')
{
var kata = "Lolos seleksi!";
}
else
{
var kata = "Tidak Lolos seleksi!";
}
Swal.fire({
title: "Apakah Anda Yakin?",
text: "Anda akan meloloskan data ini!",
icon: "warning",
showCancelButton: !0,
confirmButtonText: "Ya, "+ kata,
cancelButtonText: "Tidak, Kembali!",
confirmButtonClass: "btn btn-success mt-2",
cancelButtonClass: "btn btn-danger ms-2 mt-2",
buttonsStyling: !1,
allowOutsideClick: !1,
showLoaderOnConfirm: true
}).then((result) => {
if (result.value){
$.ajax({
url:'{{url("/operator/monev-internal-reviewer-approval/")}}/' +reqId+'/'+reqStatus,
type:'GET',
data:{
"_token": "{{ csrf_token() }}",
},
dataType: "JSON",
})
.done(function(response){
swal.fire('Updated!', response.message, response.status).then(function(){
location.reload();
});
})
.fail(function(){
swal.fire('Oops...', 'Something went wrong with ajax !', 'error');
});
}
else
{
swal.fire('Batal!', 'Data batal diproses.', 'error');
}
})
}
</script>
@endsection
...@@ -40,7 +40,7 @@ Dashboard ...@@ -40,7 +40,7 @@ Dashboard
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
{!! Form::open(array('url' => route('jadwal_kegiatan.store'), 'method' => 'POST', 'id' => 'ff', 'class' {!! Form::open(array('url' => route('operator.jadwal-kegiatan.store'), 'method' => 'POST', 'id' => 'ff', 'class'
=> =>
'form-horizontal')) !!} 'form-horizontal')) !!}
{!! csrf_field() !!} {!! csrf_field() !!}
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
{!! Form::open(array('url' => route('jenis.store'), 'method' => 'POST', 'id' => 'ff', 'class' => 'form-horizontal')) !!} {!! Form::open(array('url' => route('operator.jenis.store'), 'method' => 'POST', 'id' => 'ff', 'class' => 'form-horizontal')) !!}
{!! csrf_field() !!} {!! csrf_field() !!}
<div class="row mb-3"> <div class="row mb-3">
<label for="example-text-input" class="col-sm-2 col-form-label">Jenis PKM</label> <label for="example-text-input" class="col-sm-2 col-form-label">Jenis PKM</label>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
{!! Form::model($jenis, ['route' => ['jenis.update', $id], 'method'=>'patch', 'class'=>'form-horizontal']) !!} {!! Form::model($jenis, ['route' => ['operator.jenis.update', $id], 'method'=>'patch', 'class'=>'form-horizontal']) !!}
{!! csrf_field() !!} {!! csrf_field() !!}
<div class="row mb-3"> <div class="row mb-3">
<label for="example-text-input" class="col-sm-2 col-form-label">Jenis PKM</label> <label for="example-text-input" class="col-sm-2 col-form-label">Jenis PKM</label>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="float-end d-none d-md-block"> <div class="float-end d-none d-md-block">
<a href="{{ URL::to('jenis/create') }}" type="button" class="btn btn-primary waves-effect waves-light"> <i class="fas fa-plus-circle"></i> Tambah Data</a> <a href="{{ URL::to('operator/jenis/create') }}" type="button" class="btn btn-primary waves-effect waves-light"> <i class="fas fa-plus-circle"></i> Tambah Data</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
processing: true, processing: true,
serverSide: true, serverSide: true,
ajax: { ajax: {
"url" : "{{route('getJenis')}}" "url" : "{{route('operator.getJenis')}}"
}, },
columns: [ columns: [
{ data: 'jenis_id' }, { data: 'jenis_id' },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<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">Setting</li> <li class="breadcrumb-item">Setting</li>
<li class="breadcrumb-item"><a href="{{ URL::to('jenis_penilaian_monev') }}">Penilaian Monev Internal</a></li> <li class="breadcrumb-item"><a href="{{ URL::to('operator/jenis-penilaian-monev') }}">Penilaian Monev Internal</a></li>
<li class="breadcrumb-item">{!! $title !!}</li> <li class="breadcrumb-item">{!! $title !!}</li>
</ol> </ol>
</div> </div>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
{!! Form::model($jenis, ['route' => ['jenis_penilaian_monev.update', $id], 'method'=>'patch', 'class'=>'form-horizontal']) !!} {!! Form::model($jenis, ['route' => ['operator.jenis-penilaian-monev.update', $id], 'method'=>'patch', 'class'=>'form-horizontal']) !!}
{!! csrf_field() !!} {!! csrf_field() !!}
<div class="row mb-3"> <div class="row mb-3">
<label for="example-text-input" class="col-sm-2 col-form-label">Jenis PKM </label> <label for="example-text-input" class="col-sm-2 col-form-label">Jenis PKM </label>
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
function createRow() function createRow()
{ {
$(function () { $(function () {
$.get("{{URL::to('rowJenisPenilaianMonev')}}", function (data) { $.get("{{URL::to('operator/rowJenisPenilaianMonev')}}", function (data) {
$("#tbData").append(data); $("#tbData").append(data);
}); });
}); });
......
...@@ -21,11 +21,6 @@ ...@@ -21,11 +21,6 @@
<li class="breadcrumb-item">{!! $title !!}</li> <li class="breadcrumb-item">{!! $title !!}</li>
</ol> </ol>
</div> </div>
<div class="col-md-4">
<div class="float-end d-none d-md-block">
<a href="{{ URL::to('jenis/create') }}" type="button" class="btn btn-primary waves-effect waves-light"> <i class="fas fa-plus-circle"></i> Tambah Data</a>
</div>
</div>
</div> </div>
</div> </div>
<!-- end page title --> <!-- end page title -->
...@@ -66,7 +61,7 @@ ...@@ -66,7 +61,7 @@
processing: true, processing: true,
serverSide: true, serverSide: true,
ajax: { ajax: {
"url" : "{{route('getJenisPenilaianMonev')}}" "url" : "{{route('operator.getJenisPenilaianMonev')}}"
}, },
columns: [ columns: [
{ data: 'jenis_id' }, { data: 'jenis_id' },
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
processing: true, processing: true,
serverSide: true, serverSide: true,
ajax: { ajax: {
"url" : "{{route('getReviewer')}}" "url" : "{{route('operator.getReviewer')}}"
}, },
columns: [ columns: [
{ data: 'reviewer_id' }, { data: 'reviewer_id' },
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
autoWidth: true, autoWidth: true,
processing: true, processing: true,
ajax: { ajax: {
url: "{{route('getDosen')}}", url: "{{route('operator.getDosen')}}",
dataSrc: 'data' dataSrc: 'data'
}, },
columns: [ columns: [
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
}).then((result) => { }).then((result) => {
if (result.value){ if (result.value){
$.ajax({ $.ajax({
url:'{{url("/seleksi_internal_reviewer")}}', url:'{{url("/operator/seleksi-internal-reviewer")}}',
type:'POST', type:'POST',
data:{ data:{
"_token": "{{ csrf_token() }}", "_token": "{{ csrf_token() }}",
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
}).then((result) => { }).then((result) => {
if (result.value){ if (result.value){
$.ajax({ $.ajax({
url:'{{url("/seleksi_internal_reviewer/")}}/' +reqId, url:'{{url("/operator/seleksi_internal_reviewer/")}}/' +reqId,
type:'DELETE', type:'DELETE',
data:{ data:{
"_token": "{{ csrf_token() }}", "_token": "{{ csrf_token() }}",
......
@extends('layouts.master')
@section('title')
Dashboard
@endsection
@section('header')
<div class="page-title">
<h3>Dashboard</h3>
</div>
@endsection
@php
$reqId = $data['id'];
@endphp
@section('contents')
<!-- start page title -->
<div class="page-title-box">
<div class="row align-items-center">
<div class="col-md-8">
<h6 class="page-title">{!! $title !!}</h6>
<ol class="breadcrumb m-0">
<li class="breadcrumb-item">Monev Internal</li>
<li class="breadcrumb-item">{!! $title !!}</li>
</ol>
</div>
<div class="col-md-4">
<div class="float-end d-none d-md-block">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdrop">
<i class="fas fa-plus-circle"></i> Tambah Reviewer
</button>
</div>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<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%;">
<thead>
<tr>
<th>id</th>
<th>Nama Reviewer</th>
<th>NIDN</th>
<th>Fakultas</th>
<th>Jumlah Yang Harus direview</th>
<th>Jumlah Yang Sudah direview</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel"
aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">Data Dosen
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
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%;">
<thead>
<tr>
<th>Nama Reviewer</th>
<th>NIDN</th>
<th>Fakultas</th>
<th>Prodi</th>
<th>Aksi</th>
</tr>
</thead>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
@endsection
@section('js')
<script>
$(document).ready(function(){
// DataTable
var oTable = $('#example').DataTable({
processing: true,
serverSide: true,
ajax: {
"url" : "{{route('operator.getReviewerMonev')}}",
"data" : function ( data )
{
data.jenis_monev_id = '{{ $reqId }}';
}
},
columns: [
{ data: 'reviewer_id' },
{ data: 'nama' },
{ data: 'nidn' },
{ data: 'fakultas' },
{ data: 'jumlah_harus_review' },
{ data: 'jumlah_sudah_review' },
{ data: 'aksi' },
],
columnDefs: [
{
"targets": [ 0 ],
"visible": false,
"searchable": false
}
]
});
var oTable1 = $('#example1').DataTable({
paging: true,
lengthChange: true,
searching: true,
ordering: true,
info: true,
autoWidth: true,
processing: true,
ajax: {
url: "{{route('operator.getDosen')}}",
dataSrc: 'data'
},
columns: [
{ data: 'nm_sdm' },
{ data: 'nidn' },
{ data: 'fakultas' },
{ data: 'prodi' },
{ data: 'id_sdm' },
],
columnDefs: [
{
"targets": -1,
"data": null,
"render": createManageBtn,
},
{
"visible": false,
"searchable": false,
}
]
});
function createManageBtn() {
return '<button id="manageBtn" type="button" class="btn btn-success btn-sm">Tambah</button>';
}
$('#example1 tbody').on('click', 'button', function () {
var data = oTable1.row($(this).parents('tr')).data();
Swal.fire({
title: "Apakah Anda Yakin?",
text: "Anda akan menambahkan reviewer ini!",
icon: "warning",
showCancelButton: !0,
confirmButtonText: "Ya, Tambah data!",
cancelButtonText: "Tidak, Kembali!",
confirmButtonClass: "btn btn-success mt-2",
cancelButtonClass: "btn btn-danger ms-2 mt-2",
buttonsStyling: !1,
allowOutsideClick: !1,
showLoaderOnConfirm: true
}).then((result) => {
if (result.value){
$.ajax({
url:'{{url("/operator/monev-internal-reviewer")}}',
type:'POST',
data:{
"_token": "{{ csrf_token() }}",
"id_sdm": data['id_sdm'],
"nama": data['nm_sdm'],
"nidn": data['nidn'],
"fakultas": data['fakultas'],
"prodi": data['prodi'],
"jenis_monev_id": '{{ $reqId }}',
},
dataType: "JSON",
})
.done(function(response){
swal.fire(response.status, response.message, response.status).then(function(){
oTable.ajax.reload();
});
})
.fail(function(){
swal.fire('Oops...', 'Something went wrong with ajax !', 'error');
});
}
else
{
swal.fire('Batal!', 'Data batal ditambahkan.', 'error');
}
})
});
});
function confirmDelete(reqId)
{
Swal.fire({
title: "Apakah Anda Yakin?",
text: "Anda akan menghapus data ini!",
icon: "warning",
showCancelButton: !0,
confirmButtonText: "Ya, Hapus data!",
cancelButtonText: "Tidak, Kembali!",
confirmButtonClass: "btn btn-success mt-2",
cancelButtonClass: "btn btn-danger ms-2 mt-2",
buttonsStyling: !1,
allowOutsideClick: !1,
showLoaderOnConfirm: true
}).then((result) => {
if (result.value){
$.ajax({
url:'{{url("/operator/seleksi_internal_reviewer/")}}/' +reqId,
type:'DELETE',
data:{
"_token": "{{ csrf_token() }}",
},
dataType: "JSON",
})
.done(function(response){
swal.fire(response.info, response.message, response.status).then(function(){
location.reload();
});
})
.fail(function(){
swal.fire('Oops...', 'Something went wrong with ajax !', 'error');
});
}
else
{
swal.fire('Batal!', 'Data batal dihapus.', 'error');
}
})
}
</script>
@endsection
...@@ -22,20 +22,20 @@ ...@@ -22,20 +22,20 @@
<span>Seting</span> <span>Seting</span>
</a> </a>
<ul class="sub-menu" aria-expanded="false"> <ul class="sub-menu" aria-expanded="false">
<li class="{{ (request()->is('jenis/*')) ? 'mm-active' : '' }}"> <li class="{{ (request()->is('operator/jenis/*')) ? 'mm-active' : '' }}">
<a href="{{ URL::to('jenis') }}" class="waves-effect"> <a href="{{ URL::to('operator/jenis') }}" class="waves-effect">
<i class="ti-home"></i> <i class="ti-home"></i>
<span>Jenis PKM</span> <span>Jenis PKM</span>
</a> </a>
</li> </li>
<li class="{{ (request()->is('jenis_penilaian_monev/*')) ? 'mm-active' : '' }}"> <li class="{{ (request()->is('operator/jenis-penilaian-monev/*')) ? 'mm-active' : '' }}">
<a href="{{ URL::to('jenis_penilaian_monev') }}" class="waves-effect"> <a href="{{ URL::to('operator/jenis-penilaian-monev') }}" class="waves-effect">
<i class="ti-home"></i> <i class="ti-home"></i>
<span>Penilaian Monev Internal</span> <span>Penilaian Monev Internal</span>
</a> </a>
</li> </li>
<li class="{{ (request()->is('jadwal_kegiatan/*')) ? 'mm-active' : '' }}"> <li class="{{ (request()->is('operator/jadwal-kegiatan/*')) ? 'mm-active' : '' }}">
<a href="{{ URL::to('jadwal_kegiatan') }}" class="waves-effect"> <a href="{{ URL::to('operator/jadwal-kegiatan') }}" class="waves-effect">
<i class="ti-home"></i> <i class="ti-home"></i>
<span>Jadwal Kegiatan</span> <span>Jadwal Kegiatan</span>
</a> </a>
...@@ -48,28 +48,43 @@ ...@@ -48,28 +48,43 @@
<li> <li>
<a href="{{ URL::to('/operator/proposal') }}" class="waves-effect"><i class="ti-agenda"></i><span>Proposal</span></a> <a href="{{ URL::to('/operator/proposal') }}" class="waves-effect"><i class="ti-agenda"></i><span>Proposal</span></a>
</li> </li>
<li class="{{ (request()->is('seleksi_internal*')) ? 'mm-active' : '' }}"> <li class="{{ (request()->is('operator/seleksi-internal*')) ? 'mm-active' : '' }}">
<a href="javascript: void(0);" class="has-arrow waves-effect"> <a href="javascript: void(0);" class="has-arrow waves-effect">
<i class="ti-check"></i> <i class="ti-check"></i>
<span>Seleksi Internal</span> <span>Seleksi Internal</span>
</a> </a>
<ul class="sub-menu" aria-expanded="false"> <ul class="sub-menu" aria-expanded="false">
<li><a href="{{ URL::to('seleksi_internal_reviewer') }}">Reviewer</a></li> <li><a href="{{ URL::to('operator/seleksi-internal-reviewer') }}">Reviewer</a></li>
<li><a href="{{ URL::to('seleksi_internal_proposal') }}">Daftar Proposal</a></li> <li><a href="{{ URL::to('operator/seleksi-internal-proposal') }}">Daftar Proposal</a></li>
</ul> </ul>
</li> </li>
<li> <li class="{{ (request()->is('operator/seleksi-belmawa*')) ? 'mm-active' : '' }}">
<a href="{{ URL::to('/operator/seleksi-belmawa') }}" class="waves-effect"><i class="ti-check-box"></i><span>Seleksi Belmawa</span></a> <a href="{{ URL::to('/operator/seleksi-belmawa') }}" class="waves-effect"><i class="ti-check-box"></i><span>Seleksi Belmawa</span></a>
</li> </li>
<li> <li class="{{ (request()->is('operator/monev-internal*')) ? 'mm-active' : '' }}">
<a href="javascript: void(0);" class="has-arrow waves-effect"> <a href="javascript: void(0);" class="has-arrow waves-effect">
<i class="ti-layers-alt"></i> <i class="ti-layers-alt"></i>
<span>Monev Internal</span> <span>Monev Internal</span>
</a> </a>
<ul class="sub-menu" aria-expanded="false"> <ul class="sub-menu" aria-expanded="false">
<li><a href="{{ URL::to('/operator/monev-satu') }}">Monev Internal I</a></li> <li><a href="javascript: void(0);" class="has-arrow">Monev Internal I</a>
<li><a href="{{ URL::to('/operator/monev-dua') }}">Monev Internal II</a></li> <ul class="sub-menu" aria-expanded="true">
<li><a href="{{ URL::to('/operator/monev-tiga') }}">Monev Internal III</a></li> <li><a href="{{ URL::to('operator/monev-internal-reviewer/'.Crypt::encrypt('07cda89b-94ca-42a3-a197-8fc1260ebcfb')) }}">Reviewer</a></li>
<li><a href="{{ URL::to('operator/monev-internal-proposal/'.Crypt::encrypt('07cda89b-94ca-42a3-a197-8fc1260ebcfb')) }}">Daftar Proposal</a></li>
</ul>
</li>
<li><a href="javascript: void(0);" class="has-arrow">Monev Internal II</a>
<ul class="sub-menu" aria-expanded="true">
<li><a href="{{ URL::to('operator/monev-internal-reviewer/'.Crypt::encrypt('21a49a70-33bb-49f1-9fd9-ebe52fa4336c')) }}">Reviewer</a></li>
<li><a href="{{ URL::to('operator/monev-internal-proposal/'.Crypt::encrypt('21a49a70-33bb-49f1-9fd9-ebe52fa4336c')) }}">Daftar Proposal</a></li>
</ul>
</li>
<li><a href="javascript: void(0);" class="has-arrow">Monev Internal III</a>
<ul class="sub-menu" aria-expanded="true">
<li><a href="{{ URL::to('operator/monev-internal-reviewer/'.Crypt::encrypt('068aa53d-91a0-4704-b72c-54757799a286')) }}">Reviewer</a></li>
<li><a href="{{ URL::to('operator/monev-internal-proposal/'.Crypt::encrypt('068aa53d-91a0-4704-b72c-54757799a286')) }}">Daftar Proposal</a></li>
</ul>
</li>
</ul> </ul>
</li> </li>
@endif @endif
......
...@@ -2,28 +2,31 @@ ...@@ -2,28 +2,31 @@
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Authentication\LoginController;
use App\Http\Controllers\DashboardController; use App\Http\Controllers\DashboardController;
use App\Http\Controllers\JenisController;
use App\Http\Controllers\ReviewerController;
use App\Http\Controllers\DaftarProposalController;
use App\Http\Controllers\JadwalKegiatanController;
use App\Http\Controllers\JenisPenilaianMonevController;
use App\Http\Controllers\SelectController;
use App\Http\Controllers\Mahasiswa\KelompokController as MahasiswaKelompok; use App\Http\Controllers\Operator\JenisController;
use App\Http\Controllers\Operator\SelectController;
use App\Http\Controllers\Mahasiswa\AnggotaController; use App\Http\Controllers\Mahasiswa\AnggotaController;
use App\Http\Controllers\Mahasiswa\ProposalController as MahasiswaProposal; use App\Http\Controllers\Operator\ReviewerController;
use App\Http\Controllers\Mahasiswa\BiodataController as BiodataMahasiswa; use App\Http\Controllers\Authentication\LoginController;
use App\Http\Controllers\Mahasiswa\SeleksiController as SeleksiMahasiswa; use App\Http\Controllers\Operator\MonevProposalController;
use App\Http\Controllers\Mahasiswa\MonevController as MonevMahasiswa; use App\Http\Controllers\Operator\ReviewerMonevController;
use App\Http\Controllers\Dosen\KelompokController as DosenKelompok; use App\Http\Controllers\Operator\DaftarProposalController;
use App\Http\Controllers\Operator\JadwalKegiatanController;
use App\Http\Controllers\Dosen\MonevController as DosenMonev;
use App\Http\Controllers\Operator\JenisPenilaianMonevController;
use App\Http\Controllers\Dosen\BiodataController as DosenBiodata; use App\Http\Controllers\Dosen\BiodataController as DosenBiodata;
use App\Http\Controllers\Dosen\ProposalController as DosenProposal;
use App\Http\Controllers\Dosen\SeleksiController as DosenSeleksi; use App\Http\Controllers\Dosen\SeleksiController as DosenSeleksi;
use App\Http\Controllers\Dosen\MonevController as DosenMonev;
use App\Http\Controllers\Dosen\KelompokController as DosenKelompok;
use App\Http\Controllers\Dosen\ProposalController as DosenProposal;
use App\Http\Controllers\Mahasiswa\MonevController as MonevMahasiswa;
use App\Http\Controllers\Mahasiswa\BiodataController as BiodataMahasiswa;
use App\Http\Controllers\Mahasiswa\SeleksiController as SeleksiMahasiswa;
use App\Http\Controllers\Mahasiswa\KelompokController as MahasiswaKelompok;
use App\Http\Controllers\Mahasiswa\ProposalController as MahasiswaProposal;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -57,7 +60,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () { ...@@ -57,7 +60,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::post('selectmahasiswa', [SelectController::class, 'mahasiswa'])->name('mahasiswa-select'); Route::post('selectmahasiswa', [SelectController::class, 'mahasiswa'])->name('mahasiswa-select');
Route::name('mahasiswa.')->prefix('mahasiswa')->middleware(['role:admin|mahasiswa|tendik'])->group(function () { Route::name('mahasiswa.')->prefix('mahasiswa')->middleware(['role:operator|mahasiswa|tendik'])->group(function () {
//biodata //biodata
Route::resource('biodata', BiodataMahasiswa::class); Route::resource('biodata', BiodataMahasiswa::class);
...@@ -93,7 +96,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () { ...@@ -93,7 +96,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
}); });
Route::name('dosen.')->prefix('dosen')->middleware(['role:admin|dosen|tendik'])->group(function () { Route::name('dosen.')->prefix('dosen')->middleware(['role:operator|dosen|tendik'])->group(function () {
//biodata //biodata
Route::resource('biodata', DosenBiodata::class); Route::resource('biodata', DosenBiodata::class);
...@@ -114,29 +117,50 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () { ...@@ -114,29 +117,50 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::get('/seleksi-belmawa', [DosenSeleksi::class, 'seleksiBelmawa'])->name('seleksi-belmawa'); 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-revisi', [DosenSeleksi::class, 'internalRevisi'])->name('seleksi-internal-revisi');
//seleksi //seleksi
Route::get('/monev-satu', [DosenMonev::class, 'monevsatu'])->name('monev-satu'); Route::get('/monev-satu', [DosenMonev::class, 'monevsatu'])->name('monev-satu');
Route::get('/monev-dua', [DosenMonev::class, 'monevdua'])->name('monev-duaa'); Route::get('/monev-dua', [DosenMonev::class, 'monevdua'])->name('monev-duaa');
Route::get('/monev-tiga', [DosenMonev::class, 'monevtiga'])->name('monev-tiga'); Route::get('/monev-tiga', [DosenMonev::class, 'monevtiga'])->name('monev-tiga');
}); });
});
Route::resource('jenis', JenisController::class); Route::name('operator.')->prefix('operator')->middleware(['role:operator|dosen|tendik'])->group(function () {
Route::get('getJenis', [JenisController::class, 'getData'])->name('getJenis');
Route::resource('jenis_penilaian_monev', JenisPenilaianMonevController::class);
Route::get('getJenisPenilaianMonev', [JenisPenilaianMonevController::class, 'getData'])->name('getJenisPenilaianMonev');
Route::get('rowJenisPenilaianMonev', function () { Route::resource('jenis', JenisController::class);
return view('backend/jenis_penilaian_monev/row'); Route::get('getJenis', [JenisController::class, 'getData'])->name('getJenis');
}); Route::resource('jenis-penilaian-monev', JenisPenilaianMonevController::class);
Route::get('getJenisPenilaianMonev', [JenisPenilaianMonevController::class, 'getData'])->name('getJenisPenilaianMonev');
Route::resource('jadwal_kegiatan', JadwalKegiatanController::class); Route::get('rowJenisPenilaianMonev', function () {
Route::resource('seleksi_internal_reviewer', ReviewerController::class); return view('backend/operator/jenis_penilaian_monev/row');
Route::get('getReviewer', [ReviewerController::class, 'getData'])->name('getReviewer'); });
Route::get('getDosen', [ReviewerController::class, 'getDosen'])->name('getDosen');
Route::resource('seleksi_internal_proposal', DaftarProposalController::class); Route::resource('jadwal-kegiatan', JadwalKegiatanController::class);
Route::get('getDaftarProposal', [DaftarProposalController::class, 'getData'])->name('getDaftarProposal'); Route::resource('seleksi-internal-reviewer', ReviewerController::class);
Route::get('getReviewer', [ReviewerController::class, 'getData'])->name('getReviewer');
Route::get('getDosen', [ReviewerController::class, 'getDosen'])->name('getDosen');
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');
// 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::resource('monev-internal-reviewer', ReviewerMonevController::class);
Route::get('getReviewerMonev', [ReviewerMonevController::class, 'getDataMonev'])->name('getReviewerMonev');
Route::get('monev-internal-reviewer/{id}', [ReviewerMonevController::class, 'index'])->name('monev-internal-reviewer');
Route::resource('monev-internal-reviewer', ReviewerMonevController::class)->except(['index']);
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');
});
});
//Auth::routes(); //Auth::routes();
......
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