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
6c0dbf84
Commit
6c0dbf84
authored
Jul 03, 2024
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Perintilan View
parent
934975c3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
165 additions
and
81 deletions
+165
-81
app/Http/Controllers/Operator/DaftarProposalController.php
+26
-15
app/Http/Controllers/Operator/ProposalController.php
+0
-0
app/Http/Controllers/Reviewer/DaftarSeleksiController.php
+0
-0
app/Models/BuktiAnggaran.php
+48
-0
app/Models/MonevInternal.php
+6
-0
app/Models/Proposal.php
+5
-1
resources/views/auth/login.blade.php
+2
-2
resources/views/backend/dosen/proposal/index.blade.php
+9
-3
resources/views/backend/mahasiswa/proposal/index.blade.php
+63
-55
resources/views/backend/operator/daftar_proposal/index.blade.php
+2
-2
resources/views/backend/reviewer/seleksi/index.blade.php
+1
-1
routes/web.php
+3
-2
No files found.
app/Http/Controllers/Operator/DaftarProposalController.php
View file @
6c0dbf84
...
...
@@ -191,14 +191,15 @@ class DaftarProposalController extends Controller
if
(
$record
->
reviewerProposal1
)
{
if
(
$record
->
reviewerProposal1
->
revisi_nilai
!=
1
)
{
$revisi1
=
'
<br>
<button class="btn btn-warning btn-sm" onclick="revisi(\''
.
encrypt
(
$record
->
reviewerProposal1
->
reviewer_proposal_id
)
.
'\')">Revisi</button>
<div align="center">
<button class="btn btn-warning btn-sm" onclick="revisi(\''
.
encrypt
(
$record
->
reviewerProposal1
->
reviewer_proposal_id
)
.
'\')">Revisi</button>
</div>
'
;
}
else
{
$revisi1
=
'
<br>
on review
<p style="font-style: italic; text-align: center">On review</p>
'
;
}
}
...
...
@@ -216,18 +217,20 @@ class DaftarProposalController extends Controller
</td>'
;
$revisi1
=
''
;
$revisi2
=
''
;
if
(
$record
->
reviewerProposal2
){
if
(
$record
->
reviewerProposal2
->
revisi_nilai
!=
1
)
{
$revisi2
=
'
<br>
<button class="btn btn-warning btn-sm" onclick="revisi(\''
.
encrypt
(
$record
->
reviewerProposal2
->
reviewer_proposal_id
)
.
'\')">Revisi</button>
<div align="center">
<button class="btn btn-warning btn-sm" onclick="revisi(\''
.
encrypt
(
$record
->
reviewerProposal2
->
reviewer_proposal_id
)
.
'\')">Revisi</button>
</div>
'
;
}
else
{
$revisi2
=
'
<br>
on review
<p style="font-style: italic; text-align: center">On review</p>
'
;
}
}
...
...
@@ -265,26 +268,28 @@ class DaftarProposalController extends Controller
if
(
$status_final
==
'1'
)
{
$aksi
=
'<
span class="badge bg-success">Lolos</span
>'
;
$aksi
=
'<
div align="center"><span class="badge bg-success" style="font-size: 12pt;">Lolos</span></div
>'
;
}
elseif
(
$status_final
==
'2'
)
{
$aksi
=
'<
span class="badge bg-danger">Tidak Lolos</span
>'
;
$aksi
=
'<
div align="center"><span class="badge bg-danger style="font-size: 12pt;"">Tidak Lolos</span></div
>'
;
}
else
{
$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>
<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="#!" class="btn btn-icon-sm btn-danger" onclick="'
.
$tidak_lolos
.
'"><i class="fas fa-ban"></i></a>
</div>
</td>'
;
}
$pendanaan
=
'
<td>
Usulan Dana:
'
.
$record
->
usulan_dana
.
'
Usulan Dana:
Rp'
.
number_format
(
$record
->
usulan_dana
,
0
,
","
,
","
)
.
'
<br>
<br>
Diberikan:
'
.
$record
->
pendanaan
.
'
Diberikan:
Rp'
.
number_format
(
$record
->
pendanaan
,
0
,
","
,
","
)
.
'
</td>
'
;
...
...
@@ -755,7 +760,13 @@ class DaftarProposalController extends Controller
$status
=
$request
->
status
;
$tahun
=
$request
->
tahun
;
return
Excel
::
download
(
new
DaftarProposalExport
(
$jenis
,
$status
,
$tahun
),
'seleksi_export.xlsx'
);
// dd($jenis, $tahun, $status);
return
Excel
::
download
(
new
DaftarProposalExport
(
$jenis
,
$status
,
$tahun
),
'daftar_seleksi_internal_'
.
$tahun
.
'-export_pmw.xlsx'
);
// $daftarProposalExport = new DaftarProposalExport($jenis, $status, $tahun);
// $data = $daftarProposalExport->view(); // Mendapatkan koleksi data
// return $data;
}
public
function
cetak_daftar_belmawa
(
Request
$request
)
...
...
@@ -795,8 +806,8 @@ class DaftarProposalController extends Controller
}
$data
=
DaftarProposal
::
with
(
'rKelompokDetil'
)
->
select
(
"*"
)
->
selectRaw
(
" round((ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_1) + ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_2 )) / 2, 2) as rata "
)
->
whereRaw
(
$statement
)
->
get
();
->
select
(
"*"
)
->
selectRaw
(
" round((ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_1) + ambil_jumlah_penilaian_seleksi(reviewer_proposal_id_2 )) / 2, 2) as rata "
)
->
whereRaw
(
$statement
)
->
get
();
$result
=
[];
$x
=
0
;
...
...
app/Http/Controllers/Operator/ProposalController.php
View file @
6c0dbf84
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Reviewer/DaftarSeleksiController.php
View file @
6c0dbf84
This diff is collapsed.
Click to expand it.
app/Models/BuktiAnggaran.php
0 → 100644
View file @
6c0dbf84
<?php
namespace
App\Models
;
use
App\Traits\UuidTrait
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Carbon\Carbon
;
class
BuktiAnggaran
extends
Model
{
use
HasFactory
,
SoftDeletes
,
UuidTrait
;
protected
$table
=
'bukti_anggaran'
;
protected
$primaryKey
=
'id'
;
public
$incrementing
=
false
;
protected
$keyType
=
'string'
;
protected
$fillable
=
[
'proposal_id'
,
'monev_id'
,
'nama_kegiatan'
,
'nama_barang'
,
'kuantitas'
,
'jenis_satuan'
,
'harga_satuan'
,
'total_harga_per'
,
'total_harga_seluruh'
,
'nota_file'
,
'created_user'
,
'updated_user'
,
'deleted_user'
,
];
protected
$dates
=
[
'created_at'
,
'updated_at'
,
'deleted_at'
];
// Jika ada relasi, tambahkan disini
public
function
rProposal
()
{
return
$this
->
belongsTo
(
Proposal
::
class
,
'proposal_id'
,
'proposal_id'
);
}
public
function
rMonev
()
{
return
$this
->
belongsTo
(
MonevInternal
::
class
,
'monev_id'
,
'id'
);
}
}
app/Models/MonevInternal.php
View file @
6c0dbf84
...
...
@@ -35,6 +35,8 @@ class MonevInternal extends Model
'kemajuan_date'
,
'akhir_file'
,
'akhir_date'
,
'produk_url'
,
'produk_date'
,
];
public
function
rProposal
()
...
...
@@ -62,5 +64,9 @@ class MonevInternal extends Model
return
$this
->
hasMany
(
VDaftarMonev
::
class
,
'proposal_id'
,
'proposal_id'
)
->
with
([
'rReviewerBio1'
,
'rReviewerBio2'
]);
}
public
function
rBuktiAnggaran
()
{
return
$this
->
hasMany
(
BuktiAnggaran
::
class
,
'id'
,
'monev_id'
);
}
}
app/Models/Proposal.php
View file @
6c0dbf84
...
...
@@ -4,7 +4,6 @@ namespace App\Models;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
App\Traits\UuidTrait
;
use
Illuminate\Database\Eloquent\Model
;
class
Proposal
extends
Model
...
...
@@ -110,6 +109,11 @@ class Proposal extends Model
return
$this
->
hasOne
(
ReviewerProposal
::
class
,
'proposal_id'
,
'proposal_id'
);
}
public
function
rBuktiAnggaran
()
{
return
$this
->
hasMany
(
BuktiAnggaran
::
class
,
'proposal_id'
,
'proposal_id'
);
}
public
function
rBelmawa
()
{
return
$this
->
hasOne
(
SeleksiBelmawa
::
class
,
'proposal_id'
,
'proposal_id'
);
...
...
resources/views/auth/login.blade.php
View file @
6c0dbf84
...
...
@@ -30,7 +30,7 @@
<div
class=
"bg-primary"
>
<div
class=
"text-primary text-center p-4"
>
<h5
class=
"text-white font-size-20"
>
LOGIN
</h5>
<p
class=
"text-white-50"
>
Sistem Informasi PMW
.
</p>
<p
class=
"text-white-50"
>
Sistem Informasi PMW
</p>
<a
href=
"{{ url('/') }}"
class=
"logo logo-admin"
>
<img
src=
"{{ asset('theme/images/logo-login.png') }}"
height=
"66"
alt=
"logo"
>
</a>
...
...
@@ -68,7 +68,7 @@
</div>
<div
class=
"mt-5 text-center"
>
<p
class=
"mb-0"
>
©
<script>
document
.
write
(
new
Date
().
getFullYear
())
</script>
SIM PMW. Crafted with
<i
class=
"mdi mdi-heart text-danger"
></i>
by PPTI
</p>
<p
class=
"mb-0"
>
©
<script>
document
.
write
(
new
Date
().
getFullYear
())
</script>
SIM PMW. Crafted with
<i
class=
"mdi mdi-heart text-danger"
></i>
by PPTI
UNESA
</p>
</div>
...
...
resources/views/backend/dosen/proposal/index.blade.php
View file @
6c0dbf84
...
...
@@ -110,10 +110,10 @@
@endif
</td>
<td>
<a data-toggle="
tooltip
" data-id="
{{
$item
->
proposal_id
}}
" data-original-title="
Lihat
" class="
btn
btn
-
info
btn
-
sm
lihatDet
"><i class="
far
fa
-
eye
"></i> Lihat</a>
<a data-toggle="
tooltip
" data-id="
{{
$item
->
proposal_id
}}
" data-original-title="
Lihat
" class="
btn
btn
-
info
btn
-
sm
form
-
control
mb
-
2
lihatDet
"><i class="
far
fa
-
eye
"></i> Lihat</a>
@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="
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>
<a onclick="
setuju
(
'{{ encrypt($item->proposal_id) }}'
,
'row-{{ $token }}'
)
" class="
btn
btn
-
success
btn
-
sm
form
-
control
mb
-
2
"><i class="
fas
fa
-
check
"></i> Setuju</a>
<a href="" id="
revPro
" data-toggle="
modal
" data-target='#practice_modal' data-id="
{{
encrypt
(
$item
->
proposal_id
)
}}
" class="
btn
btn
-
danger
btn
-
sm
form
-
control
"><i class="
fas
fa
-
times
"></i> Tolak</a>
@endif
</td>
</tr>
...
...
@@ -266,6 +266,12 @@ function setuju(id, rowId){
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];
}
// Buka video dalam Magnific Popup jika valid, buka di tab baru jika tidak
if (isValidYouTubeUrl(videoUrl)) {
$.magnificPopup.open({
...
...
resources/views/backend/mahasiswa/proposal/index.blade.php
View file @
6c0dbf84
...
...
@@ -248,71 +248,79 @@
@if (count(
$proposal
) > 0)
<script>
$(document).ready(function() {
// Event handler untuk tombol "
Lihat
Video
" dengan ID preview-video
$('#preview-video').on('click', function() {
var videoUrl = $(this).attr('data-video');
// console.log(videoUrl);
// Event handler untuk tombol "
Lihat
Video
" dengan ID preview-video
$('#preview-video').on('click', function() {
var videoUrl = $(this).attr('data-video');
// console.log(videoUrl);
if (videoUrl) {
// Buka video dalam Magnific Popup
if (videoUrl.includes('youtu.be')) {
// Konversi ke format youtube.com/watch?v=xxxxx
videoUrl = videoUrl.replace('youtu.be/', 'youtube.com/watch?v=');
}
if (videoUrl) {
// Buka video dalam Magnific Popup
if (videoUrl.includes('youtu.be')) {
// Konversi ke format youtube.com/watch?v=xxxxx
videoUrl = videoUrl.replace('youtu.be/', 'youtube.com/watch?v=');
}
// Buka video dalam Magnific Popup jika valid, buka di tab baru jika tidak
if (isValidYouTubeUrl(videoUrl)) {
$.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() {
// Sembunyikan modal lama saat Magnific Popup dibuka
$('#{{ 'lihat'.
$item->proposal_id
}}').modal('hide');
// Menghapus parameter query dari URL
if (videoUrl.includes('youtu.be')) {
videoUrl = videoUrl.split('?')[0];
} else if (videoUrl.includes('youtube.com/watch?v=')) {
videoUrl = videoUrl.split('&')[0];
}
// Buka video dalam Magnific Popup jika valid, buka di tab baru jika tidak
if (isValidYouTubeUrl(videoUrl)) {
$.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() {
// Sembunyikan modal lama saat Magnific Popup dibuka
$('#{{ 'lihat'.
$item->proposal_id
}}').modal('hide');
// Mulai autoplay video setelah Magnific Popup dibuka
var iframe = this.content.find('iframe');
if (iframe.length > 0) {
var videoSrc = iframe.attr('src');
iframe.attr('src', videoSrc + '&autoplay=1'); // Tambahkan autoplay=1 ke URL video
}
},
close: function() {
// Tampilkan kembali modal lama setelah Magnific Popup ditutup
$('#{{ 'lihat'.
$item->proposal_id
}}').modal('show');
// Mulai autoplay video setelah Magnific Popup dibuka
var iframe = this.content.find('iframe');
if (iframe.length > 0) {
var videoSrc = iframe.attr('src');
iframe.attr('src', videoSrc + '&autoplay=1'); // Tambahkan autoplay=1 ke URL video
}
},
close: function() {
// Tampilkan kembali modal lama setelah Magnific Popup ditutup
$('#{{ 'lihat'.
$item->proposal_id
}}').modal('show');
// Hentikan autoplay video saat Magnific Popup ditutup
var iframe = this.content.find('iframe');
if (iframe.length > 0) {
var videoSrc = iframe.attr('src');
iframe.attr('src', videoSrc.replace('&autoplay=1', '')); // Hapus autoplay=1 dari URL video
}
// Hentikan autoplay video saat Magnific Popup ditutup
var iframe = this.content.find('iframe');
if (iframe.length > 0) {
var videoSrc = iframe.attr('src');
iframe.attr('src', videoSrc.replace('&autoplay=1', '')); // Hapus autoplay=1 dari URL video
}
}
});
} else {
// Tampilkan pesan kesalahan jika URL video tidak valid
window.open(videoUrl, '_blank');
}
}
else {
console.error('URL video tidak valid:', videoUrl);
}
}
);
function isValidYouTubeUrl(url) {
// Lakukan validasi sederhana menggunakan ekspresi reguler
return /^(http(s)?:\/\/)?((w)
{
3
}
.)?youtu(be|.be)?(\.com)?\/.+/gm.test(u
rl);
}
);
} else {
// Buka video di tab baru jika tidak valid
window.open(videoUrl, '_blank'
);
}
} else {
console.error('URL video tidak valid:', videoU
rl);
}
});
</script>
function isValidYouTubeUrl(url) {
// Lakukan validasi sederhana menggunakan ekspresi reguler
return /^(http(s)?:\/\/)?((w)
{
3
}
\.)?youtu(be|\.be)?(\.com)?\/.+/gm.test(url);
}
});
</script>
@endif
{{-- <script>
...
...
resources/views/backend/operator/daftar_proposal/index.blade.php
View file @
6c0dbf84
...
...
@@ -81,9 +81,9 @@
<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
style="
text
-
align
:
center
;
vertical
-
align
:
middle
"
>
<tr>
<th id</th>
<th
>
id</th>
<th width='5%'>Kode Kelompok</th>
<th width='15%'>Jenis PMW</th>
<th width='20%'>Judul Proposal</th>
...
...
resources/views/backend/reviewer/seleksi/index.blade.php
View file @
6c0dbf84
...
...
@@ -75,7 +75,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
" valign="
middle
"
>
<tr>
<th>id</th>
<th>Kode Kelompok</th>
...
...
routes/web.php
View file @
6c0dbf84
...
...
@@ -109,6 +109,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
//monev-ii -> anggaran
Route
::
get
(
'/monev/II/anggaran/{id}'
,
[
MonevMahasiswa
::
class
,
'buktiAnggaran'
])
->
name
(
'monev-anggaran'
);
Route
::
post
(
'/monev/II/anggaran/store'
,
[
MonevMahasiswa
::
class
,
'storeAnggaran'
])
->
name
(
'monev-anggaran-store'
);
//luaran
Route
::
resource
(
'luaran'
,
LuaranMahasiswa
::
class
);
...
...
@@ -182,8 +183,8 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route
::
post
(
'seleksi-internal-proposal-jenis'
,
[
DaftarProposalController
::
class
,
'change_jenis'
])
->
name
(
'seleksi-internal-proposal-jenis'
);
Route
::
post
(
'seleksi-internal-reviewer-approval'
,
[
DaftarProposalController
::
class
,
'approval'
])
->
name
(
'seleksi-internal.approval'
);
Route
::
get
(
'getDaftarProposal'
,
[
DaftarProposalController
::
class
,
'getData'
])
->
name
(
'getDaftarProposal'
);
Route
::
get
(
'cetak-daftar-proposal'
,
[
DaftarProposalController
::
class
,
'cetak_daftar_proposal'
])
->
name
(
'cetak-daftar-proposal'
);
Route
::
get
(
'cetak-daftar-proposal-new'
,
[
DaftarProposalController
::
class
,
'cetak_daftar_proposal_new'
])
->
name
(
'cetak-daftar-proposal-new'
);
Route
::
get
(
'cetak-daftar-proposal
-new
'
,
[
DaftarProposalController
::
class
,
'cetak_daftar_proposal'
])
->
name
(
'cetak-daftar-proposal'
);
//
Route::get('cetak-daftar-proposal-new', [DaftarProposalController::class, 'cetak_daftar_proposal_new'])->name('cetak-daftar-proposal-new');
Route
::
post
(
'seleksi-internal/buka-penilaian'
,
[
DaftarProposalController
::
class
,
'bukaPenilaian'
])
->
name
(
'seleksi-internal.buka-penilaian'
);
// SELEKSI BELMAWA
...
...
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