Commit 1d0e917d by novanbagus

update opertator

parent 76cd5c23
<?php
namespace App\Http\Controllers;
use DB;
use URL;
use Auth;
use Uuid;
use Alert;
use Crypt;
use GuzzleHttp\Client;
use App\Models\Reviewer;
use Illuminate\Http\Request;
use App\Models\DaftarProposal;
use Illuminate\Support\Carbon;
use App\Models\ReviewerProposal;
use App\Models\ReviewerProposalDetil;
class DaftarProposalController extends Controller
{
private const periode_id = '9857a29d-521f-413a-b811-94cda7b45897';
public function index()
{
return view('backend.daftar_proposal.index')->withTitle('Daftar Proposal Seleksi Internal');
}
/* AJAX request */
public function getData(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 = DaftarProposal::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$statement = " AND (UPPER(JUDUL) LIKE '%".$searchValue."%') ";
$totalRecordswithFilter = DaftarProposal::select('count(1) as allcount')
->whereRaw($statementGlobal.$statement)->count();
// Fetch records
$records = DaftarProposal::orderBy($columnName,$columnSortOrder)
->whereRaw($statementGlobal.$statement)
->select('daftar_proposal.*')
->skip($start)
->take($rowperpage)
->get();
$data_arr = array();
foreach($records as $record){
$proposal_id = $record->proposal_id;
$reviewer_proposal_id = $record->reviewer_proposal_id;
$jenis_id = $record->jenis_id;
$kode = $record->kode;
$jenis_pkm = $record->jenis_pkm;
$judul = $record->judul;
$status_administrasi_1 = $record->status_administrasi_1;
$status_administrasi_2 = $record->status_administrasi_2;
$nilai_1 = $record->nilai_1;
$nilai_2 = $record->nilai_2;
$reviewer_id_1 = $record->reviewer_id_1;
$reviewer_id_2 = $record->reviewer_id_2;
$rata = ($nilai_1 + $nilai_2) / 2;
// $delete = "confirmLolos('".Crypt::encrypt($reviewer_id)."')";
$reviewer = Reviewer::where('periode_id', DaftarProposalController::periode_id)
->where('jenis_monev_id', 'ba11c2b5-d65d-4360-9717-98e4fa9b9188')
->where("status_hapus", '0')
->get();
$opt1=$opt2 = "<option value=''>Pilih Reviewer</option>";
foreach ($reviewer as $key => $value) {
$selected1 = "";
$selected2 = "";
if($value->reviewer_id == $reviewer_id_1)
$selected1 = 'selected';
if($value->reviewer_id == $reviewer_id_2)
$selected2 = 'selected';
$opt1 .= '<option value="'.Crypt::encrypt($proposal_id.'###'.$value->reviewer_id).'" '.$selected1.'>'.$value->nama.'</option>';
$opt2 .= '<option value="'.Crypt::encrypt($proposal_id.'###'.$value->reviewer_id).'" '.$selected2.'>'.$value->nama.'</option>';
}
$pilihan_1 = '<td class="table-action">
<select class="form-control select2 reviewer" data-urut="1">
'.$opt1.'
</select>
</td>';
$pilihan_2 = '<td class="table-action">
<select class="form-control select2 reviewer" data-urut="2">
'.$opt2.'
</select>
</td>';
$data_arr[] = array(
"reviewer_proposal_id" => $reviewer_proposal_id,
"kode" => $kode,
"jenis_pkm" => $jenis_pkm,
"judul" => $judul,
"reviewer_1" => $pilihan_1,
"reviewer_2" => $pilihan_2,
"nilai_1" => $nilai_1,
"nilai_2" => $nilai_2,
"rata" => $rata,
"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 create()
{
}
public function store(Request $request)
{
$uuid = Uuid::generate();
$reqUrut = $request->input('urut');
$isi = Crypt::decrypt($request->input('data'));
$arrData = explode('###', $isi);
$reqProposalId = $arrData[0]?:'';
$reqReviewerId = $arrData[1]?:'';
if($request->input('reqId') != null)
{
$reqId = $request->input('reqId');
// update status hapus jadi 1
$delete = ReviewerProposal::where('reviewer_proposal_id', $reqId)->update(['status_hapus'=>'1', 'deleted_at' => Carbon::now()]);
// $delete_detil = ReviewerProposalDetil::where('reviewer_proposal_id', $reqId)->delete();
// $delete = ReviewerProposal::where('reviewer_proposal_id', $reqId)->delete();
if ($delete == 1) {
// ketika sudah di delete kemudian data yang baru di insert
$data['reviewer_proposal_id'] = $uuid;
$data['proposal_id'] = $reqProposalId;
$data['reviewer_id'] = $reqReviewerId;
$data['urut'] = $reqUrut;
// BACKUP NVN
// $data['created_user'] = Auth::user()->name;
if(ReviewerProposal::create($data))
{
return response()->json([
'status' => 'success',
'message' => 'Data reviewer sebelumnya telah berhasil dihapus dan data reviewer yang baru telah berhasil ditambahkan.',
]);
}
else
{
return response()->json([
'status' => 'error',
'message' => 'Data gagal dihapus.',
]);
}
}
}
$ada_data = ReviewerProposal::where([
['proposal_id', '=', $reqProposalId],
['reviewer_id', '=', $reqReviewerId],
['urut', '!=', $reqUrut],
])->count();
if($ada_data > 0)
{
return response()->json([
'status' => 'error',
'message' => 'Data reviewer sudah ada.',
]);
}
$ada_data_detil = ReviewerProposal::join('reviewer_proposal_detil as b', 'reviewer_proposal.reviewer_proposal_id', '=', 'b.reviewer_proposal_id')->where([
['proposal_id', '=', $reqProposalId],
['urut', '=', $reqUrut],
['status_hapus', '=', '0'],
])->first();
if(isset($ada_data_detil))
{
return response()->json([
'id' => $ada_data_detil->reviewer_proposal_id,
'status' => 'info',
'message' => 'Reviewer sudah menilai proposal, apakah anda yakin akan merubah reviewer?',
]);
}
$data['reviewer_proposal_id'] = $uuid;
$data['proposal_id'] = $reqProposalId;
$data['urut'] = $reqUrut;
$data['reviewer_id'] = $reqReviewerId;
// BACKUP NVN
// $data['created_user'] = Auth::user()->name;
$reviewer_proposal = ReviewerProposal::updateOrCreate([
'proposal_id' => $reqProposalId,
'urut' => $reqUrut
], $data);
if($reviewer_proposal)
{
return response()->json([
'status' => 'success',
'message' => 'Data berhasil diubah.',
]);
}
else
{
return response()->json([
'status' => 'error',
'message' => 'Data gagal diubah.',
]);
}
}
public function edit($id)
{
}
public function update(Request $request, $id)
{
}
public function destroy($id)
{
}
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);
}
}
...@@ -2,22 +2,28 @@ ...@@ -2,22 +2,28 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request;
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 Carbon\Carbon;
use Illuminate\Http\Request;
use App\Models\JadwalKegiatan; use App\Models\JadwalKegiatan;
class JadwalKegiatanController extends Controller class JadwalKegiatanController extends Controller
{ {
public function index() public function index()
{ {
$data['jadwal_kegiatan'] = JadwalKegiatan::where('status_hapus', '0')->get(); $data_periode = DB::table('periode')->select('periode_id', 'nama', 'keterangan')->where('status', '1')->first();
session(['periode_id' => $data_periode->periode_id]);
$periode_id = session('periode_id');
$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.jadwal_kegiatan.index', compact('data'))->withTitle('Jadwal Kegiatan');
} }
...@@ -34,67 +40,35 @@ class JadwalKegiatanController extends Controller ...@@ -34,67 +40,35 @@ class JadwalKegiatanController extends Controller
public function store(Request $request) public function store(Request $request)
{ {
foreach ($request->tanggal as $key => $value) {
if(!empty($value))
{
$tanggal = explode(" - ", $value);
$tanggal_mulai = $tanggal[0];
$tanggal_selesai = $tanggal[1];
JadwalKegiatan::where('jadwal_kegiatan_id', $key)->update(['tanggal_mulai'=>Carbon::createFromFormat('d-m-Y H:i', $tanggal_mulai)->format('Y-m-d H:i'), 'tanggal_selesai'=>Carbon::createFromFormat('d-m-Y H:i', $tanggal_selesai)->format('Y-m-d H:i')]);
}
}
Alert::success('Data berhasil disimpan')->persistent('Ok');
$successmessage = "Proses Setting Jadwal Berhasil.";
return redirect()->route('jadwal_kegiatan.index')->with('successMessage', $successmessage);
} }
public function edit($id) public function edit($id)
{ {
$jenis = Jenis::where('jenis_id', '=', Crypt::decrypt($id))->get();
$penilaian_monev = PenilaianMonev::where('jenis_id', '=', Crypt::decrypt($id))->get();
$data = [
'jenis' => $jenis,
'penilaian_monev' => $penilaian_monev
];
return view('backend.penilaian_monev.edit', compact('data'))->withTitle('Ubah Jenis PKM');
} }
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$delete = PenilaianMonev::where('jenis_id', $id)->delete($id);
for($i=0; $i<count($request->nama); $i++)
{
$uuid = Uuid::generate();
$data['penilaian_monev_id'] = $uuid;
$data['jenis_id'] = $id;
$data['nama'] = $request->nama[$i];
$data['bobot'] = $request->bobot[$i];
PenilaianMonev::create($data);
}
Alert::success('Data berhasil disimpan.')->persistent('Ok');
return redirect()->route('penilaian_monev.index');
} }
public function destroy($id) public function destroy($id)
{ {
try {
$delete = Jenis::where('jenis_id', Crypt::decrypt($id))->update(['status_hapus'=>'1']);
if ($delete == 1) {
$status = 'success';
$message = "Jenis PKM berhasil dihapus.";
}
else{
$status = 'error';
$message = "Jenis PKM tidak ada.";
}
return response()->json([
'status' => $status,
'message' => $message,
]);
} catch (\Exception $id) {
return response()->json([
'status' => 'error',
'message' => "Data gagal dihapus.",
]);
}
} }
} }
...@@ -97,8 +97,8 @@ class JenisController extends Controller ...@@ -97,8 +97,8 @@ class JenisController extends Controller
$data['jenis_id'] = $uuid; $data['jenis_id'] = $uuid;
$data['nama'] = $request->input('nama'); $data['nama'] = $request->input('nama');
$data['keterangan'] = $request->input('keterangan'); $data['keterangan'] = $request->input('keterangan');
// BACKUP NVN
// $data['created_user'] = Auth::user()->name; // $data['created_user'] = Auth::user()->name;
Post::where('id',3)->update(['title'=>'Updated title']);
if(Jenis::create($data)) if(Jenis::create($data))
{ {
......
...@@ -12,13 +12,13 @@ use Alert; ...@@ -12,13 +12,13 @@ use Alert;
use Crypt; use Crypt;
use App\Models\Jenis; use App\Models\Jenis;
use App\Models\PenilaianMonev; use App\Models\JenisPenilaianMonev;
class PenilaianMonevController extends Controller class JenisPenilaianMonevController extends Controller
{ {
public function index() public function index()
{ {
return view('backend.penilaian_monev.index')->withTitle('Jenis PKM'); return view('backend.jenis_penilaian_monev.index')->withTitle('Jenis PKM');
} }
/* AJAX request */ /* AJAX request */
...@@ -63,7 +63,7 @@ class PenilaianMonevController extends Controller ...@@ -63,7 +63,7 @@ class PenilaianMonevController extends Controller
$keterangan = $record->keterangan; $keterangan = $record->keterangan;
$jumlah_komponen = $record->jumlah_komponen; $jumlah_komponen = $record->jumlah_komponen;
$edit = URL::to('penilaian_monev/'.Crypt::encrypt($jenis_id).'/edit'); $edit = URL::to('jenis_penilaian_monev/'.Crypt::encrypt($jenis_id).'/edit');
$data_arr[] = array( $data_arr[] = array(
"jenis_id" => $jenis_id, "jenis_id" => $jenis_id,
...@@ -100,61 +100,35 @@ class PenilaianMonevController extends Controller ...@@ -100,61 +100,35 @@ class PenilaianMonevController extends Controller
public function edit($id) public function edit($id)
{ {
$jenis = Jenis::where('jenis_id', '=', Crypt::decrypt($id))->get(); $jenis = Jenis::where('jenis_id', '=', Crypt::decrypt($id))->get();
$penilaian_monev = PenilaianMonev::where('jenis_id', '=', Crypt::decrypt($id))->get(); $jenis_penilaian_monev = JenisPenilaianMonev::where('jenis_id', '=', Crypt::decrypt($id))->get();
$data = [ $data = [
'jenis' => $jenis, 'jenis' => $jenis,
'penilaian_monev' => $penilaian_monev 'jenis_penilaian_monev' => $jenis_penilaian_monev
]; ];
return view('backend.penilaian_monev.edit', compact('data'))->withTitle('Ubah Jenis PKM'); return view('backend.jenis_penilaian_monev.edit', compact('data'))->withTitle('Ubah Jenis PKM');
} }
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$delete = PenilaianMonev::where('jenis_id', $id)->delete($id); $delete = JenisPenilaianMonev::where('jenis_id', $id)->delete($id);
for($i=0; $i<count($request->nama); $i++) for($i=0; $i<count($request->nama); $i++)
{ {
$uuid = Uuid::generate(); $uuid = Uuid::generate();
$data['penilaian_monev_id'] = $uuid; $data['jenis_penilaian_monev_id'] = $uuid;
$data['jenis_id'] = $id; $data['jenis_id'] = $id;
$data['nama'] = $request->nama[$i]; $data['nama'] = $request->nama[$i];
$data['bobot'] = $request->bobot[$i]; $data['bobot'] = $request->bobot[$i];
PenilaianMonev::create($data); JenisPenilaianMonev::create($data);
} }
Alert::success('Data berhasil disimpan.')->persistent('Ok'); Alert::success('Data berhasil disimpan.')->persistent('Ok');
return redirect()->route('penilaian_monev.index'); return redirect()->route('jenis_penilaian_monev.index');
} }
public function destroy($id)
{
try {
$delete = Jenis::where('jenis_id', Crypt::decrypt($id))->update(['status_hapus'=>'1']);
if ($delete == 1) {
$status = 'success';
$message = "Jenis PKM berhasil dihapus.";
}
else{
$status = 'error';
$message = "Jenis PKM tidak ada.";
}
return response()->json([
'status' => $status,
'message' => $message,
]);
} catch (\Exception $id) {
return response()->json([
'status' => 'error',
'message' => "Data gagal dihapus.",
]);
}
}
} }
<?php
namespace App\Http\Controllers;
use DB;
use URL;
use Auth;
use Uuid;
use Alert;
use Crypt;
use GuzzleHttp\Client;
use App\Models\Reviewer;
use Illuminate\Http\Request;
class ReviewerController extends Controller
{
public function index()
{
return view('backend.reviewer.index')->withTitle('Reviewer Seleksi Internal');
}
/* AJAX request */
public function getData(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 = " STATUS_HAPUS = '0' ";
$totalRecords = Reviewer::select('count(1) as allcount')->whereRaw($statementGlobal)->count();
$statement = " AND (UPPER(NAMA) LIKE '%".$searchValue."%') ";
$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.reviewer.create')->withTitle('Tambah Reviewer');
}
public function store(Request $request)
{
$reqPeriodeId = '9857a29d-521f-413a-b811-94cda7b45897';
$reqJenisMonevId = 'ba11c2b5-d65d-4360-9717-98e4fa9b9188';
$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
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class DaftarProposal extends Model
{
protected $table = 'daftar_proposal';
protected $primaryKey = 'reviewer_proposal_id';
public $incrementing = false;
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'
];
}
...@@ -16,6 +16,6 @@ class Jenis extends Model ...@@ -16,6 +16,6 @@ class Jenis extends Model
public function rPenilaianMonev() public function rPenilaianMonev()
{ {
return $this->hasMany(\App\Models\PenilaianMonev::class, 'jenis_id', 'jenis_id'); return $this->hasMany(\App\Models\JenisPenilaianMonev::class, 'jenis_id', 'jenis_id');
} }
} }
...@@ -4,13 +4,13 @@ namespace App\Models; ...@@ -4,13 +4,13 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class PenilaianMonev extends Model class JenisMonev extends Model
{ {
protected $table = 'penilaian_monev'; protected $table = 'jenis_monev';
protected $primaryKey = 'penilaian_monev_id'; protected $primaryKey = 'jenis_monev_id';
public $incrementing = false; public $incrementing = false;
protected $fillable = [ protected $fillable = [
'penilaian_monev_id', 'jenis_id', 'nama', 'bobot' 'jenis_monev_id', 'nama', 'keterangan', 'urut', 'status_hapus'
]; ];
} }
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class JenisPenilaianMonev extends Model
{
protected $table = 'jenis_penilaian_monev';
protected $primaryKey = 'jenis_penilaian_monev_id';
public $incrementing = false;
protected $fillable = [
'jenis_penilaian_monev_id', 'jenis_id', 'nama', 'bobot'
];
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Reviewer extends Model
{
protected $table = 'reviewer';
protected $primaryKey = 'reviewer_id';
public $incrementing = false;
protected $fillable = [
'reviewer_id', 'periode_id', 'jenis_monev_id', 'id_sdm', 'nama', 'nidn', 'fakultas', 'prodi', 'status_hapus', 'created_user', 'updated_user'
];
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ReviewerProposal extends Model
{
protected $table = 'reviewer_proposal';
protected $primaryKey = 'reviewer_proposal_id';
public $incrementing = false;
protected $keyType = 'string';
protected $fillable = [
'reviewer_proposal_id', 'proposal_id', 'reviewer_id', 'status_administrasi', 'komentar', 'urut', 'created_user', 'updated_user'
];
public function rReviewerProposalDetil()
{
return $this->hasMany(\App\Models\ReviewerProposalDetil::class, 'reviewer_proposal_id', 'reviewer_proposal_id');
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ReviewerProposalDetil extends Model
{
protected $table = 'reviewer_proposal_detil';
protected $primaryKey = 'reviewer_proposal_detil_id';
public $incrementing = false;
protected $fillable = [
'reviewer_proposal_detil_id', 'reviewer_proposal_id', 'jenis_penilaian_monev_id', 'skor', 'created_user', 'updated_user'
];
}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"php": "^7.3", "php": "^7.3",
"fideloper/proxy": "^4.2", "fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0", "fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1", "guzzlehttp/guzzle": "^7.4",
"laravel/framework": "^8.0", "laravel/framework": "^8.0",
"laravel/tinker": "^2.0", "laravel/tinker": "^2.0",
"laravelcollective/html": "^6.3", "laravelcollective/html": "^6.3",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "5aae18a12609b60b15550982e9f3cf1d", "content-hash": "f44f5359fcbdea90cd39214ced391c79",
"packages": [ "packages": [
{ {
"name": "asm89/stack-cors", "name": "asm89/stack-cors",
......
...@@ -233,6 +233,7 @@ return [ ...@@ -233,6 +233,7 @@ return [
'Form' => Collective\Html\FormFacade::class, 'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class, 'Html' => Collective\Html\HtmlFacade::class,
'Alert' => RealRashid\SweetAlert\Facades\Alert::class, 'Alert' => RealRashid\SweetAlert\Facades\Alert::class,
'Carbon' => 'Carbon\Carbon',
], ],
]; ];
$('.modal').on('shown.bs.modal',function(){ //correct here use 'shown.bs.modal' event which comes in bootstrap3
$(this).find('iframe').attr('src','http://www.google.com')
})
.daterangepicker {
position: absolute;
color: inherit;
background-color: #fff;
border-radius: 4px;
width: 278px;
padding: 4px;
margin-top: 1px;
top: 100px;
left: 20px;
/* Calendars */ }
.daterangepicker:before, .daterangepicker:after {
position: absolute;
display: inline-block;
border-bottom-color: rgba(0, 0, 0, 0.2);
content: ''; }
.daterangepicker:before {
top: -7px;
border-right: 7px solid transparent;
border-left: 7px solid transparent;
border-bottom: 7px solid #ccc; }
.daterangepicker:after {
top: -6px;
border-right: 6px solid transparent;
border-bottom: 6px solid #fff;
border-left: 6px solid transparent; }
.daterangepicker.opensleft:before {
right: 9px; }
.daterangepicker.opensleft:after {
right: 10px; }
.daterangepicker.openscenter:before {
left: 0;
right: 0;
width: 0;
margin-left: auto;
margin-right: auto; }
.daterangepicker.openscenter:after {
left: 0;
right: 0;
width: 0;
margin-left: auto;
margin-right: auto; }
.daterangepicker.opensright:before {
left: 9px; }
.daterangepicker.opensright:after {
left: 10px; }
.daterangepicker.dropup {
margin-top: -5px; }
.daterangepicker.dropup:before {
top: initial;
bottom: -7px;
border-bottom: initial;
border-top: 7px solid #ccc; }
.daterangepicker.dropup:after {
top: initial;
bottom: -6px;
border-bottom: initial;
border-top: 6px solid #fff; }
.daterangepicker.dropdown-menu {
max-width: none;
z-index: 3001; }
.daterangepicker.single .ranges, .daterangepicker.single .calendar {
float: none; }
.daterangepicker.show-calendar .calendar {
display: block; }
.daterangepicker .calendar {
display: none;
max-width: 270px;
margin: 4px; }
.daterangepicker .calendar.single .calendar-table {
border: none; }
.daterangepicker .calendar th, .daterangepicker .calendar td {
white-space: nowrap;
text-align: center;
min-width: 32px; }
.daterangepicker .calendar-table {
border: 1px solid #fff;
padding: 4px;
border-radius: 4px;
background-color: #fff; }
.daterangepicker table {
width: 100%;
margin: 0; }
.daterangepicker td, .daterangepicker th {
text-align: center;
width: 20px;
height: 20px;
border-radius: 4px;
border: 1px solid transparent;
white-space: nowrap;
cursor: pointer; }
.daterangepicker td.available:hover, .daterangepicker th.available:hover {
background-color: #eee;
border-color: transparent;
color: inherit; }
.daterangepicker td.week, .daterangepicker th.week {
font-size: 80%;
color: #ccc; }
.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
background-color: #fff;
border-color: transparent;
color: #999; }
.daterangepicker td.in-range {
background-color: #ebf4f8;
border-color: transparent;
color: #000;
border-radius: 0; }
.daterangepicker td.start-date {
border-radius: 4px 0 0 4px; }
.daterangepicker td.end-date {
border-radius: 0 4px 4px 0; }
.daterangepicker td.start-date.end-date {
border-radius: 4px; }
.daterangepicker td.active, .daterangepicker td.active:hover {
background-color: #357ebd;
border-color: transparent;
color: #fff; }
.daterangepicker th.month {
width: auto; }
.daterangepicker td.disabled, .daterangepicker option.disabled {
color: #999;
cursor: not-allowed;
text-decoration: line-through; }
.daterangepicker select.monthselect, .daterangepicker select.yearselect {
font-size: 12px;
padding: 1px;
height: auto;
margin: 0;
cursor: default; }
.daterangepicker select.monthselect {
margin-right: 2%;
width: 56%; }
.daterangepicker select.yearselect {
width: 40%; }
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
width: 50px;
margin-bottom: 0; }
.daterangepicker .input-mini {
border: 1px solid #ccc;
border-radius: 4px;
color: #555;
height: 30px;
line-height: 30px;
display: block;
vertical-align: middle;
margin: 0 0 5px 0;
padding: 0 6px 0 28px;
width: 100%; }
.daterangepicker .input-mini.active {
border: 1px solid #08c;
border-radius: 4px; }
.daterangepicker .daterangepicker_input {
position: relative; }
.daterangepicker .daterangepicker_input i {
position: absolute;
left: 8px;
top: 8px; }
.daterangepicker.rtl .input-mini {
padding-right: 28px;
padding-left: 6px; }
.daterangepicker.rtl .daterangepicker_input i {
left: auto;
right: 8px; }
.daterangepicker .calendar-time {
text-align: center;
margin: 5px auto;
line-height: 30px;
position: relative;
padding-left: 28px; }
.daterangepicker .calendar-time select.disabled {
color: #ccc;
cursor: not-allowed; }
.ranges {
font-size: 11px;
float: none;
margin: 4px;
text-align: left; }
.ranges ul {
list-style: none;
margin: 0 auto;
padding: 0;
width: 100%; }
.ranges li {
font-size: 13px;
background-color: #f5f5f5;
border: 1px solid #f5f5f5;
border-radius: 4px;
color: #08c;
padding: 3px 12px;
margin-bottom: 8px;
cursor: pointer; }
.ranges li:hover {
background-color: #08c;
border: 1px solid #08c;
color: #fff; }
.ranges li.active {
background-color: #08c;
border: 1px solid #08c;
color: #fff; }
/* Larger Screen Styling */
@media (min-width: 564px) {
.daterangepicker {
width: auto; }
.daterangepicker .ranges ul {
width: 160px; }
.daterangepicker.single .ranges ul {
width: 100%; }
.daterangepicker.single .calendar.left {
clear: none; }
.daterangepicker.single.ltr .ranges, .daterangepicker.single.ltr .calendar {
float: left; }
.daterangepicker.single.rtl .ranges, .daterangepicker.single.rtl .calendar {
float: right; }
.daterangepicker.ltr {
direction: ltr;
text-align: left; }
.daterangepicker.ltr .calendar.left {
clear: left;
margin-right: 0; }
.daterangepicker.ltr .calendar.left .calendar-table {
border-right: none;
border-top-right-radius: 0;
border-bottom-right-radius: 0; }
.daterangepicker.ltr .calendar.right {
margin-left: 0; }
.daterangepicker.ltr .calendar.right .calendar-table {
border-left: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0; }
.daterangepicker.ltr .left .daterangepicker_input {
padding-right: 12px; }
.daterangepicker.ltr .calendar.left .calendar-table {
padding-right: 12px; }
.daterangepicker.ltr .ranges, .daterangepicker.ltr .calendar {
float: left; }
.daterangepicker.rtl {
direction: rtl;
text-align: right; }
.daterangepicker.rtl .calendar.left {
clear: right;
margin-left: 0; }
.daterangepicker.rtl .calendar.left .calendar-table {
border-left: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0; }
.daterangepicker.rtl .calendar.right {
margin-right: 0; }
.daterangepicker.rtl .calendar.right .calendar-table {
border-right: none;
border-top-right-radius: 0;
border-bottom-right-radius: 0; }
.daterangepicker.rtl .left .daterangepicker_input {
padding-left: 12px; }
.daterangepicker.rtl .calendar.left .calendar-table {
padding-left: 12px; }
.daterangepicker.rtl .ranges, .daterangepicker.rtl .calendar {
text-align: right;
float: right; } }
@media (min-width: 730px) {
.daterangepicker .ranges {
width: auto; }
.daterangepicker.ltr .ranges {
float: left; }
.daterangepicker.rtl .ranges {
float: right; }
.daterangepicker .calendar.left {
clear: none !important; } }
@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 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('getDaftarProposal')}}"
},
columns: [
{ data: 'reviewer_proposal_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("/seleksi_internal_proposal")}}',
type:'POST',
data:{
"_token": "{{ csrf_token() }}",
"urut": urut,
"data": isi,
},
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("/seleksi_internal_proposal/")}}',
type:'POST',
data:{
"_token": "{{ csrf_token() }}",
"reqId" : response.id,
"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');
});
});
</script>
@endsection
@extends('layouts.master') @extends('layouts.master')
@section('title') @section('title')
Dashboard Dashboard
@endsection @endsection
@section('header') @section('header')
...@@ -11,74 +11,111 @@ ...@@ -11,74 +11,111 @@
@endsection @endsection
@section('contents') @section('contents')
<!-- start page title --> <!-- start page title -->
<div class="page-title-box"> <div class="page-title-box">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-md-8"> <div class="col-md-8">
<h6 class="page-title">{!! $title !!}</h6> <h6 class="page-title">{!! $title !!}</h6>
<ol class="breadcrumb m-0"> <ol class="breadcrumb m-0">
<li class="breadcrumb-item">Setting</li> <li class="breadcrumb-item">Setting</li>
<li class="breadcrumb-item">{!! $title !!}</li> <li class="breadcrumb-item">{!! $title !!}</li>
</ol> </ol>
</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">
<button class="btn btn-primary waves-effect waves-light"> <i class="fas fa-plus-circle"></i> Edit Jadwal</button> <a href="javascript:void(0)" class="btn btn-success waves-effect waves-light" id="btnSimpan"
</div> style="display: none" onclick="submitForm()">Simpan Jadwal <i class="fas fa-check-circle"></i></a>
<button class="btn btn-primary waves-effect waves-light" id="btnEdit"> <i
class="fas fa-plus-circle"></i> Edit
Jadwal</button>
</div> </div>
</div> </div>
</div> </div>
<!-- end page title --> </div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
{!! Form::open(array('url' => route('jadwal_kegiatan.store'), 'method' => 'POST', 'id' => 'ff', 'class'
=>
'form-horizontal')) !!}
{!! csrf_field() !!}
<table id="example" class="table table-bordered dt-responsive nowrap"
style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<div class="row"> <thead>
<div class="col-12"> <tr>
<div class="card"> <th>Nama Kegiatan</th>
<div class="card-body"> <th style="text-align: center">Tanggal Mulai</th>
<table id="example" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;"> <th style="text-align: center">Tanggal Selesai</th>
</tr>
</thead>
<tbody>
@foreach ($data['jadwal_kegiatan'] as $item => $val)
@php
$tgl_awal = Carbon::parse($val->tanggal_mulai)->format('d-m-Y H:i')?:'';
$tgl_akhir = Carbon::parse($val->tanggal_selesai)->format('d-m-Y H:i')?:'';
<thead> $tgl = $tgl_awal.' - '.$tgl_akhir;
<tr> @endphp
<th>Nama Kegiatan</th> <tr>
<th>Tanggal Mulai</th> <td>{{ $val->nama }}</td>
<th>Tanggal Selesai</th> <td colspan="2">
</tr> <div class="input-group" id="reqView">
</thead> <input class="form-control" name="viewStart" type="text"
<tbody> value="{{ $tgl_awal }}" readonly>
@foreach ($data['jadwal_kegiatan'] as $item => $val) <input class="form-control" name="viewEnd" type="text"
<tr> value="{{ $tgl_akhir }}" readonly>
<td>{{ $val->nama }}</td> </div>
<td> <div class="input-group" id="reqEdit" style="display: none">
<div class="input-group"> <input type="text" class="form-control" name="tanggal[{{ $val->jadwal_kegiatan_id }}]" value="{{ $tgl }}" />
<input type="text" class="form-control" placeholder="dd-mm-yyyy" <span class="input-group-text"><i class="mdi mdi-calendar"></i></span>
data-date-format="dd-mm-yyyy" data-date-container='#datepicker2' data-provide="datepicker" </div>
data-date-autoclose="true"> </td>
<span class="input-group-text"><i class="mdi mdi-calendar"></i></span> </tr>
</div> @endforeach
</td> </tbody>
<td> </table>
<div class="input-group">
<input type="text" class="form-control" placeholder="dd-mm-yyyy"
data-date-format="dd-mm-yyyy" data-date-container='#datepicker2' data-provide="datepicker"
data-date-autoclose="true">
<span class="input-group-text"><i class="mdi mdi-calendar"></i></span>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div> <button type="submit" class="btn btn-primary waves-effect waves-light me-1" style="display: none"
id="btnSubmit">
Submit
</button>
</form>
</div> </div>
</div> <!-- end col --> </div>
</div> <!-- end row --> </div> <!-- end col -->
</div> <!-- end row -->
@endsection @endsection
@section('js') @section('js')
<script> <script type="text/javascript">
$(function() {
$('input[name^="tanggal"]').daterangepicker({
timePicker: true,
timePicker24Hour: true,
locale: {
format: 'DD-MM-YYYY HH:mm'
}
});
});
$( "#btnEdit" ).click(function() {
$("[id^='reqEdit']").show();
$("[id^='reqView']").hide();
$( "#btnSimpan" ).show();
$( "#btnEdit" ).hide();
});
function submitForm()
{
$('#btnSubmit').click();
}
</script> </script>
@endsection @endsection
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@php @php
$jenis = $data['jenis']['0']; $jenis = $data['jenis']['0'];
$id = $jenis->jenis_id; $id = $jenis->jenis_id;
$penilaian_monev = $data['penilaian_monev']; $jenis_penilaian_monev = $data['jenis_penilaian_monev'];
@endphp @endphp
@section('contents') @section('contents')
...@@ -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('penilaian_monev') }}">Penilaian Monev Internal</a></li> <li class="breadcrumb-item"><a href="{{ URL::to('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' => ['penilaian_monev.update', $id], 'method'=>'patch', 'class'=>'form-horizontal']) !!} {!! Form::model($jenis, ['route' => ['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>
...@@ -63,8 +63,8 @@ ...@@ -63,8 +63,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@if(count($penilaian_monev) > 0) @if(count($jenis_penilaian_monev) > 0)
@foreach ($penilaian_monev as $key => $val) @foreach ($jenis_penilaian_monev as $key => $val)
<tr> <tr>
<td> <td>
<input type="text" class="form-control" name="nama[]" required value="{{ $val->nama }}"> <input type="text" class="form-control" name="nama[]" required value="{{ $val->nama }}">
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
function createRow() function createRow()
{ {
$(function () { $(function () {
$.get("{{URL::to('rowPenilaianMonev')}}", function (data) { $.get("{{URL::to('rowJenisPenilaianMonev')}}", function (data) {
$("#tbData").append(data); $("#tbData").append(data);
}); });
}); });
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
processing: true, processing: true,
serverSide: true, serverSide: true,
ajax: { ajax: {
"url" : "{{route('getPenilaianMonev')}}" "url" : "{{route('getJenisPenilaianMonev')}}"
}, },
columns: [ columns: [
{ data: 'jenis_id' }, { data: 'jenis_id' },
...@@ -84,100 +84,5 @@ ...@@ -84,100 +84,5 @@
] ]
}); });
}); });
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("/jenis/")}}/' +reqId,
type:'DELETE',
data:{
"_token": "{{ csrf_token() }}",
},
dataType: "JSON",
})
.done(function(response){
swal.fire('Deleted!', 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');
}
})
}
// }).then(function(t) {
// t.value ? Swal.fire({
// icon: "success",
// title: "Sukses!",
// text: "Data berhasil dihapus.",
// type: "success"
// }) : t.dismiss === Swal.DismissReason.cancel && Swal.fire({
// icon: "error",
// title: "Batal!",
// text: "Data batal dihapus.",
// type: "error"
// })
// });
// }
// function confirmDelete(reqId) {
// swal({
// title: "Apakah Anda Yakin?",
// text: "Anda akan menghapus data ini!",
// icon: "warning",
// buttons: true,
// dangerMode: true,
// })
// .then((willDelete) => {
// if (willDelete) {
// $.ajax({
// type:'DELETE',
// url:'{{url("/jenis/")}}/' +reqId,
// data:{
// "_token": "{{ csrf_token() }}",
// },
// dataType: "JSON",
// success: function (result) {
// // console.log(result);
// swal("Sukses!", "Data berhasil dihapus.", "success").then(function(){
// location.reload();
// });
// },
// error: function (xhr, ajaxOptions, thrownError) {
// swal("Error!", "Data gagal dihapus.", "error").then(function(){
// location.reload();
// });
// }
// });
// // document.location.reload();
// } else {
// swal("Data batal dihapus.", {
// icon: "error",
// });
// }
// });
// };
</script> </script>
@endsection @endsection
@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 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('getReviewer')}}"
},
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('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("/seleksi_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'],
},
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("/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
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Dashboard | Veltrix - Admin & Dashboard Template</title> <title>Dashboard | Veltrix - Admin & Dashboard Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="Premium Multipurpose Admin & Dashboard Template" name="description"> <meta content="Premium Multipurpose Admin & Dashboard Template" name="description">
<meta content="Themesbrand" name="author"> <meta content="Themesbrand" name="author">
<!-- App favicon --> <!-- App favicon -->
<link rel="shortcut icon" href="{{ asset('theme/images/favicon.ico') }}"> <link rel="shortcut icon" href="{{ asset('theme/images/favicon.ico') }}">
<link href="{{ asset('theme/libs/chartist/chartist.min.css') }}" rel="stylesheet"> <link href="{{ asset('theme/libs/chartist/chartist.min.css') }}" rel="stylesheet">
<!-- DataTables --> <!-- DataTables -->
<link href="{{ asset('theme/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css') }}" rel="stylesheet" type="text/css"> <link href="{{ asset('theme/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css') }}" rel="stylesheet"
<link href="{{ asset('theme/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css') }}" rel="stylesheet" type="text/css"> type="text/css">
<link href="{{ asset('theme/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css') }}" rel="stylesheet"
type="text/css">
<!-- Responsive datatable examples --> <!-- Responsive datatable examples -->
<link href="{{ asset('theme/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css') }}" rel="stylesheet" type="text/css"> <link href="{{ asset('theme/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css') }}"
rel="stylesheet" type="text/css">
<!-- Bootstrap Css --> <!-- Bootstrap Css -->
<link href="{{ asset('theme/css/bootstrap.min.css') }}" id="bootstrap-style" rel="stylesheet" type="text/css"> <link href="{{ asset('theme/css/bootstrap.min.css') }}" id="bootstrap-style" rel="stylesheet" type="text/css">
<!-- Icons Css --> <!-- Icons Css -->
<link href="{{ asset('theme/css/icons.min.css') }}" rel="stylesheet" type="text/css"> <link href="{{ asset('theme/css/icons.min.css') }}" rel="stylesheet" type="text/css">
<!-- App Css--> <!-- App Css-->
<link href="{{ asset('theme/css/app.min.css') }}" id="app-style" rel="stylesheet" type="text/css"> <link href="{{ asset('theme/css/app.min.css') }}" id="app-style" rel="stylesheet" type="text/css">
<!-- Sweet Alert--> <!-- Sweet Alert-->
<link href="{{ asset('theme/libs/sweetalert2/sweetalert2.min.css') }}" rel="stylesheet" type="text/css" /> <link href="{{ asset('theme/libs/sweetalert2/sweetalert2.min.css') }}" rel="stylesheet" type="text/css" />
</head> <!-- Daterangepicker-->
<link rel="stylesheet" type="text/css" href="{{ asset('theme/libs/bootstrap-daterangepicker/daterangepicker.css') }}" />
<link href="{{ asset('theme/libs/select2/css/select2.min.css') }}" rel="stylesheet" type="text/css">
</head>
...@@ -2,58 +2,55 @@ ...@@ -2,58 +2,55 @@
var globalUrl = "{{ asset('') }}"; var globalUrl = "{{ asset('') }}";
</script> </script>
<!-- JAVASCRIPT --> <!-- JAVASCRIPT -->
<script src="{{ asset('theme/libs/jquery/jquery.min.js') }}"></script> <script src="{{ asset('theme/libs/jquery/jquery.min.js') }}"></script>
<script src="{{ asset('theme/libs/bootstrap/js/bootstrap.bundle.min.js') }}"></script> <script src="{{ asset('theme/libs/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('theme/libs/metismenu/metisMenu.min.js') }}"></script> <script src="{{ asset('theme/libs/metismenu/metisMenu.min.js') }}"></script>
<script src="{{ asset('theme/libs/simplebar/simplebar.min.js') }}"></script> <script src="{{ asset('theme/libs/simplebar/simplebar.min.js') }}"></script>
<script src="{{ asset('theme/libs/node-waves/waves.min.js') }}"></script> <script src="{{ asset('theme/libs/node-waves/waves.min.js') }}"></script>
<!-- Peity chart--> <!-- Peity chart-->
<script src="{{ asset('theme/libs/peity/jquery.peity.min.js') }}"></script> <script src="{{ asset('theme/libs/peity/jquery.peity.min.js') }}"></script>
<!-- Plugin Js--> <!-- Plugin Js-->
<script src="{{ asset('theme/libs/chartist/chartist.min.js') }}"></script> <script src="{{ asset('theme/libs/chartist/chartist.min.js') }}"></script>
{{-- <script src="{{ asset('theme/libs/chartist-plugin-tooltips/chartist-plugin-tooltip.min.js') }}"></script> --}} {{-- <script src="{{ asset('theme/libs/chartist-plugin-tooltips/chartist-plugin-tooltip.min.js') }}"></script> --}}
{{-- <script src="{{ asset('theme/js/pages/dashboard.init.js') }}"></script> --}} {{-- <script src="{{ asset('theme/js/pages/dashboard.init.js') }}"></script> --}}
<script src="{{ asset('theme/js/app.js') }}"></script> <script src="{{ asset('theme/js/app.js') }}"></script>
<!-- Required datatable js --> <!-- Required datatable js -->
<script src="{{ asset('theme/libs/datatables.net/js/jquery.dataTables.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net/js/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('theme/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js') }}"></script>
<!-- Buttons examples --> <!-- Buttons examples -->
<script src="{{ asset('theme/libs/datatables.net-buttons/js/dataTables.buttons.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-buttons/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('theme/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js') }}"></script>
<script src="{{ asset('theme/libs/jszip/jszip.min.js') }}"></script> <script src="{{ asset('theme/libs/jszip/jszip.min.js') }}"></script>
<script src="{{ asset('theme/libs/pdfmake/build/pdfmake.min.js') }}"></script> <script src="{{ asset('theme/libs/pdfmake/build/pdfmake.min.js') }}"></script>
<script src="{{ asset('theme/libs/pdfmake/build/vfs_fonts.js') }}"></script> <script src="{{ asset('theme/libs/pdfmake/build/vfs_fonts.js') }}"></script>
<script src="{{ asset('theme/libs/datatables.net-buttons/js/buttons.html5.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-buttons/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('theme/libs/datatables.net-buttons/js/buttons.print.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-buttons/js/buttons.print.min.js') }}"></script>
<script src="{{ asset('theme/libs/datatables.net-buttons/js/buttons.colVis.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-buttons/js/buttons.colVis.min.js') }}"></script>
<!-- Responsive examples --> <!-- Responsive examples -->
<script src="{{ asset('theme/libs/datatables.net-responsive/js/dataTables.responsive.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-responsive/js/dataTables.responsive.min.js') }}"></script>
<script src="{{ asset('theme/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js') }}"></script> <script src="{{ asset('theme/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js') }}"></script>
{{-- <script src="{{ asset('theme/js/sweetalert.min.js') }}"></script> --}} {{-- <script src="{{ asset('theme/js/sweetalert.min.js') }}"></script> --}}
<script src="{{ asset('theme/libs/sweetalert2/sweetalert2.min.js') }}"></script> <script src="{{ asset('theme/libs/sweetalert2/sweetalert2.min.js') }}"></script>
<script src="{{ asset('theme/libs/inputmask/min/jquery.inputmask.bundle.min.js') }}"></script> <script src="{{ asset('theme/libs/inputmask/min/jquery.inputmask.bundle.min.js') }}"></script>
<script src="{{ asset('theme/libs/bootstrap-maxlength/bootstrap-maxlength.min.js') }}"></script> <script src="{{ asset('theme/libs/bootstrap-maxlength/bootstrap-maxlength.min.js') }}"></script>
<script src="{{ asset('theme/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js') }}"></script> <script type="text/javascript" src="{{ asset('theme/libs/bootstrap-daterangepicker/moment.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('theme/libs/bootstrap-daterangepicker/daterangepicker.js') }}"></script>
@php
/* <script src="{{ asset('theme/libs/select2/js/select2.min.js') }}"></script>
@endphp
<script src="{{ asset('theme/js/eModal.js') }}"></script> {{-- <script type="text/javascript" src="{{ asset('theme/js/eModal.js') }}"></script> --}}
<script> {{-- <script>
function openPopup(linkUrl) { function openPopup(linkUrl) {
eModal.iframe(linkUrl, 'Program Kreativitas Mahasiswa') eModal.alert(linkUrl);
} eModal.iframe(linkUrl, 'Program Kreativitas Mahasiswa');
</script> }
@php </script> --}}
*/ @yield('js')
@endphp @include('sweetalert::alert')
@yield('js')
@include('sweetalert::alert')
...@@ -8,25 +8,36 @@ ...@@ -8,25 +8,36 @@
<ul class="metismenu list-unstyled" id="side-menu"> <ul class="metismenu list-unstyled" id="side-menu">
<li class="menu-title">Setting</li> <li class="menu-title">Setting</li>
<li class="{{ (request()->is('jenis*')) ? 'mm-active' : '' }}"> <li class="{{ (request()->is('jenis/*')) ? 'mm-active' : '' }}">
<a href="{{ URL::to('jenis') }}" class="waves-effect"> <a href="{{ URL::to('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('penilaian_monev*')) ? 'mm-active' : '' }}"> <li class="{{ (request()->is('jenis_penilaian_monev/*')) ? 'mm-active' : '' }}">
<a href="{{ URL::to('penilaian_monev') }}" class="waves-effect"> <a href="{{ URL::to('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('jadwal_kegiatan/*')) ? 'mm-active' : '' }}">
<a href="{{ URL::to('jadwal_kegiatan') }}" class="waves-effect"> <a href="{{ URL::to('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>
</li> </li>
<li class="{{ (request()->is('seleksi_internal*')) ? 'mm-active' : '' }}">
<a href="javascript: void(0);" class="has-arrow waves-effect">
<i class="ti-home"></i>
<span>Seleksi Internal</span>
</a>
<ul class="sub-menu" aria-expanded="false">
<li><a href="{{ URL::to('seleksi_internal_reviewer') }}">Reviewer</a></li>
<li><a href="{{ URL::to('seleksi_internal_proposal') }}">Daftar Proposal</a></li>
</ul>
</li>
<li> <li>
<a href="calendar.html" class=" waves-effect"> <a href="calendar.html" class=" waves-effect">
<i class="ti-calendar"></i> <i class="ti-calendar"></i>
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use App\Http\Controllers\JenisController; use App\Http\Controllers\JenisController;
use App\Http\Controllers\PenilaianMonevController; use App\Http\Controllers\ReviewerController;
use App\Http\Controllers\DaftarProposalController;
use App\Http\Controllers\JadwalKegiatanController; use App\Http\Controllers\JadwalKegiatanController;
use App\Http\Controllers\JenisPenilaianMonevController;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -22,11 +24,17 @@ Route::get('/', function () { ...@@ -22,11 +24,17 @@ Route::get('/', function () {
Route::resource('jenis', JenisController::class); Route::resource('jenis', JenisController::class);
Route::get('getJenis', [JenisController::class, 'getData'])->name('getJenis'); Route::get('getJenis', [JenisController::class, 'getData'])->name('getJenis');
Route::resource('penilaian_monev', PenilaianMonevController::class); Route::resource('jenis_penilaian_monev', JenisPenilaianMonevController::class);
Route::get('getPenilaianMonev', [PenilaianMonevController::class, 'getData'])->name('getPenilaianMonev'); Route::get('getJenisPenilaianMonev', [JenisPenilaianMonevController::class, 'getData'])->name('getJenisPenilaianMonev');
Route::get('rowPenilaianMonev', function () { Route::get('rowJenisPenilaianMonev', function () {
return view('backend/penilaian_monev/row'); return view('backend/jenis_penilaian_monev/row');
}); });
Route::resource('jadwal_kegiatan', JadwalKegiatanController::class); Route::resource('jadwal_kegiatan', JadwalKegiatanController::class);
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('getDaftarProposal', [DaftarProposalController::class, 'getData'])->name('getDaftarProposal');
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