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
72f68373
Commit
72f68373
authored
Jul 05, 2024
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tambah tombol Detail Daftar Proposal
parent
622559ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
127 additions
and
2 deletions
+127
-2
app/Http/Controllers/Operator/DaftarProposalController.php
+127
-2
No files found.
app/Http/Controllers/Operator/DaftarProposalController.php
View file @
72f68373
...
@@ -132,6 +132,7 @@ class DaftarProposalController extends Controller
...
@@ -132,6 +132,7 @@ class DaftarProposalController 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
;
$status_administrasi_1
=
$record
->
status_administrasi
;
$status_administrasi_2
=
$record
->
status_administrasi_2
;
$status_administrasi_2
=
$record
->
status_administrasi_2
;
...
@@ -141,6 +142,8 @@ class DaftarProposalController extends Controller
...
@@ -141,6 +142,8 @@ class DaftarProposalController extends Controller
$nilai_1
=
$record
->
nilai_1
;
$nilai_1
=
$record
->
nilai_1
;
$nilai_2
=
$record
->
nilai_2
;
$nilai_2
=
$record
->
nilai_2
;
$rata
=
$record
->
rata
;
$rata
=
$record
->
rata
;
$url
=
"https://statik.unesa.ac.id/simpmw/proposal/"
.
$record
->
periode
.
"/"
.
$record
->
upload_dokumen
;
$video
=
DaftarProposal
::
where
(
'proposal_id'
,
$proposal_id
)
->
pluck
(
'url'
);
// $nilai_1= DB::select("select ambil_jumlah_penilaian_seleksi('".$reviewer_proposal_id_1."', '".$record->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
// $nilai_1= DB::select("select ambil_jumlah_penilaian_seleksi('".$reviewer_proposal_id_1."', '".$record->jenis_id."')")[0]->ambil_jumlah_penilaian_seleksi;
...
@@ -278,12 +281,134 @@ class DaftarProposalController extends Controller
...
@@ -278,12 +281,134 @@ class DaftarProposalController extends Controller
{
{
$aksi
=
'<td class="table-action">
$aksi
=
'<td class="table-action">
<div align="center">
<div align="center">
<a href="#!" style="margin-right: 3px;" class="btn btn-icon-sm btn-success" onclick="'
.
$lolos
.
'"><i class="fas fa-check"></i></a>
<a href="#!" data-toggle="tooltip" data-placement="top" title="Lolos" 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" data-toggle="tooltip" data-placement="top" title="Tidak Lolos" 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
.
'"><i class="fas fa-search"></i></a>
</div>
</div>
</td>'
;
</td>'
;
}
}
$aksi
.=
'
<div class="modal fade" id="proposalModal'
.
$proposal_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>
"
;
$pendanaan
=
'
$pendanaan
=
'
<td>
<td>
Usulan Dana: Rp'
.
number_format
(
$record
->
usulan_dana
,
0
,
","
,
","
)
.
'
Usulan Dana: Rp'
.
number_format
(
$record
->
usulan_dana
,
0
,
","
,
","
)
.
'
...
...
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