Commit 40b7e7c7 by Farendi Giotivano R.P

tambahan

parent 3d359ced
......@@ -33,6 +33,7 @@ class KelompokController extends Controller
$kelompok = Kelompok::with(['rAnggota'])
->where('nidn_dosen', $bio->noidentitas)
->where('kirim', '1')
->whereYear('created_at', $year)
->orderBy('kode')
->get();
......
......@@ -50,6 +50,16 @@ class LuaranController extends Controller
$proposal = Proposal::with(['rPeriode'])->find($luaran['proposal_id']);
$this->validate($request,
[
'file' => 'required|mimes:pdf|max:5000'
], [
'file.required' => 'Tidak ada file yang di upload',
'file.mimes' => 'File harus pdf',
'file.max' => 'File tidak boleh lebih dari 5 mb',
]);
$file_nama = $proposal->rPeriode->nama.'_'.$proposal->proposal_id.'_'.$luaran['jenis_luaran'].'.'.$luaran['file']->getClientOriginalExtension();
Storage::disk('static')->put('simpkm/luaran/'.$luaran['jenis_luaran'].'/'.$file_nama, file_get_contents($luaran['file']->getRealPath()));
......
......@@ -107,6 +107,15 @@ class MonevController extends Controller
//
$pro = $request->except('_token');
$this->validate($request,
[
'file' => 'required|mimes:pdf|max:5000'
], [
'file.required' => 'Tidak ada file yang di upload',
'file.mimes' => 'File harus pdf',
'file.max' => 'File tidak boleh lebih dari 5 mb',
]);
$proposal = MonevInternal::with(['rProposal'])->find($pro['monev_id']);
$file_nama = $proposal->rProposal->rPeriode->nama.'_'.$proposal->rProposal->proposal_id.'.'.$pro['file']->getClientOriginalExtension();
......
......@@ -70,7 +70,7 @@ class ProposalController extends Controller
$kelompok = Kelompok::where('created_user', auth()->user()->id)
->where('periode_id', $periode->periode_id)
->where('status', '0')
->where('kirim', '1')
->first();
if(is_null($kelompok)){
......@@ -101,6 +101,15 @@ class ProposalController extends Controller
//
$proposal = $request->except('_token');
$this->validate($request,
[
'file' => 'required|mimes:pdf|max:5000'
], [
'file.required' => 'Tidak ada file yang di upload',
'file.mimes' => 'File harus pdf',
'file.max' => 'File tidak boleh lebih dari 5 mb',
]);
$periode = Periode::where('status', 1)->first();
$uuid = Str::uuid();
......@@ -171,10 +180,18 @@ class ProposalController extends Controller
{
//
$proposal = $request->except('_token');
// dd($proposal);
$this->validate($request,
[
'file' => 'mimes:pdf|max:5000'
], [
'file.mimes' => 'File harus pdf',
'file.max' => 'File tidak boleh lebih dari 5 mb',
]);
$pro = Proposal::with(['rPeriode'])->find($id);
if(is_null($proposal['file'])){
if(!isset($proposal['file'])){
$file_nama = $pro->upload_dokumen;
} else {
// Storage::disk('static')->delete('simpkm/proposal/'.$pro->rPeriode->nama.'/'.$pro->upload_dokumen);
......
......@@ -130,6 +130,15 @@ class SeleksiController extends Controller
//
$pro = $request->except('_token');
$this->validate($request,
[
'file' => 'required|mimes:pdf|max:5000'
], [
'file.required' => 'Tidak ada file yang di upload',
'file.mimes' => 'File harus pdf',
'file.max' => 'File tidak boleh lebih dari 5 mb',
]);
$proposal = Proposal::with(['rPeriode'])->find($pro['proposal_id']);
$file_nama = $proposal->rPeriode->nama.'_'.$proposal->proposal_id.'.'.$pro['file']->getClientOriginalExtension();
......
......@@ -54,7 +54,7 @@
</div>
</form>
<br>
<table id="datatable" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<table id="datatable" class="table table-bordered dt-responsive" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>No</th>
......
......@@ -96,6 +96,7 @@
<h5 class="font-size-16">Upload File : </h5>
<p>
<input type="file" name="file" class="form-control" id="input-file">
@if ($errors->has('file')) <span class="text-danger">{{ $errors->first('file') }}</span> @endif
</p>
<div class="col-12">
<h5 class="font-size-16">Keterangan : </h5>
......
......@@ -57,6 +57,7 @@
<div class="row mb-3" class="dropzone">
<label for="kode" class="col-sm-2 col-form-label">Upload Revisi 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%" src="" frameborder="0"></iframe>
</div>
......
......@@ -59,6 +59,7 @@
<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>
......
......@@ -55,6 +55,7 @@
<div class="row mb-3" class="dropzone">
<label for="kode" class="col-sm-2 col-form-label">Upload Revisi 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%" src="" frameborder="0"></iframe>
</div>
......
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