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
1e425193
Commit
1e425193
authored
Sep 03, 2024
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monev & Bukti Anggaran
parent
d658cb05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
27 deletions
+97
-27
app/Http/Controllers/Mahasiswa/MonevController.php
+62
-15
app/Models/BuktiAnggaran.php
+7
-3
app/Models/JenisSatuanBarang.php
+19
-0
app/Models/MonevInternal.php
+1
-1
resources/views/backend/mahasiswa/monev/anggaran/index.blade.php
+0
-0
resources/views/backend/mahasiswa/monev/indexmonevII.blade.php
+7
-7
resources/views/backend/reviewer/monev/index.blade.php
+1
-1
No files found.
app/Http/Controllers/Mahasiswa/MonevController.php
View file @
1e425193
...
@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
...
@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
use
App\Http\Controllers\GetDataApiController
;
use
App\Http\Controllers\GetDataApiController
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
use
Illuminate\Support\Str
;
use
Illuminate\Support\Facades\DB
;
use
App\Models\Proposal
;
use
App\Models\Proposal
;
use
App\Models\Kelompok
;
use
App\Models\Kelompok
;
...
@@ -14,6 +15,7 @@ use App\Models\Periode;
...
@@ -14,6 +15,7 @@ use App\Models\Periode;
use
App\Models\MonevInternal
;
use
App\Models\MonevInternal
;
use
App\Models\JadwalKegiatan
;
use
App\Models\JadwalKegiatan
;
use
App\Models\BuktiAnggaran
;
use
App\Models\BuktiAnggaran
;
use
App\Models\JenisSatuanBarang
;
use
Session
;
use
Session
;
use
Alert
;
use
Alert
;
...
@@ -178,28 +180,73 @@ class MonevController extends Controller
...
@@ -178,28 +180,73 @@ class MonevController extends Controller
$title
=
'Bukti Penggunaan Anggaran'
;
$title
=
'Bukti Penggunaan Anggaran'
;
$anggaran
=
BuktiAnggaran
::
with
([
'rProposal'
,
'rMonev'
])
$anggaran
=
BuktiAnggaran
::
with
([
'rProposal'
,
'rMonev'
])
->
where
(
'monev_id'
,
$monev
)
->
where
(
'monev_id'
,
$monev
)
// ->paginate(10);
->
get
();
->
get
();
$monev
=
MonevInternal
::
with
([
'rProposal'
,
'rBuktiAnggaran'
=>
function
(
$query
)
{
$query
->
orderByRaw
(
'CASE WHEN tgl_pembelian IS NULL THEN 0 ELSE 1 END ASC, tgl_pembelian ASC'
);
}])
->
where
(
'id'
,
$monev
)
->
first
();
$jenis_satuan
=
JenisSatuanBarang
::
select
(
'jenis_satuan'
)
->
get
();
// dd($monev->rBuktiAnggaran);
$data
=
[
$data
=
[
'title'
=>
$title
,
'title'
=>
$title
,
'anggaran'
=>
$anggaran
'anggaran'
=>
$anggaran
,
'monev'
=>
$monev
,
'jenis_satuan'
=>
$jenis_satuan
];
];
return
view
(
'backend.mahasiswa.monev.anggaran.index'
,
$data
);
return
view
(
'backend.mahasiswa.monev.anggaran.index'
,
$data
);
}
}
public
function
storeAnggaran
()
public
function
storeAnggaran
(
Request
$request
)
{
{
$title
=
'Bukti Penggunaan Anggaran'
;
DB
::
beginTransaction
();
// $proposal = Proposal::with(['rluaran', 'rPeriode'])->find(decrypt($id));
try
{
$key
=
$request
->
except
(
'_token'
);
$data
=
[
$userid
=
Auth
::
user
()
->
id
;
// 'proposal' => $proposal,
'title'
=>
$title
$this
->
validate
(
$request
,
];
[
'nota_file'
=>
'required|mimes:pdf|max:5000'
return
view
(
'backend.mahasiswa.monev.anggaran.index'
,
$data
);
],
[
'nota_file.required'
=>
'Tidak ada file yang di upload'
,
'nota_file.mimes'
=>
'File harus pdf'
,
'nota_file.max'
=>
'File tidak boleh lebih dari 5 mb'
,
]);
$anggaran
=
MonevInternal
::
with
([
'rProposal'
,
'rBuktiAnggaran'
])
->
find
(
$key
[
'monev_id'
]);
$original_file
=
$key
[
'nota_file'
]
->
getClientOriginalName
();
$file_nama
=
$anggaran
->
rProposal
->
rPeriode
->
nama
.
'_Bukti-Anggaran_'
.
$anggaran
->
rProposal
->
proposal_id
.
'_'
.
pathinfo
(
$original_file
,
PATHINFO_FILENAME
)
.
'.'
.
$key
[
'nota_file'
]
->
getClientOriginalExtension
();
// dd($key);
Storage
::
disk
(
'static'
)
->
put
(
'simpmw/monev/II/bukti-anggaran/'
.
$file_nama
,
file_get_contents
(
$key
[
'nota_file'
]
->
getRealPath
()));
BuktiAnggaran
::
create
([
'proposal_id'
=>
$key
[
'proposal_id'
],
'monev_id'
=>
$key
[
'monev_id'
],
'nama_kegiatan'
=>
$key
[
'nama_kegiatan'
],
'nama_barang'
=>
$key
[
'nama_barang'
],
'tgl_pembelian'
=>
$key
[
'tgl_pembelian'
],
'kuantitas'
=>
$key
[
'kuantitas'
],
'jenis_satuan'
=>
$key
[
'jenis_satuan'
],
'harga_satuan'
=>
$key
[
'harga_satuan'
],
'total_harga_per'
=>
$key
[
'kuantitas'
]
*
$key
[
'harga_satuan'
],
'total_harga_seluruh'
=>
null
,
'nota_file'
=>
$file_nama
,
'created_by'
=>
$userid
,
'updated_by'
=>
$userid
,
]);
DB
::
commit
();
return
redirect
()
->
back
()
->
with
(
'success'
,
'Data berhasil disimpan'
);
}
catch
(
\Exception
$e
)
{
DB
::
rollback
();
return
redirect
()
->
back
()
->
with
(
'error'
,
'Gagal menyimpan data: '
.
$e
->
getMessage
());
}
}
}
}
}
app/Models/BuktiAnggaran.php
View file @
1e425193
...
@@ -22,15 +22,19 @@ class BuktiAnggaran extends Model
...
@@ -22,15 +22,19 @@ class BuktiAnggaran extends Model
'monev_id'
,
'monev_id'
,
'nama_kegiatan'
,
'nama_kegiatan'
,
'nama_barang'
,
'nama_barang'
,
'tgl_pembelian'
,
'kuantitas'
,
'kuantitas'
,
'jenis_satuan'
,
'jenis_satuan'
,
'harga_satuan'
,
'harga_satuan'
,
'total_harga_per'
,
'total_harga_per'
,
'total_harga_seluruh'
,
'total_harga_seluruh'
,
'nota_file'
,
'nota_file'
,
'created_user'
,
'created_at'
,
'updated_user'
,
'created_by'
,
'deleted_user'
,
'updated_at'
,
'updated_by'
,
'deleted_at'
,
'deleted_by'
,
];
];
protected
$dates
=
[
'created_at'
,
'updated_at'
,
'deleted_at'
];
protected
$dates
=
[
'created_at'
,
'updated_at'
,
'deleted_at'
];
...
...
app/Models/JenisSatuanBarang.php
0 → 100644
View file @
1e425193
<?php
namespace
App\Models
;
use
App\Traits\UuidTrait
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
class
JenisSatuanBarang
extends
Model
{
use
HasFactory
,
UuidTrait
;
protected
$table
=
'jenis_satuan_barang'
;
protected
$primaryKey
=
'id'
;
public
$incrementing
=
false
;
protected
$keyType
=
'string'
;
protected
$fillable
=
[
'nama'
];
}
app/Models/MonevInternal.php
View file @
1e425193
...
@@ -66,7 +66,7 @@ class MonevInternal extends Model
...
@@ -66,7 +66,7 @@ class MonevInternal extends Model
public
function
rBuktiAnggaran
()
public
function
rBuktiAnggaran
()
{
{
return
$this
->
hasMany
(
BuktiAnggaran
::
class
,
'
id'
,
'
monev_id'
);
return
$this
->
hasMany
(
BuktiAnggaran
::
class
,
'monev_id'
);
}
}
}
}
resources/views/backend/mahasiswa/monev/anggaran/index.blade.php
0 → 100644
View file @
1e425193
This diff is collapsed.
Click to expand it.
resources/views/backend/mahasiswa/monev/indexmonevII.blade.php
View file @
1e425193
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
</div>
</div>
</form>
</form>
<br>
<br>
@if((
$jadwal->tanggal_mulai
<= Carbon\Carbon::now()) && (
$jadwal->tanggal_selesai
>= Carbon\Carbon::now()))
{{-- @if((
$jadwal->tanggal_mulai
<= Carbon\Carbon::now()) && (
$jadwal->tanggal_selesai
>= Carbon\Carbon::now())) --}}
<div class="
table
-
responsive
">
<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 style="
vertical
-
align
:
middle
;
text
-
align
:
center
;
">
<thead style="
vertical
-
align
:
middle
;
text
-
align
:
center
;
">
...
@@ -83,21 +83,21 @@
...
@@ -83,21 +83,21 @@
<td align="
center
">{{
$item->rProposal
->judul }}</td>
<td align="
center
">{{
$item->rProposal
->judul }}</td>
<td align="
center
">
<td align="
center
">
@if(is_null(
$item->logbook_file
))
@if(is_null(
$item->logbook_file
))
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
proposal_
id
.
'__logbook__II'
))
}}
" type="
button
" class="
btn
btn
-
warning
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
file
-
upload
"></i> Upload</a>
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
id
.
'__logbook__II'
))
}}
" type="
button
" class="
btn
btn
-
warning
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
file
-
upload
"></i> Upload</a>
@else
@else
<a href="
https
://
statik
.
unesa
.
ac
.
id
/
simpmw
/
monev
/
II
/
logbook
/
{{
$item
->
logbook_file
}}
" target="
_blank
" title="
Logbook
" class="
btn
btn
-
info
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
search
"></i> Lihat</a>
<a href="
https
://
statik
.
unesa
.
ac
.
id
/
simpmw
/
monev
/
II
/
logbook
/
{{
$item
->
logbook_file
}}
" target="
_blank
" title="
Logbook
" class="
btn
btn
-
info
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
search
"></i> Lihat</a>
@endif
@endif
</td>
</td>
<td align="
center
">
<td align="
center
">
@if(is_null(
$item->laporan_akhir_file
))
@if(is_null(
$item->laporan_akhir_file
))
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
proposal_
id
.
'__akhir__II'
))
}}
" type="
button
" class="
btn
btn
-
warning
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
file
-
upload
"></i> Upload</a>
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
id
.
'__akhir__II'
))
}}
" type="
button
" class="
btn
btn
-
warning
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
file
-
upload
"></i> Upload</a>
@else
@else
<a href="
https
://
statik
.
unesa
.
ac
.
id
/
simpmw
/
monev
/
II
/
akhir
/
{{
$item
->
akhir_file
}}
" target="
_blank
" title="
Laporan
Akhir
" class="
btn
btn
-
info
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
search
"></i> Lihat</a>
<a href="
https
://
statik
.
unesa
.
ac
.
id
/
simpmw
/
monev
/
II
/
akhir
/
{{
$item
->
akhir_file
}}
" target="
_blank
" title="
Laporan
Akhir
" class="
btn
btn
-
info
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
search
"></i> Lihat</a>
@endif
@endif
</td>
</td>
<td align="
center
">
<td align="
center
">
@if(is_null(
$item->produk_url
))
@if(is_null(
$item->produk_url
))
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
proposal_
id
.
'__produk__II'
))
}}
" type="
button
" class="
btn
btn
-
warning
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
file
-
upload
"></i> Upload</a>
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
id
.
'__produk__II'
))
}}
" type="
button
" class="
btn
btn
-
warning
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
file
-
upload
"></i> Upload</a>
@else
@else
<a href="
{{
$item
->
produk_url
}}
" target="
_blank
" title="
Video
Produk
Akhir
" class="
btn
btn
-
info
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
search
"></i> Lihat</a>
<a href="
{{
$item
->
produk_url
}}
" target="
_blank
" title="
Video
Produk
Akhir
" class="
btn
btn
-
info
btn
-
sm
waves
-
effect
waves
-
light
"> <i class="
fas
fa
-
search
"></i> Lihat</a>
@endif
@endif
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
</td> --}}
</td> --}}
<td align="
center
">
<td align="
center
">
<button data-bs-toggle="
modal
" data-bs-target="
{{
'#lihat'
.
$item
->
id
}}
" class="
btn
btn
-
success
btn
-
sm
form
-
control
mb
-
2
"><i class="
fas
fa
-
search
"></i> Hasil Penilaian</button>
<button data-bs-toggle="
modal
" data-bs-target="
{{
'#lihat'
.
$item
->
id
}}
" class="
btn
btn
-
success
btn
-
sm
form
-
control
mb
-
2
"><i class="
fas
fa
-
search
"></i> Hasil Penilaian</button>
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
proposal_
id
.
'__proposal__II'
))
}}
" type="
button
" class="
btn
btn
-
danger
btn
-
sm
waves
-
effect
waves
-
light
form
-
control
" data-bs-toggle="
tooltip
" data-bs-placement="
bottom
" title="
Revisi
Proposal
"><i class="
fas
fa
-
file
-
upload
"></i> Revisi</a>
<a href="
{{
URL
::
to
(
'mahasiswa/monev-revisi/'
.
encrypt
(
$item
->
id
.
'__proposal__II'
))
}}
" type="
button
" class="
btn
btn
-
danger
btn
-
sm
waves
-
effect
waves
-
light
form
-
control
" data-bs-toggle="
tooltip
" data-bs-placement="
bottom
" title="
Revisi
Proposal
"><i class="
fas
fa
-
file
-
upload
"></i> Revisi</a>
<div id="
{{
'lihat'
.
$item
->
id
}}
" class="
modal
fade
" tabindex="
-
1
" role="
dialog
"
<div id="
{{
'lihat'
.
$item
->
id
}}
" class="
modal
fade
" tabindex="
-
1
" role="
dialog
"
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
aria-labelledby="
lihatLabel
" aria-hidden="
true
">
...
@@ -185,11 +185,11 @@
...
@@ -185,11 +185,11 @@
</tbody>
</tbody>
</table>
</table>
</div>
</div>
@else
{{--
@else
<div class="
alert
alert
-
success
alert
-
dismissible
fade
show
" role="
alert
">
<div class="
alert
alert
-
success
alert
-
dismissible
fade
show
" role="
alert
">
<strong>Informasi!</strong> Monev Internal II dilaksanakan pada : <strong>Tanggal {{ Carbon\Carbon::parse(
$jadwal->tanggal_mulai
)->isoFormat('D MMMM Y'); }}</strong> sampai dengan <strong>Tanggal {{ Carbon\Carbon::parse(
$jadwal->tanggal_selesai
)->isoFormat('D MMMM Y'); }}.</strong>
<strong>Informasi!</strong> Monev Internal II dilaksanakan pada : <strong>Tanggal {{ Carbon\Carbon::parse(
$jadwal->tanggal_mulai
)->isoFormat('D MMMM Y'); }}</strong> sampai dengan <strong>Tanggal {{ Carbon\Carbon::parse(
$jadwal->tanggal_selesai
)->isoFormat('D MMMM Y'); }}.</strong>
</div>
</div>
@endif
@endif
--}}
</div>
</div>
</div>
</div>
</div> <!-- end col -->
</div> <!-- end col -->
...
...
resources/views/backend/reviewer/monev/index.blade.php
View file @
1e425193
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<th>Judul Proposal</th>
<th>Judul Proposal</th>
<th>Catatan Harian<br>(Logbook)</th>
<th>Catatan Harian<br>(Logbook)</th>
<th>Laporan Kemajuan</th>
<th>Laporan Kemajuan</th>
<th>Laporan
Luaran
</th>
<th>Laporan
Magang / Lainnya
</th>
<th>Nilai</th>
<th>Nilai</th>
</tr>
</tr>
</thead>
</thead>
...
...
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