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
1a89dfa2
Commit
1a89dfa2
authored
Jan 09, 2025
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Reload Monev II Anggaran
parent
57a03e77
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
5 deletions
+40
-5
resources/views/backend/mahasiswa/monev/anggaran/index.blade.php
+40
-5
No files found.
resources/views/backend/mahasiswa/monev/anggaran/index.blade.php
View file @
1a89dfa2
...
...
@@ -120,7 +120,7 @@
<div id="
anggaran
" class="
modal
fade
" role="
dialog
" aria-labelledby="
myModalLabel
" aria-hidden="
true
">
<div class="
modal
-
dialog
modal
-
lg
modal
-
dialog
-
centered
modal
-
dialog
-
scrollable
">
<div class="
modal
-
content
">
<form action="
{{
route
(
'mahasiswa.monev-anggaran-store'
)
}}
" method="
POST
" enctype="
multipart
/
form
-
data
">
<form
id="
form
-
add
"
action="
{{
route
(
'mahasiswa.monev-anggaran-store'
)
}}
" method="
POST
" enctype="
multipart
/
form
-
data
">
@csrf
<div class="
modal
-
header
">
<h5 class="
modal
-
title
" id="
myModalLabel
">Tambah Data Bukti Penggunaan Anggaran</h5>
...
...
@@ -185,13 +185,17 @@
<label for="
nota_file
" class="
col
-
sm
-
4
col
-
form
-
label
">Unggah File Nota/Kwitansi <span style="
margin
-
left
:
5
px
"><i class="
mdi
mdi
-
information
-
outline
" data-bs-toggle="
tooltip
" title="
Unggah
file
dalam
bentuk
PDF
(
maks
.
5
MB
)
"></i></span><span style="
color
:
red
;
"> *</span></label>
<div class="
col
-
sm
-
6
col
-
lg
-
6
">
<input type="
file
" name="
nota_file
" class="
form
-
control
" id="
input
-
file
" accept="
application
/
pdf
">
{{-- @if (
$errors->has
('file')) <span class="
text
-
danger
"><i>{{
$errors->first
('file') }}</i></span> @endif --}}
@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> --}}
</div>
<div class="
col
-
sm
-
2
col
-
lg
-
2
">
<button type="
button
" class="
form
-
control
btn
btn
-
warning
" id="
btnPreview
">Preview</button>
</div>
</div>
<div id="
previewContent
" class="
mfp
-
hide
">
<h3>Preview File Nota/Kwitansi</h3>
<iframe id="
view
-
pdf
" width="
80
%
" height="
80
%
" frameborder="
0
" src=""></iframe>
</div>
{{-- <div class="
col
-
12
">
<h5 class="
font
-
size
-
16
">Keterangan : </h5>
<p>
...
...
@@ -215,9 +219,8 @@
<script>
$(document).ready(function() {
const table = $('#datatable').DataTable({
// Pengaturan tampilan dan kontrol DataTable
autoWidth: false,
order: [[0, 'asc']],
// Mengatur pengurutan default berdasarkan kolom pertama
order: [[0, 'asc']],
columnDefs: [
{
targets: [0],
...
...
@@ -235,7 +238,7 @@
text: response.message || 'Data berhasil disimpan',
confirmButtonText: 'OK'
}).then(() => {
table.ajax
.reload(); // Reload data table setelah operasi berhasil
location
.reload(); // Reload data table setelah operasi berhasil
});
} else {
Swal.fire({
...
...
@@ -249,6 +252,38 @@
});
</script>
<script>
$(document).ready(function () {
const modalAnggaran = $('#anggaran');
$('#btnPreview').on('click', function () {
const fileInput = document.getElementById('input-file');
const file = fileInput.files[0];
if (file && file.type === 'application/pdf') {
const fileURL = URL.createObjectURL(file);
$('#view-pdf').attr('src', fileURL);
modalAnggaran.modal('hide');
$.magnificPopup.open({
items: {
src: '#previewContent',
type: 'inline'
},
callbacks: {
close: function () {
modalAnggaran.modal('show');
}
}
});
} else {
alert('Harap unggah file PDF untuk pratinjau.');
}
});
});
</script>
<script>
// function hapus(id, rowId){
// Swal.fire({
// title: 'Apakah Anda yakin untuk menghapus usulan ini?',
...
...
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