Commit a947814a by Farendi Giotivano R.P

tolak proposal dosen & seleksi internal

parent 0e1704c6
......@@ -121,4 +121,20 @@ class ProposalController extends Controller
'data' => $proposal
]);
}
public function tolak(Request $request)
{
$proId = $request->except('_token');
$proposal = Proposal::query()->find($proId['proposal_id']);
$proposal->status = 2;
$proposal->alasan_revisi = $proId['alasan_revisi'];
$proposal->save();
Alert::success('Berhasil ditolak');
return redirect()->route('dosen.proposal.index');
}
}
......@@ -102,7 +102,7 @@ class ProposalController extends Controller
'jenis' => $jenis,
'kelompok' => $kelompok,
'proposal' => $proposal,
'jadwal' => $jadwal,
'jadwal' => $jadwal
];
return view('backend.mahasiswa.proposal.create', $data);
......
......@@ -29,7 +29,7 @@ class SeleksiController extends Controller
$periode = Periode::query()->get();
$year = !is_null($request->year) ? $request->year : now()->year;
$proposal = Proposal::with(['rKelompok', 'rJenis', 'rNilai'])
$proposal = Proposal::with(['rKelompok', 'rJenis', 'rNilai', 'rDaftarPro'])
->whereHas('rKelompok', function ($query) use($nim){
$query->whereHas('rAnggota', function ($query) use($nim){
$query->where('nim', $nim);
......
<?php
namespace App\Http\Controllers\Operator;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PengumumanController extends Controller
{
public function index()
{
//
}
public function create()
{
//
}
public function store(Request $request)
{
//
}
public function show($id)
{
//
}
public function edit($id)
{
//
}
public function update(Request $request, $id)
{
//
}
public function destroy($id)
{
//
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Pengumuman extends Model
{
protected $table = 'pengumuman';
protected $primaryKey = 'id';
public $incrementing = false;
protected $fillable = [
'id', 'pengumuman', 'file', 'status', 'created_at', 'updated_at'
];
}
......@@ -88,6 +88,11 @@
<strong> Keterangan : </strong> <br>
Upload proposal pada : <h6 class="text-primary"> {{ $item->date_upload }} </h6>
Disetujui proposal pada : <h6 class="text-primary"> {{ $item->date_approval }} </h6>
@elseif($item->status == '2')
<span class="badge bg-danger">Ditolak Dosen</span> <br>
<strong> Keterangan : </strong> <br>
Upload proposal pada : <h6 class="text-primary"> {{ $item->date_upload }} </h6>
Komentar : <h6 class="text-primary"> {{ $item->alasan_revisi }} </h6>
@else
<span class="badge bg-warning">Menunggu Persetujuan Dosen</span> <br>
<strong> Keterangan : </strong> <br>
......@@ -101,7 +106,7 @@
@if($item->status == '0')
<a onclick="setuju('{{ encrypt($item->proposal_id) }}', 'row-{{ $token }}')" class="btn btn-success btn-sm"><i class="fas fa-check"></i> Setuju</a>
{{-- <a href="" id="editCompany" data-toggle="modal" data-target='#practice_modal' data-id="{{ encrypt($item->proposal_id) }}" class="btn btn-danger btn-sm">Tolak</a> --}}
<a href="" id="revPro" data-toggle="modal" data-target='#practice_modal' data-id="{{ encrypt($item->proposal_id) }}" class="btn btn-danger btn-sm"><i class="fas fa-times"></i> Tolak</a>
@endif
</div>
......@@ -140,15 +145,30 @@
</div>
</div>
<div class="modal fade" id="practice_modal">
<div class="modal-dialog">
<form id="companydata">
<div id="tolakPro" class="modal fade">
<div class="modal-dialog modal-xl">
<form id="companydata" action="{{ route('dosen.proposal.tolak') }}" method="POST">
@csrf
<div class="modal-content">
<input type="hidden" id="proposal_id" name="proposal_id" value="">
<div class="modal-header">
<h5 class="modal-title" id="lihatLabel">Detail Proposal </h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="text" name="judul" id="judul" value="" class="form-control">
<p>
<input type="hidden" id="proposal_id" name="proposal_id" value="">
<label for="kode" class="col-sm-8 col-form-label">Apakah yakin akan menolak proposal ?</label>
<div class="row mb-3">
<input class="form-control" type="text" id="judul" name="judul" disabled>
</div>
<div class="row mb-3">
<textarea id="textarea" name="alasan_revisi" class="form-control" maxlength="225" rows="3" placeholder="Alasan Revisi"></textarea>
</div>
<div class="col-sm-10">
<button type="submit" class="btn btn-danger waves-effect waves-light me-1"> Tolak </button>
</div>
</p>
</div>
<input type="submit" value="Submit" id="submit" class="btn btn-sm btn-outline-danger py-0" style="font-size: 0.8em;">
</div>
</form>
</div>
......@@ -230,7 +250,7 @@ function setuju(id, rowId){
});
$('body').on('click', '#editCompany', function (event) {
$('body').on('click', '#revPro', function (event) {
event.preventDefault();
var id = $(this).data('id');
......@@ -239,7 +259,7 @@ function setuju(id, rowId){
$('#userCrudModal').html("Edit category");
$('#submit').val("Edit category");
$('#practice_modal').modal('show');
$('#tolakPro').modal('show');
$('#proposal_id').val(data.data.proposal_id);
$('#judul').val(data.data.judul);
......
......@@ -89,6 +89,11 @@
<strong> Keterangan : </strong> <br>
Upload proposal pada : <h6 class="text-primary"> {{ $item->date_upload }} </h6>
Disetujui proposal pada : <h6 class="text-primary"> {{ $item->date_approval }} </h6>
@elseif($item->status == '2')
<span class="badge bg-danger">Ditolak Dosen</span>
<strong> Keterangan : </strong> <br>
Upload proposal pada : <h6 class="text-primary"> {{ $item->date_upload }} </h6>
Komentar : <h6 class="text-primary"> {{ $item->alasan_revisi }} </h6>
@else
<span class="badge bg-success">Sudah Disetujui Dosen</span>
<span class="badge bg-warning">Menunggu Persetujuan Dosen</span> <br>
......@@ -101,7 +106,7 @@
<td>
<button data-bs-toggle="modal" data-bs-target="{{ '#lihat'.$item->proposal_id }}" href="{{ URL::to('mahasiswa/kelompok-new', encrypt($item->proposal_id)) }}" class="btn btn-info btn-sm">Lihat</button>
@if(is_null($item->status))
@if(is_null($item->status) || $item->status == '2')
<a href="{{ URL::to('mahasiswa/proposal/'.encrypt($item->proposal_id).'/edit') }}" class="btn btn-warning btn-sm">Revisi</a>
<a onclick="hapus('{{ encrypt($item->proposal_id) }}', 'row-{{ $token }}')" class="btn btn-danger btn-sm">Hapus</a>
@endif
......
......@@ -78,7 +78,9 @@
<td>{{ $item->rJenis->nama }}</td>
<td>{{ $item->judul }}</td>
<td>
@if(is_null($item->status))
@if(is_null($item->rDaftarPro->status_final))
<span class="badge bg-info">Menunggu Reviewer</span>
@elseif($item->rDaftarPro->status_final == 1)
<span class="badge bg-danger">Lolos Seleksi Internal</span>
@else
<span class="badge bg-success">Tidak Lolos Seleksi Internal</span>
......
@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">Mahasiswa</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">
@if ($proposal)
{!! Form::model($proposal, ['route' => ['mahasiswa.proposal.update', $proposal->proposal_id], 'method'=>'patch', 'files' => 'true', 'enctype'=>'multipart/form-data']) !!}
@else
{{ Form::open(['url' => route('mahasiswa.proposal.store'), 'method' => 'post', 'id' => 'proposal', 'files' => 'true', 'enctype'=>'multipart/form-data']) }}
@endif
@csrf
<h4 class="card-title">{!! $title !!}</h4>
<p class="card-title-desc"></p>
<div class="row mb-3">
<label for="kode" class="col-sm-2 col-form-label">Judul</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="judul" name="judul" value="{{ $proposal ? $proposal->judul : '' }}"required>
<input class="form-control" type="hidden" id="kode_kelompok" name="kode_kelompok" value="{{ $proposal ? $proposal->kelompok_id : $kelompok->kelompok_id }}" >
<input class="form-control" type="hidden" id="periode_id" name="periode_id" value="{{ $proposal ? $proposal->periode_id : $periode->periode_id }}" >
</div>
</div>
<div class=" row mb-3">
<label class="col-sm-2 col-form-label">Jenis PKM</label>
<div class="col-sm-10">
<select class="form-select select2" name="jenis">
<option selected>Pilih Jenis</option>
@foreach($jenis as $item => $pkm)
<option value="{{ $item }}" {{ $proposal ? $proposal->jenis_id == $item ? 'selected' : '' : '' }}>{{ $pkm }}</option>
@endforeach
</select>
</div>
</div>
<div class="row mb-3" class="dropzone">
<label for="kode" class="col-sm-2 col-form-label">Upload Proposal</label>
<div class="col-sm-10">
@if ($errors->has('file')) <span class="text-danger">{{ $errors->first('file') }}</span> @endif
<input type="file" name="file" class="form-control" id="input-file">
<iframe id="view-pdf" width="80%" height="80%" frameborder="0" src="{{ $proposal ? 'https://statik.unesa.ac.id/simpkm/proposal/'.$proposal->rPeriode->nama.'/'.$proposal->upload_dokumen : '' }} "></iframe>
</div>
</div>
<div class="mb-0">
<div>
<button type="submit" class="btn btn-primary waves-effect waves-light me-1"> Submit </button>
<button type="reset" class="btn btn-secondary waves-effect"> Cancel </button>
</div>
</div>
{{ Form::close() }}
<br>
<h6 class="text-danger">* PASTIKAN FILE PROPOSAL SUDAH BENAR SEBELUM DISUBMIT</h6>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
@endsection
@section('js')
<script>
$(function(){
$('#input-file').change(function(){
var input = this;
var url = window.URL.createObjectURL(this.files[0]);
$('#view-pdf').attr('src',url);
$('#view-pdf').attr('height','500px');
})
})
</script>
@endsection
......@@ -17,6 +17,7 @@ use App\Http\Controllers\Reviewer\DaftarMonevController;
use App\Http\Controllers\Operator\UserExternalController;
use App\Http\Controllers\Operator\MonevProposalController;
use App\Http\Controllers\Operator\ReviewerMonevController;
use App\Http\Controllers\Operator\PengumumanController;
use App\Http\Controllers\Reviewer\DaftarSeleksiController;
use App\Http\Controllers\Operator\DaftarProposalController;
......@@ -126,6 +127,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::post('/proposal-setuju', [DosenProposal::class, 'setuju'])->name('proposal.setuju');
Route::get('/proposal-lihat', [DosenProposal::class, 'lihat'])->name('proposal.lihat');
Route::get('/proposal-approv/{id}', [DosenProposal::class, 'approve'])->name('proposal.approv');
Route::post('/proposal-tolak', [DosenProposal::class, 'tolak'])->name('proposal.tolak');
//seleksi
Route::resource('seleksi', DosenSeleksi::class);
......@@ -197,6 +199,8 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::resource('user-external', UserExternalController::class);
Route::resource('pengumuman', PengumumanController::class);
// cek email apakah sudah ada apa belum
Route::post('checkemail', [CheckController::class, 'email'])->name('checkemail');
Route::post('checknidn', [CheckController::class, 'nidn'])->name('checknidn');
......
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