Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpmw
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alfiro Pratama
simpmw
Commits
9cf90b69
Commit
9cf90b69
authored
Jul 16, 2024
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload Laporan Magang Monev I
parent
69f3f68d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
422 additions
and
132 deletions
+422
-132
app/Http/Controllers/Mahasiswa/LuaranController.php
+16
-11
app/Http/Controllers/Operator/DaftarProposalController.php
+1
-1
app/Http/Controllers/Operator/MonevProposalController.php
+127
-1
app/Models/DaftarProposal.php
+1
-1
app/Models/DaftarProposalMonev.php
+5
-0
app/Models/ProposalLuaran.php
+1
-1
resources/views/backend/mahasiswa/luaran/index.blade.php
+267
-113
resources/views/backend/mahasiswa/monev/indexmonevI.blade.php
+1
-1
resources/views/backend/mahasiswa/monev/upload_monev.blade.php
+1
-1
resources/views/backend/operator/daftar_proposal/monev.blade.php
+2
-2
No files found.
app/Http/Controllers/Mahasiswa/LuaranController.php
View file @
9cf90b69
...
@@ -69,8 +69,10 @@ class LuaranController extends Controller
...
@@ -69,8 +69,10 @@ class LuaranController extends Controller
'judul'
=>
$luaran
[
'judul'
],
'judul'
=>
$luaran
[
'judul'
],
'jenis_luaran'
=>
$luaran
[
'jenis_luaran'
],
'jenis_luaran'
=>
$luaran
[
'jenis_luaran'
],
'keterangan_luaran'
=>
$luaran
[
'keterangan_luaran'
],
'keterangan_luaran'
=>
$luaran
[
'keterangan_luaran'
],
'kategori_luaran'
=>
$luaran
[
'jenis_luaran_lainnya'
]
===
'Lainnya'
?
$luaran
[
'jenis_luaran_lainnya'
]
:
null
,
'file_luaran'
=>
$file_nama
,
'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'
);
return
redirect
()
->
route
(
'mahasiswa.luaran.show'
,
encrypt
(
$luaran
[
'proposal_id'
]))
->
with
(
'success'
,
'Proposal Berhasil ditambahkan'
);
...
@@ -85,7 +87,7 @@ class LuaranController extends Controller
...
@@ -85,7 +87,7 @@ class LuaranController extends Controller
public
function
show
(
$id
)
public
function
show
(
$id
)
{
{
//
//
$title
=
'
Proposal Luaran
Mahasiswa'
;
$title
=
'
Unggah Laporan Magang
Mahasiswa'
;
$proposal
=
Proposal
::
with
([
'rluaran'
,
'rPeriode'
])
->
find
(
decrypt
(
$id
));
$proposal
=
Proposal
::
with
([
'rluaran'
,
'rPeriode'
])
->
find
(
decrypt
(
$id
));
$data
=
[
$data
=
[
...
@@ -100,15 +102,18 @@ class LuaranController extends Controller
...
@@ -100,15 +102,18 @@ class LuaranController extends Controller
{
{
$pro
=
$request
->
except
(
'_token'
);
$pro
=
$request
->
except
(
'_token'
);
$proposal
=
Proposal
::
query
()
->
find
(
decrypt
(
$pro
[
'id'
]));
// Dekripsi ID hanya sekali
$id
=
decrypt
(
$pro
[
'id'
]);
Storage
::
disk
(
'static'
)
->
delete
(
'simpmw/luaran/'
.
$proposal
->
jenis_luaran
.
'/'
.
$proposal
->
file_luaran
);
$proposal
=
ProposalLuaran
::
query
()
->
find
(
$id
);
$proposal
->
delete
();
if
(
$proposal
)
{
Alert
::
success
(
'Berhasil dihapus'
);
Storage
::
disk
(
'static'
)
->
delete
(
'simpmw/luaran/'
.
$proposal
->
jenis_luaran
.
'/'
.
$proposal
->
file_luaran
);
$proposal
->
delete
();
return
redirect
()
->
route
(
'mahasiswa.luaran.index'
);
return
response
()
->
json
([
'status'
=>
'success'
,
'message'
=>
'Berhasil dihapus'
]);
}
else
{
return
response
()
->
json
([
'status'
=>
'error'
,
'message'
=>
'Proposal tidak ditemukan'
]);
}
}
}
public
function
dosen
(
$id
)
public
function
dosen
(
$id
)
...
...
app/Http/Controllers/Operator/DaftarProposalController.php
View file @
9cf90b69
...
@@ -176,7 +176,7 @@ class DaftarProposalController extends Controller
...
@@ -176,7 +176,7 @@ class DaftarProposalController extends Controller
$lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '1')"
;
$lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '1')"
;
$tidak_lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '2')"
;
$tidak_lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '2')"
;
$batalkanNilai1
=
//
$batalkanNilai1 =
$disable_1
=
$disable_2
=
''
;
$disable_1
=
$disable_2
=
''
;
...
...
app/Http/Controllers/Operator/MonevProposalController.php
View file @
9cf90b69
...
@@ -39,7 +39,7 @@ class MonevProposalController extends Controller
...
@@ -39,7 +39,7 @@ class MonevProposalController extends Controller
];
];
$periode
=
Periode
::
query
()
->
get
();
$periode
=
Periode
::
query
()
->
get
();
$jenis
=
Jenis
::
query
()
->
where
(
'status_hapus'
,
'0'
)
->
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 */
/* AJAX request */
...
@@ -115,6 +115,7 @@ class MonevProposalController extends Controller
...
@@ -115,6 +115,7 @@ class MonevProposalController extends Controller
$kode
=
$record
->
kode
;
$kode
=
$record
->
kode
;
$jenis_pkm
=
$record
->
jenis_pkm
;
$jenis_pkm
=
$record
->
jenis_pkm
;
$judul
=
$record
->
judul
;
$judul
=
$record
->
judul
;
$upload_dokumen
=
$record
->
upload_dokumen
;
$dospem
=
"("
.
str_replace
(
"###"
,
") "
,
$record
->
identitas_dospem
);
$dospem
=
"("
.
str_replace
(
"###"
,
") "
,
$record
->
identitas_dospem
);
$status_administrasi_1
=
$record
->
status_administrasi_1
;
$status_administrasi_1
=
$record
->
status_administrasi_1
;
$status_administrasi_2
=
$record
->
status_administrasi_2
;
$status_administrasi_2
=
$record
->
status_administrasi_2
;
...
@@ -124,6 +125,9 @@ class MonevProposalController extends Controller
...
@@ -124,6 +125,9 @@ class MonevProposalController extends Controller
$reviewer_id_2
=
$record
->
reviewer_id_2
;
$reviewer_id_2
=
$record
->
reviewer_id_2
;
$status_final
=
$record
->
status
;
$status_final
=
$record
->
status
;
$rata
=
$record
->
rata
;
$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;
// $rata = ($nilai_1 + $nilai_2) / 2;
...
@@ -189,9 +193,131 @@ class MonevProposalController extends Controller
...
@@ -189,9 +193,131 @@ class MonevProposalController extends Controller
$aksi
=
'<td class="table-action">
$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-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-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>'
;
</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
(
$data_arr
[]
=
array
(
"monev_internal_id"
=>
$monev_internal_id
,
"monev_internal_id"
=>
$monev_internal_id
,
"kode"
=>
$kode
,
"kode"
=>
$kode
,
...
...
app/Models/DaftarProposal.php
View file @
9cf90b69
...
@@ -12,7 +12,7 @@ class DaftarProposal extends Model
...
@@ -12,7 +12,7 @@ class DaftarProposal extends Model
protected
$keyType
=
'string'
;
protected
$keyType
=
'string'
;
protected
$fillable
=
[
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
()
public
function
rKelompokDetil
()
...
...
app/Models/DaftarProposalMonev.php
View file @
9cf90b69
...
@@ -23,4 +23,9 @@ class DaftarProposalMonev extends Model
...
@@ -23,4 +23,9 @@ class DaftarProposalMonev extends Model
{
{
return
$this
->
hasMany
(
\App\Models\KelompokDetail
::
class
,
'kelompok_id'
,
'kelompok_id'
);
return
$this
->
hasMany
(
\App\Models\KelompokDetail
::
class
,
'kelompok_id'
,
'kelompok_id'
);
}
}
public
function
proposalUrl
()
{
return
$this
->
belongsTo
(
ProposalUrl
::
class
,
'proposal_id'
,
'proposal_id'
);
}
}
}
app/Models/ProposalLuaran.php
View file @
9cf90b69
...
@@ -22,7 +22,7 @@ class ProposalLuaran extends Model
...
@@ -22,7 +22,7 @@ class ProposalLuaran extends Model
'proposal_id'
,
'proposal_id'
,
'judul'
,
'judul'
,
'jenis_luaran'
,
'jenis_luaran'
,
'k
e
tegori_luaran'
,
'k
a
tegori_luaran'
,
'keterangan_luaran'
,
'keterangan_luaran'
,
'file_luaran'
,
'file_luaran'
,
'created_user'
,
'created_user'
,
...
...
resources/views/backend/mahasiswa/luaran/index.blade.php
View file @
9cf90b69
@
extends
(
'layouts.master'
)
@
extends
(
'layouts.master'
)
@
section
(
'title'
)
@
section
(
'title'
,
'Dashboard'
)
Dashboard
@
endsection
@
section
(
'header'
)
@
section
(
'header'
)
<
div
class
="
page
-
title
">
<
div
class
="
page
-
title
">
...
@@ -11,159 +9,315 @@
...
@@ -11,159 +9,315 @@
@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
">Mahasiswa</li>
<li class="
breadcrumb
-
item
">Mahasiswa</li>
<li class="
breadcrumb
-
item
"><a href="
{{
url
()
->
previous
()
}}
">Monev Internal I</a></li>
<li class="
breadcrumb
-
item
"><a href="
{{
url
()
->
previous
()
}}
">Monev Internal I</a></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 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>
<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
>
</
div
>
</
div
>
</
div
>
</
div
>
<!--
end
page
title
-->
</
div
>
<!--
end
page
title
-->
<
div
class
="
row
">
<div class="
col
-
12
">
<
div
class
="
row
">
<div class="
card
">
<div class="
col
-
12
">
<div class="
card
-
body
">
<div class="
card
">
<div class="
table
-
responsive
">
<div class="
card
-
body
">
<table id="
datatable
" class="
table
table
-
bordered
dt
-
responsive
nowrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<div class="
table
-
responsive
">
<thead>
<table id="
datatable
" class="
table
table
-
bordered
dt
-
responsive
nowrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<tr align="
center
" valign="
middle
">
<thead>
<th>No</th>
<tr align="
center
" valign="
middle
">
<th>Jenis</th>
<th>No</th>
<th>Judul</th>
<th>Jenis</th>
<th>File</th>
<th>Judul</th>
<th>Aksi</th>
<th>Keterangan</th>
</tr>
<th>File</th>
</thead>
<th>Aksi</th>
<tbody>
</tr>
@if (
$proposal->rLuaran
->count())
</thead>
@foreach (
$proposal->rLuaran
as
$item
)
<tbody>
@php
$token
= Str::random(30); @endphp
{{-- @if (
$proposal->rLuaran
->count()) --}}
<tr id="
row
-
{{
$token
}}
">
@foreach (
$proposal->rLuaran
as
$item
)
<td>{{
$loop->iteration
}}</td>
@php
$token
= Str::random(30); @endphp
<td>{{
$item->jenis_luaran
}}</td>
<tr id="
row
-
{{
$token
}}
" align="
center
" valign="
middle
">
<td>{{
$item->judul
}}</td>
<td>{{
$loop->iteration
}}</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>{{
$item->jenis_luaran
}}</td>
<td>
<td>{{
$item->judul
}}</td>
<a onclick="
hapus
(
'{{ encrypt($item->id) }}'
,
'row-{{ $token }}'
)
" class="
btn
btn
-
danger
btn
-
sm
">Hapus</a>
<td>{{
$item->keterangan_luaran
}}</td>
</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>
</tr>
<td>
@endforeach
<a class="
btn
btn
-
warning
btn
-
sm
fas
fa
-
pencil
-
alt
"> Edit</a>
@else
<a onclick="
hapus
(
'{{ encrypt($item->id) }}'
,
'row-{{ $token }}'
)
" class="
btn
btn
-
danger
btn
-
sm
fas
fa
-
trash
-
alt
"> Hapus</a>
<tr>
</td>
<td colspan="
5
" style="
text
-
align
:
center
;
font
-
style
:
italic
;
">Tidak ada data yang dapat diambil.</td>
</tr>
</tr>
@endforeach
@endif
{{-- @else
</tbody>
<tr>
</table>
<td colspan="
6
" style="
text
-
align
:
center
;
font
-
style
:
italic
;
">Tidak ada data yang dapat diambil.</td>
</div>
</tr>
@endif --}}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div> <!-- end col -->
</div>
</div> <!-- end row -->
</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 id="
tmbhKel
" class="
modal
fade
" role="
dialog
" aria-labelledby="
myModalLabel
" aria-hidden="
true
">
<div class="
modal
-
content
">
<div class="
modal
-
dialog
">
<form action="
{{
route
(
'mahasiswa.luaran.store'
)
}}
" method="
POST
" enctype="
multipart
/
form
-
data
">
<div class="
modal
-
content
">
@csrf
<form action="
{{
route
(
'mahasiswa.luaran.store'
)
}}
" method="
POST
" enctype="
multipart
/
form
-
data
">
@csrf
<div class="
modal
-
header
">
<div class="
modal
-
header
">
<h5 class="
modal
-
title
" id="
myModalLabel
">Tambah Luaran</h5>
<h5 class="
modal
-
title
" id="
myModalLabel
">Tambah L
aporan Magang / L
uaran</h5>
<button type="
button
" class="
btn
-
close
" data-bs-dismiss="
modal
" aria-label="
Close
"></button>
<button type="
button
" class="
btn
-
close
" data-bs-dismiss="
modal
" aria-label="
Close
"></button>
</div>
</div>
<div class="
modal
-
body
">
<div class="
modal
-
body
">
<input class="
form
-
control
" type="
hidden
" name="
proposal_id
" id="
proposal_id
" value="
{{
$proposal
->
proposal_id
}}
">
<input class="
form
-
control
" type="
hidden
" name="
proposal_id
" id="
proposal_id
" value="
{{
$proposal
->
proposal_id
}}
">
<div class="
col
-
12
">
<div class="
col
-
12
">
<h5 class="
font
-
size
-
16
">Jenis Luaran : </h5>
<h5 class="
font
-
size
-
16
">Jenis Laporan/Luaran : </h5>
<p><select class="
form
-
select
" aria-label="
Default
select
example
" name="
jenis_luaran
">
<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="
Buku
">Buku</option>
<option value="
Jurnal
">Jurnal</option>
<option value="
Jurnal
">Jurnal</option>
<option value="
Video
">Video</option>
<option value="
Video
">Video</option>
<option value="
Produk
">Produk</option>
<option value="
Produk
">Produk</option>
<option value="
Media
">Publikasi Media</option>
<option value="
Media
">Publikasi Media</option>
<option value="
Lainnya
">Lainnya</option>
</select></p>
</select></p>
</div>
</div>
<div class="
col
-
12
">
<div class="
col
-
12
" id="
lainnya_form
" style="
display
:
none
;
">
<h5 class="
font
-
size
-
16
">Judul
: </h5>
<h5 class="
font
-
size
-
16
">Jenis Laporan/Luaran Lainnya
: </h5>
<p>
<p>
<input class="
form
-
control
" type="
text
" name="
j
udul
" id="
judul
">
<input class="
form
-
control
" type="
text
" name="
j
enis_luaran_lainnya
" id="
jenis_luaran_lainnya
" value="
{{
old
(
'jenis_luaran_lainnya'
)
}}
">
</p>
</p>
<div class="
col
-
12
">
</div>
<h5 class="
font
-
size
-
16
">Upload File : </h5>
<div class="
col
-
12
">
<h5 class="
font
-
size
-
16
">Judul : </h5>
<p>
<p>
<input type="
file
" name="
file
" class="
form
-
control
" id="
input
-
file
">
<input class="
form
-
control
" type="
text
" name="
judul
" id="
judul
" value="
{{
old
(
'judul'
)
}}
" required>
@if (
$errors->has
('file')) <span class="
text
-
danger
">{{
$errors->first
('file') }}</span> @endif
</p>
</p>
<div class="
col
-
12
">
</div>
<h5 class="
font
-
size
-
16
">Keterangan : </h5>
<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>
<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>
</p>
</div>
</div>
</div>
<div class="
modal
-
footer
">
<div class="
modal
-
footer
">
<button type="
button
" class="
btn
btn
-
secondary
waves
-
effect
" data-bs-dismiss="
modal
">
Close
</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
">S
ave changes
</button>
<button type="
submit
" class="
btn
btn
-
primary
waves
-
effect
waves
-
light
">S
impan
</button>
</div>
</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
:
80
vh
;
">
<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
">×</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>
</div>
<!-- /.modal-content -->
</div>
</div>
<!-- /.modal-dialog -->
</div>
</div>
</div>
@endsection
@endsection
@section('js')
@section('js')
{{-- <script src="
https
://
cdnjs
.
cloudflare
.
com
/
ajax
/
libs
/
magnific
-
popup
.
js
/
1.1
.
0
/
jquery
.
magnific
-
popup
.
min
.
js
"></script> --}}
<script>
<script>
function hapus(id, rowId){
$(document).ready(function () {
Swal.fire({
$('#input-file').on('change', function (e) {
title: 'Apakah anda yakin untuk menghapus usulan ini?',
var fileInput = e.target.files[0];
text: "
file
yang
sudah
terupload
juga
terhapus
",
icon: 'warning',
// Periksa apakah ada file yang dipilih
showCancelButton: true,
if (!fileInput) {
confirmButtonText: 'OK',
alert('Silakan pilih file PDF terlebih dahulu.');
}).then((result) => {
return;
if (result.isConfirmed) {
}
var token = '{{ csrf_token() }}';
var request = $.ajax({
// Periksa tipe file (harus PDF)
url: '{{ route('mahasiswa.luaran.hapus') }}',
if (fileInput.type !== 'application/pdf') {
type: 'POST',
alert('File harus berupa PDF.');
dataType: 'html',
// Reset input file
data: {id:id, _token:token},
$('#input-file').val('');
success: function(data){
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({
Swal.fire({
title: 'Data Berhasil Di
H
apus',
title: 'Data Berhasil Di
h
apus',
icon: 'success',
icon: 'success',
showConfirmButton: false,
showConfirmButton: false,
timer: 1500
timer: 1500
}).then(() => {
location.reload(); // Refresh halaman setelah pesan sukses ditampilkan
});
});
} else {
$('#'+rowId).remove();
},
error: function(xhr, status, error){
Swal.fire({
Swal.fire({
position: 'top-end',
title: 'Gagal',
text: response.message,
icon: 'error',
icon: 'error',
title: xhr.responseText,
showConfirmButton: false,
showConfirmButton: false,
timer: 3500
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>
</script>
@endsection
@endsection
resources/views/backend/mahasiswa/monev/indexmonevI.blade.php
View file @
9cf90b69
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
</td>
</td>
<td align="
center
">
<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>
<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
"
<div id="
{{
'lihat'
.
$item
->
id
}}
" class="
modal
fade
" tabindex="
-
1
" role="
dialog
"
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
...
...
resources/views/backend/mahasiswa/monev/upload_monev.blade.php
View file @
9cf90b69
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<div class="
mb
-
0
">
<div class="
mb
-
0
">
<div>
<div>
<button type="
submit
" class="
btn
btn
-
primary
waves
-
effect
waves
-
light
me
-
1
"> Submit </button>
<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>
</div>
</div>
</form>
</form>
...
...
resources/views/backend/operator/daftar_proposal/monev.blade.php
View file @
9cf90b69
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<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
">
Monev Internal I
</li>
<li class="
breadcrumb
-
item
">
{{
$jenis_monev->nama
}}
</li>
<li class="
breadcrumb
-
item
">{!!
$title
!!}</li>
<li class="
breadcrumb
-
item
">{!!
$title
!!}</li>
</ol>
</ol>
</div>
</div>
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<br>
<br>
<div class="
table
-
responsive
">
<div class="
table
-
responsive
">
<table id="
example
" class="
table
table
-
bordered
dt
-
responsive
wrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<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>
<tr>
<th rowspan="
2
">id</th>
<th rowspan="
2
">id</th>
<th rowspan="
2
">Kode Kelompok</th>
<th rowspan="
2
">Kode Kelompok</th>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment