Commit 9cf90b69 by Alfiro Pratama

Upload Laporan Magang Monev I

parent 69f3f68d
......@@ -69,8 +69,10 @@ class LuaranController extends Controller
'judul' => $luaran['judul'],
'jenis_luaran' => $luaran['jenis_luaran'],
'keterangan_luaran' => $luaran['keterangan_luaran'],
'kategori_luaran' => $luaran['jenis_luaran_lainnya'] === 'Lainnya' ? $luaran['jenis_luaran_lainnya'] : null,
'file_luaran' => $file_nama,
'created_user' => Auth::user()->id
'created_user' => Auth::user()->id,
'updated_user' => Auth::user()->id
]);
return redirect()->route('mahasiswa.luaran.show', encrypt($luaran['proposal_id']))->with('success', 'Proposal Berhasil ditambahkan');
......@@ -85,7 +87,7 @@ class LuaranController extends Controller
public function show($id)
{
//
$title = 'Proposal Luaran Mahasiswa';
$title = 'Unggah Laporan Magang Mahasiswa';
$proposal = Proposal::with(['rluaran', 'rPeriode'])->find(decrypt($id));
$data = [
......@@ -100,15 +102,18 @@ class LuaranController extends Controller
{
$pro = $request->except('_token');
$proposal = Proposal::query()->find(decrypt($pro['id']));
Storage::disk('static')->delete('simpmw/luaran/'.$proposal->jenis_luaran.'/'.$proposal->file_luaran);
$proposal->delete();
Alert::success('Berhasil dihapus');
return redirect()->route('mahasiswa.luaran.index');
// Dekripsi ID hanya sekali
$id = decrypt($pro['id']);
$proposal = ProposalLuaran::query()->find($id);
if ($proposal) {
Storage::disk('static')->delete('simpmw/luaran/'.$proposal->jenis_luaran.'/'.$proposal->file_luaran);
$proposal->delete();
return response()->json(['status' => 'success', 'message' => 'Berhasil dihapus']);
} else {
return response()->json(['status' => 'error', 'message' => 'Proposal tidak ditemukan']);
}
}
public function dosen($id)
......
......@@ -176,7 +176,7 @@ class DaftarProposalController extends Controller
$lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '1')";
$tidak_lolos = "confirmFinal('".Crypt::encrypt($proposal_id)."', '2')";
$batalkanNilai1 =
// $batalkanNilai1 =
$disable_1 = $disable_2 = '';
......
......@@ -39,7 +39,7 @@ class MonevProposalController extends Controller
];
$periode = Periode::query()->get();
$jenis = Jenis::query()->where('status_hapus', '0')->get();
return view('backend.operator.daftar_proposal.monev', compact('data', 'periode', 'jenis'))->withTitle('Daftar Proposal '.$jenis_monev->nama);
return view('backend.operator.daftar_proposal.monev', compact('data', 'periode', 'jenis', 'jenis_monev'))->withTitle('Daftar Proposal '.$jenis_monev->nama);
}
/* AJAX request */
......@@ -115,6 +115,7 @@ class MonevProposalController extends Controller
$kode = $record->kode;
$jenis_pkm = $record->jenis_pkm;
$judul = $record->judul;
$upload_dokumen = $record->upload_dokumen;
$dospem = "(".str_replace("###",") ",$record->identitas_dospem);
$status_administrasi_1 = $record->status_administrasi_1;
$status_administrasi_2 = $record->status_administrasi_2;
......@@ -124,6 +125,9 @@ class MonevProposalController extends Controller
$reviewer_id_2 = $record->reviewer_id_2;
$status_final = $record->status;
$rata = $record->rata;
$video = DaftarProposalMonev::where('proposal_id', $proposal_id)
->where('monev_internal_id', $monev_internal_id)
->pluck('url');
// $rata = ($nilai_1 + $nilai_2) / 2;
......@@ -189,9 +193,131 @@ class MonevProposalController extends Controller
$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>
<a href="#" class="btn btn-icon-sm btn-primary" data-toggle="tooltip" data-placement="top" title="Lihat Detail" data-bs-toggle="modal" data-bs-target="#proposalModal' . $proposal_id . '-' . $monev_internal_id . '"><i class="fas fa-search"></i></a>
</td>';
}
$aksi .= '
<div class="modal fade" id="proposalModal' . $proposal_id . '-' . $monev_internal_id . '" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Proposal</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table mb-0">
<tr>
<th>Judul Proposal</th>
<td>' . $judul . '</td>
</tr>
<tr>
<th>Kategori PMW</th>
<td>' . $jenis_pkm . '</td>
</tr>
<tr>
<th>Proposal</th>
<td>';
if ($upload_dokumen) {
$aksi .= '<a href="' . $url . '" target="_blank" class="btn btn-success btn-sm">
<i class="far fa-eye"></i> Lihat Proposal
</a>';
} else {
$aksi .= '<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert">
<strong>Informasi!</strong> File tidak ditemukan.
</div>';
}
$aksi .= '</td>
</tr>
<tr>
<th>Video Produk</th>
<td>';
foreach ($video as $item) {
if ($item&& preg_match('/(http|https|www.|\.com|\.co.id|\.org)/i', $item)) {
$aksi .= '<button id="preview-video' . $proposal_id . '" class="btn btn-success btn-sm" data-video="' . $item . '">
<i class="far fa-eye"></i> Lihat Video
</button>';
} else {
$aksi .= '<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert">
<strong>Informasi!</strong> File tidak ditemukan.
</div>';
}
}
$aksi .= '</td>
</tr>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>';
// JavaScript untuk membuka video dalam Magnific Popup
$aksi .= "
<script>
$(document).ready(function() {
$('#preview-video" . $proposal_id . "').on('click', function() {
var videoUrl = $(this).attr('data-video');
if (videoUrl) {
if (videoUrl.includes('youtu.be')) {
videoUrl = videoUrl.replace('youtu.be/', 'youtube.com/watch?v=');
}
if (videoUrl.includes('youtu.be')) {
videoUrl = videoUrl.split('?')[0];
} else if (videoUrl.includes('youtube.com/watch?v=')) {
videoUrl = videoUrl.split('&')[0];
}
if (isValidYouTubeUrl(videoUrl)) {
var currentModal = $('#proposalModal" . $proposal_id . "');
$.magnificPopup.open({
items: {
src: videoUrl
},
type: 'iframe',
iframe: {
markup: '<div class=\"mfp-iframe-scaler\">'+
'<div class=\"mfp-close\"></div>'+
'<iframe class=\"mfp-iframe\" frameborder=\"0\" allowfullscreen allow=\"autoplay\"></iframe>'+
'</div>'
},
callbacks: {
open: function() {
currentModal.modal('hide');
var iframe = this.content.find('iframe');
if (iframe.length > 0) {
var videoSrc = iframe.attr('src');
iframe.attr('src', videoSrc + '&autoplay=1');
}
},
close: function() {
currentModal.modal('show');
var iframe = this.content.find('iframe');
if (iframe.length > 0) {
var videoSrc = iframe.attr('src');
iframe.attr('src', videoSrc.replace('&autoplay=1', ''));
}
}
}
});
} else {
window.open(videoUrl, '_blank');
}
} else {
console.error('URL video tidak valid:', videoUrl);
}
});
function isValidYouTubeUrl(url) {
return /^(http(s)?:\\/\\/)?((w){3}.)?youtu(be|.be)?(\\.com)?\\/.+/gm.test(url);
}
});
</script>
";
$data_arr[] = array(
"monev_internal_id" => $monev_internal_id,
"kode" => $kode,
......
......@@ -12,7 +12,7 @@ class DaftarProposal extends Model
protected $keyType = 'string';
protected $fillable = [
'proposal_id', 'jenis_id', 'kode', 'jenis_pkm', 'judul', 'status', 'status_hapus', 'status_administrasi_1', 'status_administrasi_2', 'reviewer_id_1', 'reviewer_id_2', 'status_final', 'nidn_reviewer_id_1', 'nidn_reviewer_id_2', 'upload_dokumen', 'date_upload', 'date_approval', 'identitas_ketua', 'identitas_dospem', 'periode'
'proposal_id', 'jenis_id', 'kode', 'jenis_pkm', 'judul', 'status', 'status_hapus', 'status_administrasi_1', 'status_administrasi_2', 'reviewer_id_1', 'reviewer_id_2', 'status_final', 'nidn_reviewer_id_1', 'nidn_reviewer_id_2', 'upload_dokumen', 'date_upload', 'date_approval', 'identitas_ketua', 'identitas_dospem', 'periode', 'url'
];
public function rKelompokDetil()
......
......@@ -23,4 +23,9 @@ class DaftarProposalMonev extends Model
{
return $this->hasMany(\App\Models\KelompokDetail::class, 'kelompok_id', 'kelompok_id');
}
public function proposalUrl()
{
return $this->belongsTo(ProposalUrl::class, 'proposal_id', 'proposal_id');
}
}
......@@ -22,7 +22,7 @@ class ProposalLuaran extends Model
'proposal_id',
'judul',
'jenis_luaran',
'ketegori_luaran',
'kategori_luaran',
'keterangan_luaran',
'file_luaran',
'created_user',
......
@extends('layouts.master')
@section('title')
Dashboard
@endsection
@section('title', 'Dashboard')
@section('header')
<div class="page-title">
......@@ -11,159 +9,315 @@
@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"><a href="{{ url()->previous() }}">Monev Internal I</a></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 waves-effect waves-light" data-bs-toggle="modal" data-bs-target="#tmbhKel"><i class="fas fa-plus-circle me-2"></i> Tambah Data</button>
</div>
<!-- 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"><a href="{{ url()->previous() }}">Monev Internal I</a></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 waves-effect waves-light" data-bs-toggle="modal" data-bs-target="#tmbhKel"><i class="fas fa-plus-circle me-2"></i> Tambah Data</button>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table id="datatable" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr align="center" valign="middle">
<th>No</th>
<th>Jenis</th>
<th>Judul</th>
<th>File</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@if ($proposal->rLuaran->count())
@foreach ($proposal->rLuaran as $item)
@php $token = Str::random(30); @endphp
<tr id="row-{{ $token }}">
<td>{{ $loop->iteration }}</td>
<td>{{ $item->jenis_luaran }}</td>
<td>{{ $item->judul }}</td>
<td><a href="https://statik.unesa.ac.id/simpmw/luaran/{{ $item->jenis_luaran }}/{{ $item->file_luaran }}" target="_blank" title="Logbook" class="btn btn-info btn-sm waves-effect waves-light"> <i class="fas fa-search"></i> Lihat</a></td>
<td>
<a onclick="hapus('{{ encrypt($item->id) }}', 'row-{{ $token }}')" class="btn btn-danger btn-sm">Hapus</a>
</td>
</tr>
@endforeach
@else
<tr>
<td colspan="5" style="text-align: center; font-style: italic;">Tidak ada data yang dapat diambil.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table id="datatable" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr align="center" valign="middle">
<th>No</th>
<th>Jenis</th>
<th>Judul</th>
<th>Keterangan</th>
<th>File</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
{{-- @if ($proposal->rLuaran->count()) --}}
@foreach ($proposal->rLuaran as $item)
@php $token = Str::random(30); @endphp
<tr id="row-{{ $token }}" align="center" valign="middle">
<td>{{ $loop->iteration }}</td>
<td>{{ $item->jenis_luaran }}</td>
<td>{{ $item->judul }}</td>
<td>{{ $item->keterangan_luaran }}</td>
<td><a href="https://statik.unesa.ac.id/simpmw/luaran/{{ $item->jenis_luaran }}/{{ $item->file_luaran }}" target="_blank" title="Logbook" class="btn btn-info btn-sm waves-effect waves-light"> <i class="fas fa-search"></i> Lihat</a></td>
<td>
<a class="btn btn-warning btn-sm fas fa-pencil-alt"> Edit</a>
<a onclick="hapus('{{ encrypt($item->id) }}', 'row-{{ $token }}')" class="btn btn-danger btn-sm fas fa-trash-alt"> Hapus</a>
</td>
</tr>
@endforeach
{{-- @else
<tr>
<td colspan="6" style="text-align: center; font-style: italic;">Tidak ada data yang dapat diambil.</td>
</tr>
@endif --}}
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
<div id="tmbhKel" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form action="{{ route('mahasiswa.luaran.store') }}" method="POST" enctype="multipart/form-data">
@csrf
</div>
</div> <!-- end col -->
</div> <!-- end row -->
<div id="tmbhKel" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form action="{{ route('mahasiswa.luaran.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="modal-header">
<h5 class="modal-title" id="myModalLabel">Tambah Luaran</h5>
<h5 class="modal-title" id="myModalLabel">Tambah Laporan Magang / Luaran</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input class="form-control" type="hidden" name="proposal_id" id="proposal_id" value="{{ $proposal->proposal_id }}">
<div class="col-12">
<h5 class="font-size-16">Jenis Luaran : </h5>
<p><select class="form-select" aria-label="Default select example" name="jenis_luaran">
<input class="form-control" type="hidden" name="proposal_id" id="proposal_id" value="{{ $proposal->proposal_id }}">
<div class="col-12">
<h5 class="font-size-16">Jenis Laporan/Luaran : </h5>
<p><select class="form-select" aria-label="Default select example" name="jenis_luaran" id="jenis_luaran_select" required>
<option value="">--Pilih--</option>
<option value="Laporan Magang">Laporan Magang</option>
<option value="Buku">Buku</option>
<option value="Jurnal">Jurnal</option>
<option value="Video">Video</option>
<option value="Produk">Produk</option>
<option value="Media">Publikasi Media</option>
<option value="Lainnya">Lainnya</option>
</select></p>
</div>
<div class="col-12">
<h5 class="font-size-16">Judul : </h5>
</div>
<div class="col-12" id="lainnya_form" style="display: none;">
<h5 class="font-size-16">Jenis Laporan/Luaran Lainnya : </h5>
<p>
<input class="form-control" type="text" name="judul" id="judul">
<input class="form-control" type="text" name="jenis_luaran_lainnya" id="jenis_luaran_lainnya" value="{{ old('jenis_luaran_lainnya') }}">
</p>
<div class="col-12">
<h5 class="font-size-16">Upload File : </h5>
</div>
<div class="col-12">
<h5 class="font-size-16">Judul : </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
<input class="form-control" type="text" name="judul" id="judul" value="{{ old('judul') }}" required>
</p>
<div class="col-12">
<h5 class="font-size-16">Keterangan : </h5>
</div>
<div class="col-12">
<h5 class="font-size-16">Upload File : </h5>
<div class="row">
<div class="col-8">
<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>
<div class="col-4">
<button type="button" class="btn btn-warning form-control" id="btnPreview">Preview</button>
</div>
</div>
</div>
<div class="col-12">
<h5 class="font-size-16">Keterangan : </h5>
<p>
<textarea id="textarea" class="form-control" maxlength="225" rows="3" name="keterangan_luaran" ></textarea>
<textarea id="textarea" class="form-control" maxlength="225" rows="3" name="keterangan_luaran" required></textarea>
</p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary waves-effect waves-light">Save changes</button>
<button type="button" class="btn btn-secondary waves-effect" data-bs-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary waves-effect waves-light">Simpan</button>
</div>
</form>
</form>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- Modal Preview -->
<div class="modal fade" id="pdfModal" tabindex="-1" role="dialog" aria-labelledby="pdfModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content" style="height: 80vh;">
<div class="modal-header">
<h5 class="modal-title" id="pdfModalLabel">Preview PDF</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">{{-- <span aria-hidden="true">&times;</span> --}}</button>
</div>
<div class="modal-body">
{{-- <iframe id="pdfViewer" width="100%" height="100%" frameborder="0"></iframe> --}}
{{-- <iframe id="view-pdf" width="100%" height="450" frameborder="0" src="{{ $proposal ? 'https://statik.unesa.ac.id/simpkm/proposal/'.$proposal->rPeriode->nama.'/'.$proposal->upload_dokumen : '' }} "></iframe> --}}
<iframe id="view-pdf" width="100%" height="100%"></iframe>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</div>
@endsection
@section('js')
{{-- <script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script> --}}
<script>
function hapus(id, rowId){
Swal.fire({
title: 'Apakah anda yakin untuk menghapus usulan ini?',
text: "file yang sudah terupload juga terhapus",
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'OK',
}).then((result) => {
if (result.isConfirmed) {
var token = '{{ csrf_token() }}';
var request = $.ajax({
url: '{{ route('mahasiswa.luaran.hapus') }}',
type: 'POST',
dataType: 'html',
data: {id:id, _token:token},
success: function(data){
$(document).ready(function () {
$('#input-file').on('change', function (e) {
var fileInput = e.target.files[0];
// Periksa apakah ada file yang dipilih
if (!fileInput) {
alert('Silakan pilih file PDF terlebih dahulu.');
return;
}
// Periksa tipe file (harus PDF)
if (fileInput.type !== 'application/pdf') {
alert('File harus berupa PDF.');
// Reset input file
$('#input-file').val('');
return;
}
// Periksa ukuran file (maksimal 5MB)
if (fileInput.size > 5 * 1024 * 1024) {
alert('Ukuran file maksimal adalah 5MB.');
// Reset input file
$('#input-file').val('');
return;
}
});
// Fungsi untuk tombol "Preview"
$('#btnPreview').click(function() {
var fileInput = $('#input-file')[0].files[0];
// Periksa apakah ada file yang dipilih
if (!fileInput) {
alert('Silakan pilih file PDF terlebih dahulu.');
return;
}
// Sembunyikan modal "Tambah Luaran"
$('#tmbhKel').modal('hide');
// Tampilkan pratinjau PDF di dalam modal jika file memenuhi syarat
var url = URL.createObjectURL(fileInput);
$('#view-pdf').attr('src', url);
$('#pdfModal').modal('show');
});
// Event saat modal preview ditutup
$('#pdfModal').on('hidden.bs.modal', function (e) {
// Tampilkan kembali modal "Tambah Luaran"
$('#tmbhKel').modal('show');
// Reset iframe saat modal ditutup
$('#view-pdf').attr('src', '');
});
});
</script>
<script>
function hapus(id, rowId) {
Swal.fire({
title: 'Apakah Anda yakin untuk menghapus usulan ini?',
text: "File yang sudah terupload juga akan terhapus",
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'OK',
}).then((result) => {
if (result.isConfirmed) {
var token = '{{ csrf_token() }}';
$.ajax({
url: '{{ route('mahasiswa.luaran.hapus') }}',
type: 'POST',
dataType: 'json',
data: {
id: id,
_token: token
},
success: function(response) {
if (response.status === 'success') {
Swal.fire({
title: 'Data Berhasil Di Hapus',
title: 'Data Berhasil Dihapus',
icon: 'success',
showConfirmButton: false,
timer: 1500
}).then(() => {
location.reload(); // Refresh halaman setelah pesan sukses ditampilkan
});
$('#'+rowId).remove();
},
error: function(xhr, status, error){
} else {
Swal.fire({
position: 'top-end',
title: 'Gagal',
text: response.message,
icon: 'error',
title: xhr.responseText,
showConfirmButton: false,
timer: 3500
});
}
});
}
})
},
error: function(xhr, status, error) {
Swal.fire({
position: 'top-center',
icon: 'error',
title: 'Terjadi Kesalahan',
text: xhr.responseText,
showConfirmButton: false,
timer: 3500
});
}
});
}
})
}
document.getElementById('jenis_luaran_select').addEventListener('change', function() {
var select = this;
var lainnyaForm = document.getElementById('lainnya_form');
var lainnyaInput = document.getElementById('jenis_luaran_lainnya');
if (select.value === 'Lainnya') {
lainnyaForm.style.display = 'block';
lainnyaInput.setAttribute('required', 'required');
} else {
lainnyaForm.style.display = 'none';
lainnyaInput.removeAttribute('required');
}
});
document.getElementById('jenis_luaran_select').addEventListener('focus', function() {
var select = this;
if (select.options[0].value === '') {
select.removeChild(select.options[0]);
}
});
document.addEventListener('DOMContentLoaded', function() {
var table = document.getElementById('datatable');
var thead = table.querySelector('thead');
var tbody = table.querySelector('tbody');
// Menghitung jumlah elemen <th> dalam <thead>
var thCount = thead.querySelectorAll('th').length;
// Periksa apakah tbody kosong
if (!tbody.querySelector('tr')) {
var tr = document.createElement('tr');
var td = document.createElement('td');
// Set colspan sesuai dengan jumlah <th>
td.setAttribute('colspan', thCount);
td.style.textAlign = 'center';
td.style.fontStyle = 'italic';
td.textContent = 'Tidak ada data yang dapat diambil.';
tr.appendChild(td);
tbody.appendChild(tr);
}
});
</script>
@endsection
......@@ -97,7 +97,7 @@
</td>
<td align="center">
<button data-bs-toggle="modal" data-bs-target="{{ '#lihat'.$item->id }}" class="btn btn-success btn-sm form-control mb-2"><i class="fas fa-search"></i> Hasil Penilaian</button>
<a href="{{ URL::to('mahasiswa/monev-revisi/'.encrypt($item->id.'__proposal__I')) }}" type="button" class="btn btn-danger btn-sm waves-effect waves-light form-control" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Revisi Proposal"><i class="fas fa-file-upload"></i> Revisi</a>
<a href="{{ URL::to('mahasiswa/monev-revisi/'.encrypt($item->proposal_id.'__proposal__I')) }}" type="button" class="btn btn-danger btn-sm waves-effect waves-light form-control" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Revisi Proposal"><i class="fas fa-file-upload"></i> Revisi</a>
<div id="{{ 'lihat'.$item->id }}" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="lihatLabel" aria-hidden="true">
......
......@@ -83,7 +83,7 @@
<div class="mb-0">
<div>
<button type="submit" class="btn btn-primary waves-effect waves-light me-1"> Submit </button>
<button type="button" onclick="window.location.href='{{ URL::to('/mahasiswa/monev/II') }}'" class="btn btn-secondary waves-effect"> Cancel </button>
<button type="button" onclick="window.history.back();" class="btn btn-secondary waves-effect"> Cancel </button>
</div>
</div>
</form>
......
......@@ -21,7 +21,7 @@
<div class="col-md-8">
<h6 class="page-title">{!! $title !!}</h6>
<ol class="breadcrumb m-0">
<li class="breadcrumb-item">Monev Internal I</li>
<li class="breadcrumb-item">{{ $jenis_monev->nama }}</li>
<li class="breadcrumb-item">{!! $title !!}</li>
</ol>
</div>
......@@ -82,7 +82,7 @@
<br>
<div class="table-responsive">
<table id="example" class="table table-bordered dt-responsive wrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<thead align="center" style="vertical-align: middle;">
<tr>
<th rowspan="2">id</th>
<th rowspan="2">Kode Kelompok</th>
......
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