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
aea19bba
Commit
aea19bba
authored
Apr 22, 2024
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proposal + URL (Mahasiswa)
parent
e5fa86f6
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
199 additions
and
65 deletions
+199
-65
app/Http/Controllers/Dosen/ProposalController.php
+1
-2
app/Http/Controllers/Mahasiswa/MonevController.php
+1
-1
app/Http/Controllers/Mahasiswa/ProposalController.php
+12
-12
app/Models/Proposal.php
+5
-0
app/Models/ProposalUrl.php
+1
-19
resources/views/backend/mahasiswa/proposal/create.blade.php
+68
-17
resources/views/backend/mahasiswa/proposal/index.blade.php
+108
-13
resources/views/layouts/headpg.blade.php
+1
-1
resources/views/layouts/master.blade.php
+2
-0
No files found.
app/Http/Controllers/Dosen/ProposalController.php
View file @
aea19bba
...
@@ -109,7 +109,7 @@ class ProposalController extends Controller
...
@@ -109,7 +109,7 @@ class ProposalController extends Controller
</tr>
</tr>
<tr>
<tr>
<td>Video Produk</td>
<td>Video Produk</td>
<td>"
.
$item
[
'url'
]
->
url
`
.
"</td>
<td>"
.
$item
[
'url'
]
->
url
.
"</td>
</tr>
</tr>
"
;
"
;
...
@@ -142,5 +142,4 @@ class ProposalController extends Controller
...
@@ -142,5 +142,4 @@ class ProposalController extends Controller
return
redirect
()
->
route
(
'dosen.proposal.index'
);
return
redirect
()
->
route
(
'dosen.proposal.index'
);
}
}
}
}
app/Http/Controllers/Mahasiswa/MonevController.php
View file @
aea19bba
...
@@ -120,7 +120,7 @@ class MonevController extends Controller
...
@@ -120,7 +120,7 @@ class MonevController extends Controller
$file_nama
=
$proposal
->
rProposal
->
rPeriode
->
nama
.
'_'
.
$proposal
->
rProposal
->
proposal_id
.
'.'
.
$pro
[
'file'
]
->
getClientOriginalExtension
();
$file_nama
=
$proposal
->
rProposal
->
rPeriode
->
nama
.
'_'
.
$proposal
->
rProposal
->
proposal_id
.
'.'
.
$pro
[
'file'
]
->
getClientOriginalExtension
();
Storage
::
disk
(
'
static
'
)
->
put
(
'simpmw/monev/'
.
$pro
[
'monev'
]
.
'/'
.
$pro
[
'type'
]
.
'/'
.
$file_nama
,
file_get_contents
(
$pro
[
'file'
]
->
getRealPath
()));
Storage
::
disk
(
'
local
'
)
->
put
(
'simpmw/monev/'
.
$pro
[
'monev'
]
.
'/'
.
$pro
[
'type'
]
.
'/'
.
$file_nama
,
file_get_contents
(
$pro
[
'file'
]
->
getRealPath
()));
if
(
$pro
[
'type'
]
==
'logbook'
){
if
(
$pro
[
'type'
]
==
'logbook'
){
$proposal
->
logbook_file
=
$file_nama
;
$proposal
->
logbook_file
=
$file_nama
;
...
...
app/Http/Controllers/Mahasiswa/ProposalController.php
View file @
aea19bba
...
@@ -36,16 +36,16 @@ class ProposalController extends Controller
...
@@ -36,16 +36,16 @@ class ProposalController extends Controller
$periode
=
Periode
::
query
()
->
get
();
$periode
=
Periode
::
query
()
->
get
();
$year
=
!
is_null
(
$request
->
year
)
?
$request
->
year
:
now
()
->
year
;
$year
=
!
is_null
(
$request
->
year
)
?
$request
->
year
:
now
()
->
year
;
$proposal
=
Proposal
::
with
([
'rKelompok'
,
'rJenis'
])
$proposal
=
Proposal
::
with
([
'rKelompok'
,
'rJenis'
,
'rProposalUrl'
])
->
whereHas
(
'rKelompok'
,
function
(
$query
)
use
(
$nim
){
->
whereHas
(
'rKelompok'
,
function
(
$query
)
use
(
$nim
){
$query
->
whereHas
(
'rAnggota'
,
function
(
$query
)
use
(
$nim
){
$query
->
whereHas
(
'rAnggota'
,
function
(
$query
)
use
(
$nim
){
$query
->
where
(
'nim'
,
$nim
);
$query
->
where
(
'nim'
,
$nim
);
});
});
})
})
->
whereYear
(
'created_at'
,
$year
)
->
whereYear
(
'
proposal.
created_at'
,
$year
)
->
orderBy
(
'kelompok_id'
)
->
orderBy
(
'kelompok_id'
)
->
get
();
->
get
();
// dd($proposal->pluck('rProposalUrl.url')->toArray());
$data
=
[
$data
=
[
'proposal'
=>
$proposal
,
'proposal'
=>
$proposal
,
'title'
=>
$title
,
'title'
=>
$title
,
...
@@ -122,11 +122,15 @@ class ProposalController extends Controller
...
@@ -122,11 +122,15 @@ class ProposalController extends Controller
$this
->
validate
(
$request
,
$this
->
validate
(
$request
,
[
[
'file'
=>
'required|mimes:pdf|max:5000'
'file'
=>
'required|mimes:pdf|max:5000'
,
'jenis'
=>
'required|not_in:Pilih Jenis'
,
],
[
],
[
'file.required'
=>
'Tidak ada file yang di upload'
,
'file.required'
=>
'Tidak ada file yang diupload.'
,
'file.mimes'
=>
'File harus pdf'
,
'file.file'
=>
'File harus berupa file.'
,
'file.max'
=>
'File tidak boleh lebih dari 5 mb'
,
'file.mimes'
=>
'File harus berupa file PDF.'
,
'file.max'
=>
'Ukuran file maksimal adalah 5 MB.'
,
'jenis.required'
=>
'Harap pilih jenis PMW.'
,
'jenis.not_in'
=>
'Harap pilih jenis PMW yang valid.'
,
]);
]);
$periode
=
Periode
::
where
(
'status'
,
1
)
->
first
();
$periode
=
Periode
::
where
(
'status'
,
1
)
->
first
();
...
@@ -134,11 +138,7 @@ class ProposalController extends Controller
...
@@ -134,11 +138,7 @@ class ProposalController extends Controller
$file_nama
=
$periode
->
nama
.
'_'
.
$uuid
.
'.'
.
$proposal
[
'file'
]
->
getClientOriginalExtension
();
$file_nama
=
$periode
->
nama
.
'_'
.
$uuid
.
'.'
.
$proposal
[
'file'
]
->
getClientOriginalExtension
();
<<<<<<<
HEAD
Storage
::
disk
(
'local'
)
->
put
(
'simpmw/proposal/'
.
$periode
->
nama
.
'/'
.
$file_nama
,
file_get_contents
(
$proposal
[
'file'
]
->
getRealPath
()));
Storage
::
disk
(
'local'
)
->
put
(
'simpkm/proposal/'
.
$periode
->
nama
.
'/'
.
$file_nama
,
file_get_contents
(
$proposal
[
'file'
]
->
getRealPath
()));
=======
Storage
::
disk
(
'static'
)
->
put
(
'simpmw/proposal/'
.
$periode
->
nama
.
'/'
.
$file_nama
,
file_get_contents
(
$proposal
[
'file'
]
->
getRealPath
()));
>>>>>>>
f50572854f87f0e3e0e9be1c6be0a2fb241bd85c
$kel
=
Proposal
::
create
([
$kel
=
Proposal
::
create
([
'proposal_id'
=>
$uuid
,
'proposal_id'
=>
$uuid
,
...
...
app/Models/Proposal.php
View file @
aea19bba
...
@@ -73,6 +73,11 @@ class Proposal extends Model
...
@@ -73,6 +73,11 @@ class Proposal extends Model
return
$this
->
hasOne
(
Periode
::
class
,
'periode_id'
,
'periode_id'
);
return
$this
->
hasOne
(
Periode
::
class
,
'periode_id'
,
'periode_id'
);
}
}
public
function
rProposalUrl
()
{
return
$this
->
hasOne
(
ProposalUrl
::
class
,
'proposal_id'
,
'proposal_id'
);
}
public
function
rLuaran
()
public
function
rLuaran
()
{
{
return
$this
->
hasMany
(
ProposalLuaran
::
class
,
'proposal_id'
,
'proposal_id'
);
return
$this
->
hasMany
(
ProposalLuaran
::
class
,
'proposal_id'
,
'proposal_id'
);
...
...
app/Models/ProposalUrl.php
View file @
aea19bba
...
@@ -2,15 +2,9 @@
...
@@ -2,15 +2,9 @@
namespace
App\Models
;
namespace
App\Models
;
<<<<<<<
HEAD
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
use
App\Traits\UuidTrait
;
=======
use
App\Traits\UuidTrait
;
use
App\Traits\UuidTrait
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\Model
;
>>>>>>>
f50572854f87f0e3e0e9be1c6be0a2fb241bd85c
class
ProposalUrl
extends
Model
class
ProposalUrl
extends
Model
{
{
...
@@ -20,15 +14,11 @@ class ProposalUrl extends Model
...
@@ -20,15 +14,11 @@ class ProposalUrl extends Model
protected
$table
=
'proposal_url'
;
protected
$table
=
'proposal_url'
;
protected
$primaryKey
=
'id'
;
protected
$primaryKey
=
'id'
;
public
$incrementing
=
false
;
public
$incrementing
=
false
;
<<<<<<<
HEAD
=======
protected
$keyType
=
'string'
;
protected
$keyType
=
'string'
;
>>>>>>>
f50572854f87f0e3e0e9be1c6be0a2fb241bd85c
protected
$fillable
=
[
protected
$fillable
=
[
'id'
,
'id'
,
'url'
,
'url'
,
<<<<<<<
HEAD
'url_name'
,
'url_name'
,
'deskripsi'
,
'deskripsi'
,
'proposal_id'
,
'proposal_id'
,
...
@@ -38,14 +28,6 @@ class ProposalUrl extends Model
...
@@ -38,14 +28,6 @@ class ProposalUrl extends Model
public
function
rProposal
()
public
function
rProposal
()
{
{
return
$this
->
belongsTo
(
Proposal
::
class
,
'proposal_id'
,
'id'
);
return
$this
->
belongsTo
(
Proposal
::
class
,
'proposal_id'
,
'
proposal_
id'
);
}
}
=======
'nama'
,
'deskripsi'
,
'proposal_id'
,
'created_at'
,
'updated_at'
,
];
>>>>>>>
f50572854f87f0e3e0e9be1c6be0a2fb241bd85c
}
}
resources/views/backend/mahasiswa/proposal/create.blade.php
View file @
aea19bba
...
@@ -38,15 +38,15 @@
...
@@ -38,15 +38,15 @@
<h4 class="
card
-
title
">{!!
$title
!!}</h4>
<h4 class="
card
-
title
">{!!
$title
!!}</h4>
<p class="
card
-
title
-
desc
"></p>
<p class="
card
-
title
-
desc
"></p>
<div class="
row
mb
-
3
">
<div class="
row
mb
-
3
">
<label for="
kode
" class="
col
-
sm
-
2
col
-
form
-
label
">Judul</label>
<label for="
kode
" class="
col
-
sm
-
2
col
-
form
-
label
">Judul<
span style="
color
:
red
;
"> *</span><
/label>
<div class="
col
-
sm
-
10
">
<div class="
col
-
sm
-
10
">
<input class="
form
-
control
" type="
text
" id="
judul
" name="
judul
" value="
{{
$proposal
?
$proposal
->
judul
:
''
}}
"
required>
<input class="
form
-
control
" type="
text
" id="
judul
" name="
judul
" value="
{{
old
(
'judul'
,
$proposal
?
$proposal
->
judul
:
''
)
}}
" placeholder="
Judul
Produk
"
required>
<input class="
form
-
control
" type="
hidden
" id="
kode_kelompok
" name="
kode_kelompok
" value="
{{
$proposal
?
$proposal
->
kelompok_id
:
$kelompok
->
kelompok_id
}}
" >
<input class="
form
-
control
" type="
hidden
" id="
kode_kelompok
" name="
kode_kelompok
" value="
{{
$proposal
?
$proposal
->
kelompok_id
:
$kelompok
->
kelompok_id
}}
" >
<input class="
form
-
control
" type="
hidden
" id="
periode_id
" name="
periode_id
" value="
{{
$proposal
?
$proposal
->
periode_id
:
$periode
->
periode_id
}}
" >
<input class="
form
-
control
" type="
hidden
" id="
periode_id
" name="
periode_id
" value="
{{
$proposal
?
$proposal
->
periode_id
:
$periode
->
periode_id
}}
" >
</div>
</div>
</div>
</div>
<div class="
row
mb
-
3
">
<div class="
row
mb
-
3
">
<label class="
col
-
sm
-
2
col
-
form
-
label
">Jenis PMW</label>
<label class="
col
-
sm
-
2
col
-
form
-
label
">Jenis PMW<
span style="
color
:
red
;
"> *</span><
/label>
<div class="
col
-
sm
-
10
">
<div class="
col
-
sm
-
10
">
<select class="
form
-
select
select2
" name="
jenis
">
<select class="
form
-
select
select2
" name="
jenis
">
<option selected>Pilih Jenis</option>
<option selected>Pilih Jenis</option>
...
@@ -54,14 +54,14 @@
...
@@ -54,14 +54,14 @@
<option value="
{{
$item
}}
" {{
$proposal
?
$proposal->jenis_id
==
$item
? 'selected' : '' : '' }}>{{
$pkm
}}</option>
<option value="
{{
$item
}}
" {{
$proposal
?
$proposal->jenis_id
==
$item
? 'selected' : '' : '' }}>{{
$pkm
}}</option>
@endforeach
@endforeach
</select>
</select>
@if (
$errors->has
('jenis')) <span class="
text
-
danger
"><i>{{
$errors->first
('jenis') }}</i></span> @endif
</div>
</div>
</div>
</div>
<div class="
row
mb
-
3
" class="
dropzone
">
<div class="
row
mb
-
3
" class="
dropzone
">
<label for="
kode
" class="
col
-
sm
-
2
col
-
form
-
label
">Upload Proposal</label>
<label for="
kode
" class="
col
-
sm
-
2
col
-
form
-
label
">Upload Proposal<
span style="
color
:
red
;
"> *</span><
/label>
<div class="
col
-
sm
-
8
col
-
lg
-
8
">
<div class="
col
-
sm
-
8
col
-
lg
-
8
">
@if (
$errors->has
('file')) <span class="
text
-
danger
">{{
$errors->first
('file') }}</span> @endif
<input type="
file
" name="
file
" class="
form
-
control
" id="
input
-
file
" accept="
application
/
pdf
">
<input type="
file
" name="
file
" class="
form
-
control
" id="
input
-
file
" accept="
application
/
pdf
">
<<<<<<< HEAD
@if (
$errors->has
('file')) <span class="
text
-
danger
"><i>{{
$errors->first
('file') }}</i></span> @endif
{{-- <iframe id="
view
-
pdf
" width="
80
%
" height="
80
%
" frameborder="
0
" src="
{{
$proposal
?
'https://statik.unesa.ac.id/simpkm/proposal/'
.
$proposal
->
rPeriode
->
nama
.
'/'
.
$proposal
->
upload_dokumen
:
''
}}
"></iframe> --}}
{{-- <iframe id="
view
-
pdf
" width="
80
%
" height="
80
%
" frameborder="
0
" src="
{{
$proposal
?
'https://statik.unesa.ac.id/simpkm/proposal/'
.
$proposal
->
rPeriode
->
nama
.
'/'
.
$proposal
->
upload_dokumen
:
''
}}
"></iframe> --}}
</div>
</div>
<div class="
col
-
sm
-
2
col
-
lg
-
2
">
<div class="
col
-
sm
-
2
col
-
lg
-
2
">
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</div>
</div>
</div>
</div>
<div class="
row
mb
-
3
">
<div class="
row
mb
-
3
">
<label for="
kode
" class="
col
-
sm
-
2
col
-
form
-
label
">URL Video Produk</label>
<label for="
kode
" class="
col
-
sm
-
2
col
-
form
-
label
">URL Video Produk<
span style="
color
:
red
;
"> *</span><
/label>
<div class="
col
-
sm
-
3
col
-
lg
-
3
">
<div class="
col
-
sm
-
3
col
-
lg
-
3
">
<input class="
form
-
control
" type="
text
" id="
url_name
" name="
url_name
" value="
{{
old
(
'url_name'
)
}}
" placeholder="
Nama
Video
Produk
" required>
<input class="
form
-
control
" type="
text
" id="
url_name
" name="
url_name
" value="
{{
old
(
'url_name'
)
}}
" placeholder="
Nama
Video
Produk
" required>
</div>
</div>
...
@@ -80,10 +80,7 @@
...
@@ -80,10 +80,7 @@
<div class="
row
mb
-
3
">
<div class="
row
mb
-
3
">
<div class="
col
-
sm
-
2
col
-
lg
-
2
"></div>
<div class="
col
-
sm
-
2
col
-
lg
-
2
"></div>
<div class="
col
-
sm
-
10
col
-
lg
-
10
">
<div class="
col
-
sm
-
10
col
-
lg
-
10
">
<textarea class="
form
-
control
" type="
text
" id="
deskripsi
" name="
deskripsi
" value="
{{
old
(
'deskripsi'
)
}}
" placeholder="
Deskripsi
...
" required></textarea>
<textarea class="
form
-
control
" type="
text
" id="
deskripsi
" name="
deskripsi
" placeholder="
Deskripsi
...
" required>{{ old('deskripsi') }}</textarea>
=======
<iframe id="
view
-
pdf
" width="
80
%
" height="
80
%
" frameborder="
0
" src="
{{
$proposal
?
'https://statik.unesa.ac.id/simpmw/proposal/'
.
$proposal
->
rPeriode
->
nama
.
'/'
.
$proposal
->
upload_dokumen
:
''
}}
"></iframe>
>>>>>>> f50572854f87f0e3e0e9be1c6be0a2fb241bd85c
</div>
</div>
</div>
</div>
<div class="
mb
-
0
">
<div class="
mb
-
0
">
...
@@ -102,15 +99,16 @@
...
@@ -102,15 +99,16 @@
<!-- Modal -->
<!-- Modal -->
<div class="
modal
fade
" id="
pdfModal
" tabindex="
-
1
" role="
dialog
" aria-labelledby="
pdfModalLabel
" aria-hidden="
true
">
<div class="
modal
fade
" id="
pdfModal
" tabindex="
-
1
" role="
dialog
" aria-labelledby="
pdfModalLabel
" aria-hidden="
true
">
<div class="
modal
-
dialog
modal
-
lg
" role="
document
">
<div class="
modal
-
dialog
modal
-
lg
modal
-
dialog
-
centered
" role="
document
">
<div class="
modal
-
content
">
<div class="
modal
-
content
"
style="
height
:
80
vh
;
"
>
<div class="
modal
-
header
">
<div class="
modal
-
header
">
<h5 class="
modal
-
title
" id="
pdfModalLabel
">Preview PDF</h5>
<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>
<button type="
button
" class="
btn
-
close
" data-bs-dismiss="
modal
" aria-label="
Close
">{{-- <span aria-hidden="
true
">×</span> --}}</button>
</div>
</div>
<div class="
modal
-
body
">
<div class="
modal
-
body
">
{{-- <iframe id="
pdfViewer
" width="
100
%
" height="
600
" frameborder="
0
"></iframe> --}}
{{-- <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="
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>
</div>
</div>
</div>
</div>
...
@@ -146,7 +144,7 @@
...
@@ -146,7 +144,7 @@
});
});
</script> --}}
</script> --}}
<script>
{{--
<script>
$(function(){
$(function(){
$('#btnPreview').click(function() {
$('#btnPreview').click(function() {
// Ambil URL dari file yang dipilih
// Ambil URL dari file yang dipilih
...
@@ -162,6 +160,59 @@
...
@@ -162,6 +160,59 @@
$('#view-pdf').attr('src', '');
$('#view-pdf').attr('src', '');
});
});
});
});
</script>
</script> --}}
<script>
$(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;
}
// Tampilkan pratinjau PDF di dalam modal jika file memenuhi syarat
var url = URL.createObjectURL(fileInput);
$('#view-pdf').attr('src', url);
$('#pdfModal').modal('show');
});
// Reset iframe saat modal ditutup
$('#pdfModal').on('hidden.bs.modal', function (e) {
$('#view-pdf').attr('src', '');
});
});
</script>
@endsection
@endsection
resources/views/backend/mahasiswa/proposal/index.blade.php
View file @
aea19bba
@
extends
(
'layouts.master'
)
@
extends
(
'layouts.master'
)
@
section
(
'css'
)
<
link
rel
=
"stylesheet"
href
=
"https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css"
>
@
endsection
@
section
(
'title'
)
@
section
(
'title'
)
Dashboard
Dashboard
...
@@ -22,12 +25,11 @@
...
@@ -22,12 +25,11 @@
</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="
text
-
end
d
-
flex
justify
-
content
-
end
">
<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>
</div>
</div>
</div>
</div>
</div>
<!-- end page title -->
<!-- end page title -->
...
@@ -54,6 +56,7 @@
...
@@ -54,6 +56,7 @@
</div>
</div>
</form>
</form>
<br>
<br>
<div class="
table
-
responsive
">
<table id="
datatable
" class="
table
table
-
bordered
dt
-
responsive
nowrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<table id="
datatable
" class="
table
table
-
bordered
dt
-
responsive
nowrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<thead>
<thead>
<tr>
<tr>
...
@@ -79,18 +82,18 @@
...
@@ -79,18 +82,18 @@
<td>{{
$item->judul
}}</td>
<td>{{
$item->judul
}}</td>
<td>
<td>
@if(is_null(
$item->upload_dokumen
))
@if(is_null(
$item->upload_dokumen
))
<span class="
badge
bg
-
danger
">Belum Upload Proposal</span
>
<span class="
badge
bg
-
danger
">Belum Upload Proposal</span><br
>
<strong> Keterangan : </strong> <br>
<strong> Keterangan : </strong> <br>
Upload proposal pada : -<br>
Upload proposal pada : -<br>
Disetujui proposal pada : -<br>
Disetujui proposal pada : -<br>
@else
@else
@if(
$item->status
== '0')
@if(
$item->status
== '0')
<span class="
badge
bg
-
warning
">Menunggu Persetujuan Dosen</span
>
<span class="
badge
bg
-
warning
">Menunggu Persetujuan Dosen</span><br
>
<strong> Keterangan : </strong> <br>
<strong> Keterangan : </strong> <br>
Upload proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_upload
}} </h6>
Upload proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_upload
}} </h6>
Disetujui proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_approval
}} </h6>
Disetujui proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_approval
}} </h6>
@elseif(
$item->status
== '2')
@elseif(
$item->status
== '2')
<span class="
badge
bg
-
danger
">Ditolak Dosen</span
>
<span class="
badge
bg
-
danger
">Ditolak Dosen</span><br
>
<strong> Keterangan : </strong> <br>
<strong> Keterangan : </strong> <br>
Upload proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_upload
}} </h6>
Upload proposal pada : <h6 class="
text
-
primary
"> {{
$item->date_upload
}} </h6>
Komentar : <h6 class="
text
-
primary
"> {{
$item->alasan_revisi
}} </h6>
Komentar : <h6 class="
text
-
primary
"> {{
$item->alasan_revisi
}} </h6>
...
@@ -113,7 +116,7 @@
...
@@ -113,7 +116,7 @@
<div id="
{{
'lihat'
.
$item
->
proposal_id
}}
" class="
modal
fade
" tabindex="
-
1
" role="
dialog
"
<div id="
{{
'lihat'
.
$item
->
proposal_id
}}
" class="
modal
fade
" tabindex="
-
1
" role="
dialog
"
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
<div class="
modal
-
dialog
modal
-
xl
">
<div class="
modal
-
dialog
modal
-
lg
modal
-
dialog
-
centered
">
<div class="
modal
-
content
">
<div class="
modal
-
content
">
<div class="
modal
-
header
">
<div class="
modal
-
header
">
<h5 class="
modal
-
title
" id="
lihatLabel
">Detail Proposal </h5>
<h5 class="
modal
-
title
" id="
lihatLabel
">Detail Proposal </h5>
...
@@ -146,7 +149,7 @@
...
@@ -146,7 +149,7 @@
<td>
<td>
@if(
$item->upload_dokumen
)
@if(
$item->upload_dokumen
)
<a href="
https
://
statik
.
unesa
.
ac
.
id
/
simpmw
/
proposal
/
{{
$item
->
rPeriode
->
nama
}}
/
{{
$item
->
upload_dokumen
}}
" target="
_blank
" class="
btn
btn
-
success
btn
-
sm
"> <i class="
far
fa
-
eye
"></i> Lihat Proposal</a>
<a href="
https
://
statik
.
unesa
.
ac
.
id
/
simpmw
/
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
/
simpmw
/
proposal
/
{{
$item
->
rPeriode
->
nama
}}
/
{{
$item
->
upload_dokumen
}}
" frameborder="
0
"></iframe>
{{-- <iframe id="
view
-
pdf
" width="
100
%
" height="
400
px
" src="
https
://
statik
.
unesa
.
ac
.
id
/
simpmw
/
proposal
/
{{
$item
->
rPeriode
->
nama
}}
/
{{
$item
->
upload_dokumen
}}
" frameborder="
0
"></iframe> --}}
@else
@else
<div class="
alert
alert
-
danger
alert
-
dismissible
fade
show
mb
-
0
" role="
alert
">
<div class="
alert
alert
-
danger
alert
-
dismissible
fade
show
mb
-
0
" role="
alert
">
<strong>Informasi!</strong> File tidak ditemukan.
<strong>Informasi!</strong> File tidak ditemukan.
...
@@ -158,8 +161,12 @@
...
@@ -158,8 +161,12 @@
<th>Video Produk</th>
<th>Video Produk</th>
<td>
<td>
@if(
$item->upload_dokumen
)
@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>
{{-- @php
<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>
@dd(
$item->rProposalUrl
->url);
@endphp --}}
<button id="
preview
-
video
" class="
btn
btn
-
success
btn
-
sm
" data-video="
{{
$item
->
rProposalUrl
->
url
}}
">
<i class="
far
fa
-
eye
"></i> Lihat Video
</button>
@else
@else
<div class="
alert
alert
-
danger
alert
-
dismissible
fade
show
mb
-
0
" role="
alert
">
<div class="
alert
alert
-
danger
alert
-
dismissible
fade
show
mb
-
0
" role="
alert
">
<strong>Informasi!</strong> File tidak ditemukan.
<strong>Informasi!</strong> File tidak ditemukan.
...
@@ -174,14 +181,12 @@
...
@@ -174,14 +181,12 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</td>
</td>
</tr>
</tr>
@endforeach
@endforeach
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end col -->
...
@@ -191,7 +196,6 @@
...
@@ -191,7 +196,6 @@
@section('js')
@section('js')
<script>
<script>
function hapus(id, rowId){
function hapus(id, rowId){
Swal.fire({
Swal.fire({
title: 'Apakah anda yakin untuk menghapus usulan ini?',
title: 'Apakah anda yakin untuk menghapus usulan ini?',
...
@@ -231,4 +235,95 @@
...
@@ -231,4 +235,95 @@
})
})
}
}
</script>
</script>
<script src="
https
://
code
.
jquery
.
com
/
jquery
-
3.6
.
0.
min
.
js
"></script>
<script src="
https
://
cdnjs
.
cloudflare
.
com
/
ajax
/
libs
/
magnific
-
popup
.
js
/
1.1
.
0
/
jquery
.
magnific
-
popup
.
min
.
js
"></script>
<!-- Kode JavaScript untuk Magnific Popup -->
<script>
$(document).ready(function() {
// Event handler untuk tombol "
Lihat
Video
" dengan ID preview-video
$('#preview-video').on('click', function() {
var videoUrl = $(this).data('video');
if (videoUrl) {
// Buka video dalam Magnific Popup
$.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');
// 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
console.error('URL video tidak valid:', videoUrl);
}
});
});
</script>
{{-- <script>
document.addEventListener("
DOMContentLoaded
", function() {
var openModalBtn = document.getElementById("
openModalBtn
");
var closeModalBtn = document.getElementById("
closeModalBtn
");
var modal = document.getElementById("
myModal
");
openModalBtn.addEventListener("
click
", function() {
modal.style.display = "
block
";
// Mengambil URL dari objek
$item
var proposalUrl = "
{{
$item
->
rProposalUrl
->
url
}}
";
// Load konten eksternal ke dalam div modalContent
var xhr = new XMLHttpRequest();
xhr.open("
GET
", proposalUrl, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
document.getElementById("
externalContent
").innerHTML = xhr.responseText;
}
};
xhr.send();
});
closeModalBtn.addEventListener("
click
", function() {
modal.style.display = "
none
";
});
window.addEventListener("
click
", function(event) {
if (event.target == modal) {
modal.style.display = "
none
";
}
});
});
</script> --}}
@endsection
@endsection
resources/views/layouts/headpg.blade.php
View file @
aea19bba
...
@@ -49,6 +49,6 @@
...
@@ -49,6 +49,6 @@
<link
href=
"{{ asset('theme/libs/dropzone/min/dropzone.min.css') }}"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"{{ asset('theme/libs/dropzone/min/dropzone.min.css') }}"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"{{ asset('theme/libs/select2/css/select2.min.css') }}"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"{{ asset('theme/libs/select2/css/select2.min.css') }}"
rel=
"stylesheet"
type=
"text/css"
>
@yield('css')
</head>
</head>
resources/views/layouts/master.blade.php
View file @
aea19bba
@
include
(
'layouts.headpg'
)
@
include
(
'layouts.headpg'
)
@
yield
(
'css'
)
<
body
data
-
sidebar
=
"dark"
>
<
body
data
-
sidebar
=
"dark"
>
...
@@ -95,6 +96,7 @@
...
@@ -95,6 +96,7 @@
<!-- END layout-wrapper -->
<!-- END layout-wrapper -->
@include('layouts.inijs')
@include('layouts.inijs')
@yield('js')
<script>
<script>
document.getElementById('vertical-menu-btn').addEventListener('click', function() {
document.getElementById('vertical-menu-btn').addEventListener('click', function() {
var icon = this.querySelector('i');
var icon = this.querySelector('i');
...
...
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