Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpkm
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
Farendi Giotivano R.P
simpkm
Commits
00619a49
Commit
00619a49
authored
2 years ago
by
Farendi Giotivano R.P
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update proposal dan kelompok
parent
42df44c1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
237 additions
and
128 deletions
+237
-128
app/Http/Controllers/Dosen/KelompokController.php
+34
-0
app/Http/Controllers/Dosen/ProposalController.php
+57
-0
app/Http/Controllers/Mahasiswa/KelompokController.php
+1
-1
app/Http/Controllers/Mahasiswa/ProposalController.php
+13
-2
resources/views/backend/dosen/kelompok/index.blade.php
+47
-79
resources/views/backend/dosen/proposal/index.blade.php
+78
-44
resources/views/backend/mahasiswa/kelompok/index.blade.php
+3
-1
resources/views/backend/mahasiswa/proposal/index.blade.php
+1
-1
routes/web.php
+3
-0
No files found.
app/Http/Controllers/Dosen/KelompokController.php
View file @
00619a49
...
...
@@ -80,4 +80,38 @@ class KelompokController extends Controller
return
redirect
()
->
route
(
'dosen.kelompok.index'
);
}
public
function
lihat
(
Request
$request
)
{
$kelompok_detil
=
KelompokDetail
::
where
(
'kelompok_id'
,
$request
->
kelompok_id
)
->
get
();
$data
=
''
;
$no
=
1
;
$anggota
=
0
;
foreach
(
$kelompok_detil
as
$key
=>
$value
)
{
if
(
$value
->
status_ketua
==
1
)
$keterangan
=
"Ketua"
;
else
{
$anggota
++
;
$keterangan
=
"Anggota "
.
$anggota
?:
1
;
}
$data
.=
"
<tr>
<td>"
.
$no
.
"</td>
<td>"
.
$value
->
nama
.
"</td>
<td>"
.
$value
->
nim
.
"</td>
<td>"
.
$value
->
fakultas
.
"</td>
<td>"
.
$value
->
prodi
.
"</td>
<td>"
.
$keterangan
.
"</td>
</tr>
"
;
$no
++
;
}
$response
[
'html'
]
=
$data
;
echo
json_encode
(
$response
);
}
}
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Dosen/ProposalController.php
View file @
00619a49
...
...
@@ -64,4 +64,61 @@ class ProposalController extends Controller
return
redirect
()
->
route
(
'dosen.proposal.index'
);
}
public
function
lihat
(
Request
$request
)
{
$item
=
Proposal
::
where
(
'proposal_id'
,
$request
->
proposal_id
)
->
first
();
$data
=
''
;
$no
=
1
;
if
(
$item
->
upload_dokumen
){
$dokumen
=
' <a href="https://statik.unesa.ac.id/simpkm/proposal/'
.
$item
->
rPeriode
->
nama
.
'/'
.
$item
->
upload_dokumen
.
'" target="_blank" class="btn btn-success btn-sm"> <i class="far fa-eye"></i> Lihat Proposal</a>
<iframe id="view-pdf" width="100%" height="400px" src="https://statik.unesa.ac.id/simpkm/proposal/'
.
$item
->
rPeriode
->
nama
.
'/'
.
$item
->
upload_dokumen
.
'" frameborder="0"></iframe>'
;
}
else
{
$dokumen
=
'<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert">
<strong>Informasi!</strong><br/> File tidak ditemukan.
</div>'
;
}
if
(
is_null
(
$item
->
status
)){
$status
=
'<span class="badge bg-danger">Menunggu Persetujuan Dosen</span>'
;
}
else
{
$status
=
'<span class="badge bg-success">Sudah Disetujui Dosen</span>'
;
}
$data
.=
"
<tr>
<td>Judul Proposal</td>
<td>"
.
$item
->
judul
.
"</td>
</tr>
<tr>
<td>Jenis PKM</td>
<td>"
.
$item
->
rJenis
->
nama
.
"</td>
</tr>
<tr>
<td>Status</td>
<td>"
.
$status
.
"</td>
</tr>
<tr>
<td>Proposal</td>
<td>"
.
$dokumen
.
"</td>
</tr>
"
;
$response
[
'html'
]
=
$data
;
echo
json_encode
(
$response
);
}
public
function
approve
(
$id
)
{
$proposal
=
Proposal
::
query
()
->
find
(
decrypt
(
$id
));
return
response
()
->
json
([
'data'
=>
$proposal
]);
}
}
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Mahasiswa/KelompokController.php
View file @
00619a49
...
...
@@ -40,7 +40,7 @@ class KelompokController extends Controller
->
orderBy
(
'kode'
)
->
get
();
$cekKel
=
$kelompok
->
where
(
'created_user'
,
auth
()
->
user
()
->
id
)
->
count
();
$cekKel
=
$kelompok
->
where
(
'created_user'
,
auth
()
->
user
()
->
id
)
->
whereIn
(
'status'
,
[
0
,
1
])
->
count
();
// $getMhs = GetDataApiController::getAccount(20030244001);
// dd($getMhs);
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Mahasiswa/ProposalController.php
View file @
00619a49
...
...
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Mahasiswa;
use
App\Http\Controllers\Controller
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\GetDataApiController
;
use
App\Models\JadwalKegiatan
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
...
...
@@ -12,6 +13,7 @@ use App\Models\Proposal;
use
App\Models\Kelompok
;
use
App\Models\Periode
;
use
App\Models\Jenis
;
use
Carbon\Carbon
;
use
Session
;
use
Alert
;
...
...
@@ -70,12 +72,20 @@ class ProposalController extends Controller
$kelompok
=
Kelompok
::
where
(
'created_user'
,
auth
()
->
user
()
->
id
)
->
where
(
'periode_id'
,
$periode
->
periode_id
)
->
where
(
'
kirim
'
,
'1'
)
->
where
(
'
status
'
,
'1'
)
->
first
();
$cekproposal
=
Proposal
::
where
(
'created_user'
,
auth
()
->
user
()
->
id
)
->
where
(
'periode_id'
,
$periode
->
periode_id
)
->
first
();
$jadwal
=
JadwalKegiatan
::
where
(
'periode_id'
,
$periode
->
where
(
'status'
,
1
)
->
first
()
->
periode_id
)
->
where
(
'nama'
,
'Upload Proposal Seleksi Internal'
)
->
first
();
if
((
$jadwal
->
tanggal_mulai
<=
Carbon
::
now
())
&&
(
$jadwal
->
tanggal_selesai
>=
Carbon
::
now
())){
return
redirect
()
->
route
(
'mahasiswa.proposal.index'
)
->
with
(
'warning'
,
'Batas Pengajuan telah berakhir!'
);
}
if
(
$cekproposal
)
{
return
redirect
()
->
route
(
'mahasiswa.proposal.index'
)
->
with
(
'warning'
,
'Sudah ada Proposal yang di ajukan!'
);
}
...
...
@@ -91,7 +101,8 @@ class ProposalController extends Controller
'periode'
=>
$periode
,
'jenis'
=>
$jenis
,
'kelompok'
=>
$kelompok
,
'proposal'
=>
$proposal
'proposal'
=>
$proposal
,
'jadwal'
=>
$jadwal
,
];
return
view
(
'backend.mahasiswa.proposal.create'
,
$data
);
...
...
This diff is collapsed.
Click to expand it.
resources/views/backend/dosen/kelompok/index.blade.php
View file @
00619a49
...
...
@@ -88,7 +88,8 @@
</td>
<td>
<button data-bs-toggle="
modal
" data-bs-target="
{{
'#lihat'
.
$item
->
kelompok_id
}}
" href="
{{
URL
::
to
(
'mahasiswa/kelompok-new'
,
encrypt
(
$item
->
kelompok_id
))
}}
" class="
btn
btn
-
info
btn
-
sm
"><i class="
far
fa
-
eye
"></i> Lihat</button>
{{-- <button data-bs-toggle="
modal
" data-bs-target="
{{
'#lihat'
.
$item
->
kelompok_id
}}
" href="
{{
URL
::
to
(
'mahasiswa/kelompok-new'
,
encrypt
(
$item
->
kelompok_id
))
}}
" class="
btn
btn
-
info
btn
-
sm
"><i class="
far
fa
-
eye
"></i> Lihat</button> --}}
<a data-toggle="
tooltip
" data-id="
{{
$item
->
kelompok_id
}}
" data-original-title="
Lihat
" class="
btn
btn
-
info
btn
-
sm
lihatDet
"><i class="
far
fa
-
eye
"></i> Lihat</a>
@if(
$item->status
== 0)
<a onclick="
setuju
(
'{{ encrypt($item->kelompok_id) }}'
,
'row-{{ $token }}'
)
" class="
btn
btn
-
success
btn
-
sm
"><i class="
fas
fa
-
check
"></i> Setuju</a>
...
...
@@ -100,19 +101,30 @@
<a onclick="
hapus
(
'{{ encrypt($item->kelompok_id) }}'
,
'row-{{ $token }}'
)
" class="
btn
btn
-
danger
btn
-
sm
">Hapus</a>
@endif
<div id="
{{
'lihat'
.
$item
->
kelompok_id
}}
" class="
modal
fade
" tabindex="
-
1
" role="
dialog
"
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
<div id="
lihatDetail
" class="
modal
fade
">
<div class="
modal
-
dialog
modal
-
xl
">
<div class="
modal
-
content
">
<div class="
modal
-
header
">
<h5 class="
modal
-
title
" id="
lihatLabel
">Data Kelompok
</h5>
<h5 class="
modal
-
title
" id="
lihatLabel
">Detail Kelompok
</h5>
<button type="
button
" class="
btn
-
close
" data-bs-dismiss="
modal
" aria-label="
Close
"></button>
</div>
<div class="
modal
-
body
">
<p>
<div class="
table
-
responsive
">
<table class="
table
table
-
striped
mb
-
0
">
<table class="
table
table
-
bordered
data
-
table
mb
-
0
" id="
tableDetail
">
<thead>
<tr>
<th>No</th>
...
...
@@ -124,86 +136,14 @@
</tr>
</thead>
<tbody>
<tr>
@foreach (
$item->rAnggota
as
$value
)
<tr>
<td>{{
$loop->iteration
}}</td>
<td>{{
$value->nama
}}</td>
<td>{{
$value->nim
}}</td>
<td>{{
$value->fakultas
}}</td>
<td>{{
$value->prodi
}}</td>
<td>
@if(
$value->status_ketua
== 1)
Ketua
@else
Anggota {{
$loop->iteration
-1 }}
@endif
</td>
</tr>
@endforeach
</tr>
</tbody>
</table>
</div>
</p>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
@php
/*
@endphp
<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.kelompok.store'
)
}}
" method="
POST
">
@csrf
<div class="
modal
-
header
">
<h5 class="
modal
-
title
" id="
myModalLabel
">Tambah Kelompok Baru</h5>
<button type="
button
" class="
btn
-
close
" data-bs-dismiss="
modal
" aria-label="
Close
"></button>
</div>
<div class="
modal
-
body
">
<div class="
col
-
12
">
<h5 class="
font
-
size
-
16
">Silahkan pilih dosen pembimbing : </h5>
<p>
<input type="
hidden
" name="
periode
" value="
{{
$periode
->
where
(
'status'
,
1
)
->
first
()
->
periode_id
;
}}
" >
<select class="
form
-
select
" style="
width
:
100
%
" id="
selectmodal
" name="
dosen
">
<option selected>Pilih Dosen</option>
@foreach(
$dosen
as
$item
)
<option value="
{{
encrypt
(
$item
[
'id_sdm'
]
.
'_'
.
$item
[
'nm_sdm'
]
.
'_'
.
$item
[
'nidn'
])
}}
">{{
$item['nm_sdm']
.' - '.
$item['prodi']
}}</option>
@endforeach
</select>
</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>
</div>
</form>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
@php
*/
@endphp
@endsection
@section('js')
...
...
@@ -297,5 +237,33 @@
})
}
$
(
document
)
.
ready
(
function
(){
$
(
'#datatable'
)
.
on
(
'click'
,
'.lihatDet'
,
function
(){
var
kelId
=
$
(
this
)
.
attr
(
'data-id'
);
if
(
kelId
!=
null
||
kelId
!=
''
){
// Empty modal data
$
(
'#tableDetail tbody'
)
.
empty
();
$
.
ajax
({
url
:
"
{
{route('dosen.kelompok.lihat')}
}
"
,
data
:
{
"kelompok_id"
:
kelId
,
},
dataType
:
'json'
,
success
:
function
(
response
){
// Add user details
$
(
'#tableDetail tbody'
)
.
html
(
response
.
html
);
// Display Modal
$
(
'#lihatDetail'
)
.
modal
(
'show'
);
}
});
}
});
});
</
script
>
@
endsection
This diff is collapsed.
Click to expand it.
resources/views/backend/dosen/proposal/index.blade.php
View file @
00619a49
...
...
@@ -97,14 +97,27 @@
@endif
</td>
<td>
<
button data-bs-toggle="
modal
" data-bs-target="
{{
'#lihat'
.
$item
->
proposal_id
}}
" href="
{{
URL
::
to
(
'mahasiswa/kelompok-new'
,
encrypt
(
$item
->
proposal_id
))
}}
" class="
btn
btn
-
info
btn
-
sm
"><i class="
far
fa
-
eye
"></i> Lihat</button
>
<
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
>
@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="
editCompany
" data-toggle="
modal
" data-target='#practice_modal' data-id="
{{
encrypt
(
$item
->
proposal_id
)
}}
" class="
btn
btn
-
danger
btn
-
sm
">Tolak</a> --}}
@endif
<div id="
{{
'lihat'
.
$item
->
proposal_id
}}
" class="
modal
fade
" tabindex="
-
1
" role="
dialog
"
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
<div id="
lihatDetail
" class="
modal
fade
">
<div class="
modal
-
dialog
modal
-
xl
">
<div class="
modal
-
content
">
<div class="
modal
-
header
">
...
...
@@ -114,38 +127,11 @@
<div class="
modal
-
body
">
<p>
<div class="
table
-
responsive
">
<table class="
table
mb
-
0
">
<tr>
<th>Judul Proposal</th>
<td>{{
$item->judul
}}</td>
</tr>
<tr>
<th>Jenis PKM</th>
<td>{{
$item->rJenis
->nama }}</td>
</tr>
<tr>
<th>Status</th>
<td>
@if(is_null(
$item->status
))
<span class="
badge
bg
-
danger
">Menunggu Persetujuan Dosen</span>
@else
<span class="
badge
bg
-
success
">Sudah Disetujui Dosen</span>
@endif
</td>
</tr>
<tr>
<th>Proposal</th>
<td>
@if(
$item->upload_dokumen
)
<a href="
https
://
statik
.
unesa
.
ac
.
id
/
simpkm
/
proposal
/
{{
$item
->
rPeriode
->
nama
}}
/
{{
$item
->
upload_dokumen
}}
" target="
_blank
" class="
btn
btn
-
success
btn
-
sm
"> <i class="
far
fa
-
eye
"></i> Lihat Proposal</a>
<iframe id="
view
-
pdf
" width="
100
%
" height="
400
px
" src="
https
://
statik
.
unesa
.
ac
.
id
/
simpkm
/
proposal
/
{{
$item
->
rPeriode
->
nama
}}
/
{{
$item
->
upload_dokumen
}}
" frameborder="
0
"></iframe>
@else
<div class="
alert
alert
-
danger
alert
-
dismissible
fade
show
mb
-
0
" role="
alert
">
<strong>Informasi!</strong><br/> File tidak ditemukan.
</div>
@endif
</td>
</tr>
<table class="
table
mb
-
0
" id="
tableDetail
">
<tbody>
</tbody>
</table>
</div>
</p>
...
...
@@ -153,18 +139,20 @@
</div>
</div>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="
modal
fade
" id="
practice_modal
">
<div class="
modal
-
dialog
">
<form id="
companydata
">
<div class="
modal
-
content
">
<input type="
hidden
" id="
proposal_id
" name="
proposal_id
" value="">
<div class="
modal
-
body
">
<input type="
text
" name="
judul
" id="
judul
" value="" class="
form
-
control
">
</div>
<input type="
submit
" value="
Submit
" id="
submit
" class="
btn
btn
-
sm
btn
-
outline
-
danger
py
-
0
" style="
font
-
size
:
0.8
em
;
">
</div>
</form>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end row -->
@endsection
...
...
@@ -213,5 +201,51 @@ function setuju(id, rowId){
}
})
}
$(document).ready(function(){
$('#datatable').on('click','.lihatDet',function(){
var proId = $(this).attr('data-id');
if(proId != null || proId != ''){
// Empty modal data
$('#tableDetail tbody').empty();
$.ajax({
url: "
{{
route
(
'dosen.proposal.lihat'
)}}
",
data : {
"
proposal_id
": proId,
},
dataType: 'json',
success: function(response){
// Add user details
$('#tableDetail tbody').html(response.html);
// Display Modal
$('#lihatDetail').modal('show');
}
});
}
});
});
$('body').on('click', '#editCompany', function (event) {
event.preventDefault();
var id = $(this).data('id');
console.log(id)
$.get('proposal-approv/' + id, function (data) {
$('#userCrudModal').html("
Edit
category
");
$('#submit').val("
Edit
category
");
$('#practice_modal').modal('show');
$('#proposal_id').val(data.data.proposal_id);
$('#judul').val(data.data.judul);
})
});
</script>
@endsection
This diff is collapsed.
Click to expand it.
resources/views/backend/mahasiswa/kelompok/index.blade.php
View file @
00619a49
...
...
@@ -83,7 +83,9 @@
<td>
@if(!is_null(
$item->kirim
))
@if(
$item->status
== 0)
<span class="
badge
bg
-
danger
">Menunggu Persetujuan Dosen</span>
<span class="
badge
bg
-
warning
">Menunggu Persetujuan Dosen</span>
@elseif(
$item->status
== 2)
<span class="
badge
bg
-
danger
">Di Tolak Dosen</span>
@else
<span class="
badge
bg
-
success
">Sudah Disetujui Dosen</span>
@endif
...
...
This diff is collapsed.
Click to expand it.
resources/views/backend/mahasiswa/proposal/index.blade.php
View file @
00619a49
...
...
@@ -23,7 +23,7 @@
</div>
<div class="
col
-
md
-
4
">
<div class="
float
-
end
d
-
none
d
-
md
-
block
">
<a href="
{{
URL
::
to
(
'mahasiswa/proposal/create'
)
}}
" type="
button
" class="
btn
btn
-
primary
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
plus
-
circle
"></i> Tambah Data</a>
{{-- <a href="
{{
URL
::
to
(
'mahasiswa/proposal/create'
)
}}
" type="
button
" class="
btn
btn
-
primary
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
plus
-
circle
"></i> Tambah Data</a> --}}
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
00619a49
...
...
@@ -119,10 +119,13 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route
::
get
(
'/kelompok-new/{id}'
,
[
DosenKelompok
::
class
,
'newkelompok'
])
->
name
(
'kelompok.createnew'
);
Route
::
post
(
'/kelompok-tolak'
,
[
DosenKelompok
::
class
,
'tolak'
])
->
name
(
'kelompok.tolak'
);
Route
::
post
(
'/kelompok-terima'
,
[
DosenKelompok
::
class
,
'terima'
])
->
name
(
'kelompok.terima'
);
Route
::
get
(
'/kelompok-lihat'
,
[
DosenKelompok
::
class
,
'lihat'
])
->
name
(
'kelompok.lihat'
);
//proposal
Route
::
resource
(
'proposal'
,
DosenProposal
::
class
);
Route
::
post
(
'/proposal-setuju'
,
[
DosenProposal
::
class
,
'setuju'
])
->
name
(
'proposal.setuju'
);
Route
::
get
(
'/proposal-lihat'
,
[
DosenProposal
::
class
,
'lihat'
])
->
name
(
'proposal.lihat'
);
Route
::
get
(
'/proposal-approv/{id}'
,
[
DosenProposal
::
class
,
'approve'
])
->
name
(
'proposal.approv'
);
//seleksi
Route
::
resource
(
'seleksi'
,
DosenSeleksi
::
class
);
...
...
This diff is collapsed.
Click to expand it.
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