Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
instrument
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
Windy Chikita
instrument
Commits
19ccab77
Commit
19ccab77
authored
Jun 20, 2022
by
windychikita20
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tambahan instrument
parent
4b2e78cd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
186 additions
and
160 deletions
+186
-160
app/Http/Controllers/Admin/LembarInstrumentMonitoringController.php
+63
-38
app/Http/Controllers/Admin/PernyataanInstrumentController.php
+2
-2
resources/views/content/backend/masters/lembar_instrument_monitoring/index.blade.php
+72
-46
resources/views/content/backend/masters/lembar_instrument_monitoring/laporan.blade.php
+47
-73
routes/web.php
+2
-1
No files found.
app/Http/Controllers/Admin/LembarInstrumentMonitoringController.php
View file @
19ccab77
...
@@ -34,15 +34,30 @@ class LembarInstrumentMonitoringController extends Controller
...
@@ -34,15 +34,30 @@ class LembarInstrumentMonitoringController extends Controller
$data
[
'instrumentdetail'
]
=
Instrument
::
query
()
->
where
(
'id'
,
$data
[
'filter_instrument'
])
->
first
();
$data
[
'instrumentdetail'
]
=
Instrument
::
query
()
->
where
(
'id'
,
$data
[
'filter_instrument'
])
->
first
();
$data
[
'pernyataan_instrument'
]
=
Pernyataan_Instrument
::
query
()
->
orderBy
(
'pernyataan_instrument'
)
->
get
();
$data
[
'pernyataan_instrument'
]
=
Pernyataan_Instrument
::
query
()
->
orderBy
(
'created_at'
,
'asc'
)
->
get
();
$data
[
'sub_instrument'
]
=
Sub_Instrument
::
query
()
->
where
(
'id_instrument'
,
$data
[
'filter_instrument'
]
)
$data
[
'sub_instrument'
]
=
Sub_Instrument
::
query
()
->
with
(
'jenis_input'
)
->
orderBy
(
'id_instrument'
)
->
get
();
->
where
(
'id_instrument'
,
$data
[
'filter_instrument'
]
)
->
orderBy
(
'created_at'
,
'asc'
)
->
get
();
$data
[
'sub_pernyataan_instrument'
]
=
Sub_Pernyataan_Instrument
::
query
()
->
orderBy
(
'sub_peryataan'
)
->
get
();
$data
[
'sub_pernyataan_instrument'
]
=
Sub_Pernyataan_Instrument
::
query
()
->
orderBy
(
'sub_peryataan'
)
->
get
();
$data
[
'fakultas'
]
=
Fakultas
::
query
()
->
orderBy
(
'id'
)
->
get
();
$data
[
'fakultas'
]
=
Fakultas
::
query
()
->
orderBy
(
'id'
)
->
get
();
$data
[
'instrument'
]
=
Instrument
::
query
()
->
orderBy
(
'instrument'
)
->
get
();
$data
[
'instrument'
]
=
Instrument
::
query
()
->
orderBy
(
'instrument'
)
->
get
();
$data
[
'tahun'
]
=
Tahun
::
query
()
->
orderBy
(
'tahun'
)
->
get
();
$data
[
'tahun'
]
=
Tahun
::
query
()
->
orderBy
(
'tahun'
)
->
get
();
$data
[
'hasil_instrumen'
]
=
Hasil_Instrument
::
query
()
->
get
();
$data
[
'arr_hasil'
]
=
[];
foreach
(
$data
[
'hasil_instrumen'
]
as
$item
){
$data
[
'arr_hasil'
][
$item
->
id_pernyataan_instrument
][
$item
->
id_sub_pernyataan_instrument
][
$item
->
id_fakultas
][
$item
->
tahun
]
=
$item
;
}
$data
[
'arr_hasil_total'
]
=
[];
foreach
(
$data
[
'hasil_instrumen'
]
as
$item
)
{
$data
[
'arr_hasil_total'
][
$item
->
id_sub_instrument
][
$item
->
id_fakultas
][
$item
->
tahun
]
=
$item
;
}
//dd($data['arr_hasil_total']->toArray());
return
view
(
'content.backend.masters.lembar_instrument_monitoring.index'
,
$data
);
return
view
(
'content.backend.masters.lembar_instrument_monitoring.index'
,
$data
);
}
}
...
@@ -73,55 +88,48 @@ class LembarInstrumentMonitoringController extends Controller
...
@@ -73,55 +88,48 @@ class LembarInstrumentMonitoringController extends Controller
*/
*/
public
function
store
(
Request
$request
)
public
function
store
(
Request
$request
)
{
{
//dd($request->
id_pernyataan_instrument
);
//dd($request->
all()
);
foreach
(
$request
->
input
(
'jumlah_pernyataan_instrument'
)
as
$index
=>
$value
)
foreach
(
$request
->
input
(
'jumlah_pernyataan_instrument'
)
as
$index
=>
$value
)
{
{
if
(
!
empty
(
$request
->
jumlah_pernyataan_instrument
[
$index
]))
{
if
(
empty
(
$request
->
id
[
$index
]))
$post
=
Hasil_Instrument
::
updateOrCreate
(
{
$post
=
Hasil_Instrument
::
create
(
[
[
'id_pernyataan_instrument'
=>
$request
->
id_pernyataan_instrument
[
$index
],
'id_pernyataan_instrument'
=>
$request
->
id_pernyataan_instrument
[
$index
],
'tahun'
=>
$request
->
input
(
'tahun'
),
'tahun'
=>
$request
->
input
(
'tahun'
),
'id_fakultas'
=>
$request
->
id_fakultas
[
$index
],
'id_fakultas'
=>
$request
->
id_fakultas
[
$index
],
'jumlah'
=>
$request
->
jumlah_pernyataan_instrument
[
$index
],
'id_sub_instrument'
=>
$request
->
id_sub_instrument
,
'id_sub_instrument'
=>
$request
->
id_sub_instrument
,
],
[
'jumlah'
=>
$request
->
jumlah_pernyataan_instrument
[
$index
]
]);
]);
}
else
{
$update
=
Hasil_Instrument
::
where
(
'id'
,
$request
->
id
[
$index
])
->
update
([
'jumlah'
=>
$request
->
jumlah_pernyataan_instrument
[
$index
]]);
}
}
}
}
if
(
!
empty
(
$request
->
input
(
'id_sub_pernyataan_instrument'
)))
if
(
!
empty
(
$request
->
input
(
'jumlah_sub_peryataan'
)))
{
foreach
(
$request
->
input
(
'jumlah_sub_peryataan'
)
as
$idparent
=>
$value
)
{
{
foreach
(
$request
->
input
(
'jumlah_sub_peryataan'
)
as
$index
=>
$value
)
foreach
(
$value
as
$idsubparent
=>
$value1
)
{
{
if
(
empty
(
$request
->
id_subhasil
[
$index
]))
foreach
(
$value1
as
$idfakultas
=>
$value2
)
{
{
$post
=
Hasil_Instrument
::
create
(
$post
=
Hasil_Instrument
::
updateOrCreate
(
[
[
'id_pernyataan_instrument'
=>
$request
->
id_pernyataan_instrument
[
$index
]
,
'id_pernyataan_instrument'
=>
$idparent
,
'id_sub_pernyataan_instrument'
=>
$request
->
id_sub_pernyataan_instrument
[
$index
]
,
'id_sub_pernyataan_instrument'
=>
$idsubparent
,
'tahun'
=>
$request
->
input
(
'tahun'
),
'tahun'
=>
$request
->
input
(
'tahun'
),
'id_fakultas'
=>
$request
->
id_fakultas
[
$index
]
,
'id_fakultas'
=>
$idfakultas
,
'jumlah'
=>
$request
->
jumlah_sub_peryataan
[
$index
],
'id_sub_instrument'
=>
$request
->
id_sub_instrument
,
'id_sub_instrument'
=>
$request
->
id_sub_instrument
,
],
[
'jumlah'
=>
$value2
,
]);
]);
}
}
else
{
$update
=
Hasil_Instrument
::
where
(
'id'
,
$request
->
id_subhasil
[
$index
])
->
update
([
'jumlah'
=>
$request
->
jumlah_sub_peryataan
[
$index
]]);
}
}
...
@@ -154,19 +162,36 @@ class LembarInstrumentMonitoringController extends Controller
...
@@ -154,19 +162,36 @@ class LembarInstrumentMonitoringController extends Controller
* @param int $id
* @param int $id
* @return \Illuminate\Http\Response
* @return \Illuminate\Http\Response
*/
*/
public
function
cetak_pdf
(
$id
,
$id2
)
public
function
cetak_pdf
(
Request
$request
)
{
{
$data
[
'filter_instrument'
]
=
decrypt
(
$id
);
$data
[
'no_dokumen'
]
=
$request
->
input
(
'no_dokumen'
);
$data
[
'filter_tahun'
]
=
decrypt
(
$id2
);
$data
[
'revisi'
]
=
$request
->
input
(
'revisi'
);
$data
[
'instrumentdetail'
]
=
Instrument
::
query
()
->
where
(
'id'
,
decrypt
(
$id
))
->
first
();
$data
[
'tanggal_terbit'
]
=
$request
->
input
(
'tanggal_terbit'
);
$data
[
'filter_instrument'
]
=
$request
->
input
(
'filter_instrument'
);
$data
[
'filter_tahun'
]
=
$request
->
input
(
'filter_tahun'
);
$data
[
'instrumentdetail'
]
=
Instrument
::
query
()
->
where
(
'id'
,
$request
->
input
(
'filter_instrument'
))
->
first
();
$data
[
'pernyataan_instrument'
]
=
Pernyataan_Instrument
::
query
()
->
orderBy
(
'pernyataan_instrument'
)
->
get
();
$data
[
'pernyataan_instrument'
]
=
Pernyataan_Instrument
::
query
()
->
orderBy
(
'pernyataan_instrument'
)
->
get
();
$data
[
'sub_instrument'
]
=
Sub_Instrument
::
query
()
->
where
(
'id_instrument'
,
decrypt
(
$id
))
$data
[
'sub_instrument'
]
=
Sub_Instrument
::
query
()
->
where
(
'id_instrument'
,
$request
->
input
(
'filter_instrument'
))
->
orderBy
(
'id_instrument'
)
->
get
();
->
orderBy
(
'id_instrument'
)
->
get
();
$data
[
'sub_pernyataan_instrument'
]
=
Sub_Pernyataan_Instrument
::
query
()
->
orderBy
(
'sub_peryataan'
)
->
get
();
$data
[
'sub_pernyataan_instrument'
]
=
Sub_Pernyataan_Instrument
::
query
()
->
orderBy
(
'sub_peryataan'
)
->
get
();
$data
[
'fakultas'
]
=
Fakultas
::
query
()
->
orderBy
(
'id'
)
->
get
();
$data
[
'fakultas'
]
=
Fakultas
::
query
()
->
orderBy
(
'id'
)
->
get
();
$pdf
=
PDF
::
loadview
(
'content.backend.masters.lembar_instrument_monitoring.laporan'
,
$data
);
$data
[
'hasil_instrumen'
]
=
Hasil_Instrument
::
query
()
->
get
();
return
$pdf
->
download
(
'laporan-pegawai-pdf'
);
$data
[
'arr_hasil'
]
=
[];
foreach
(
$data
[
'hasil_instrumen'
]
as
$item
){
$data
[
'arr_hasil'
][
$item
->
id_pernyataan_instrument
][
$item
->
id_sub_pernyataan_instrument
][
$item
->
id_fakultas
][
$item
->
tahun
]
=
$item
;
}
$data
[
'arr_hasil_total'
]
=
[];
foreach
(
$data
[
'hasil_instrumen'
]
as
$item
)
{
$data
[
'arr_hasil_total'
][
$item
->
id_sub_instrument
][
$item
->
id_fakultas
][
$item
->
tahun
]
=
$item
;
}
$pdf
=
PDF
::
loadview
(
'content.backend.masters.lembar_instrument_monitoring.laporan'
,
$data
)
->
setPaper
(
'a4'
,
'landscape'
);
return
$pdf
->
stream
(
'laporan-pegawai-pdf'
);
}
}
}
}
app/Http/Controllers/Admin/PernyataanInstrumentController.php
View file @
19ccab77
...
@@ -27,8 +27,8 @@ class PernyataanInstrumentController extends Controller
...
@@ -27,8 +27,8 @@ class PernyataanInstrumentController extends Controller
*/
*/
public
function
index
()
public
function
index
()
{
{
$data
[
'pernyataan_instrument'
]
=
Pernyataan_Instrument
::
query
()
->
orderBy
(
'
pernyataan_instrument
'
)
->
get
();
$data
[
'pernyataan_instrument'
]
=
Pernyataan_Instrument
::
query
()
->
orderBy
(
'
created_at'
,
'asc
'
)
->
get
();
$data
[
'sub_instrument'
]
=
Sub_Instrument
::
query
()
->
orderBy
(
'
id_instrument
'
)
->
get
();
$data
[
'sub_instrument'
]
=
Sub_Instrument
::
query
()
->
orderBy
(
'
created_at'
,
'asc
'
)
->
get
();
$data
[
'sub_instrument_pernyataan'
]
=
Pernyataan_Instrument
::
with
([
'sub_instrument'
=>
function
(
$q
)
$data
[
'sub_instrument_pernyataan'
]
=
Pernyataan_Instrument
::
with
([
'sub_instrument'
=>
function
(
$q
)
...
...
resources/views/content/backend/masters/lembar_instrument_monitoring/index.blade.php
View file @
19ccab77
...
@@ -2,16 +2,16 @@
...
@@ -2,16 +2,16 @@
@
section
(
'title'
,
'Lembar Instrument Monitoring'
)
@
section
(
'title'
,
'Lembar Instrument Monitoring'
)
@
section
(
'content'
)
@
section
(
'content'
)
<
section
class
="
row
">
<
section
class
="
row
">
<div class="
col
-
md
-
12
">
<div class="
col
-
md
-
6
">
<div class="
card
">
<div class="
card
">
<div class="
card
-
body
px
-
3
py
-
4
-
5
">
<div class="
card
-
body
px
-
3
py
-
4
-
5
">
<div class="
row
">
<div class="
row
">
<div class="
col
-
md
-
12
">
<div class="
col
-
md
-
6
">
<h6 class="
text
-
muted
font
-
semibold
">Lembar Instrument Monitoring</h6>
<h6 class="
text
-
muted
font
-
semibold
">
Filter
Lembar Instrument Monitoring</h6>
<div class="
card
-
header
">
<div class="
card
-
header
">
<form action="
{{
route
(
'lembar_instrument_monitoring.index'
)
}}
" method="
PATCH
" enctype="
multipart
/
form
-
data
">
<form action="
{{
route
(
'lembar_instrument_monitoring.index'
)
}}
" method="
PATCH
" enctype="
multipart
/
form
-
data
">
{{ csrf_field() }}
{{ csrf_field() }}
<div class="
col
-
md
-
6
col
-
12
">
<div class="
col
-
md
-
12
col
-
12
">
<div class="
form
-
group
">
<div class="
form
-
group
">
<label for="
last
-
name
-
column
">Instrument</label>
<label for="
last
-
name
-
column
">Instrument</label>
<select class="
form
-
control
" name="
instrument
">
<select class="
form
-
control
" name="
instrument
">
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</div>
</div>
</div>
</div>
<div class="
col
-
md
-
6
col
-
12
">
<div class="
col
-
md
-
12
col
-
12
">
<div class="
form
-
group
">
<div class="
form
-
group
">
<label for="
last
-
name
-
column
">Tahun</label>
<label for="
last
-
name
-
column
">Tahun</label>
<select class="
form
-
control
" name="
tahun
">
<select class="
form
-
control
" name="
tahun
">
...
@@ -45,6 +45,49 @@
...
@@ -45,6 +45,49 @@
</div>
</div>
</div>
</div>
</div>
</div>
@if(!empty(
$filter_tahun
&&
$filter_instrument
))
<div class="
col
-
md
-
6
">
<div class="
card
">
<div class="
card
-
body
px
-
3
py
-
4
-
5
">
<div class="
row
">
<div class="
col
-
md
-
6
">
<h6 class="
text
-
muted
font
-
semibold
">Print Lembar Instrument Monitoring</h6>
<div class="
card
-
header
">
<form action="
{{
route
(
'cetak_pdf'
)
}}
" method="
post
" enctype="
multipart
/
form
-
data
" target="
_blank
">
{{ csrf_field() }}
<div class="
col
-
md
-
12
col
-
12
">
<div class="
form
-
group
">
<label for="
last
-
name
-
column
">No. Dokumen</label>
<input type="
text
" name="
no_dokumen
" class="
form
-
control
" required>
<input type="
hidden
" name="
filter_tahun
" value="
{{
$filter_tahun
}}
" class="
form
-
control
">
<input type="
hidden
" name="
filter_instrument
" value="
{{
$filter_instrument
}}
" class="
form
-
control
">
</div>
</div>
<div class="
col
-
md
-
12
col
-
12
">
<div class="
form
-
group
">
<label for="
last
-
name
-
column
">Revisi</label>
<input type="
text
" name="
revisi
" class="
form
-
control
" required>
</div>
</div>
<div class="
col
-
md
-
12
col
-
12
">
<div class="
form
-
group
">
<label for="
last
-
name
-
column
">Tanggal Terbit</label>
<input type="
date
" name="
tanggal_terbit
" class="
form
-
control
" required>
</div>
</div>
<button type="
submit
" class="
btn
btn
-
success
">Print</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endif
</section>
</section>
...
@@ -66,36 +109,31 @@
...
@@ -66,36 +109,31 @@
<h5 class="
text
-
muted
font
-
semibold
">
<h5 class="
text
-
muted
font
-
semibold
">
<center>LEMBAR @if(!empty(
$instrumentdetail
))
{
{$instrumentdetail->instrument}
}
@endif - TAHUN @if(!empty(
$filter_tahun
))
{
{$filter_tahun}
}
@endif</center>
<center>LEMBAR @if(!empty(
$instrumentdetail
))
{
{$instrumentdetail->instrument}
}
@endif - TAHUN @if(!empty(
$filter_tahun
))
{
{$filter_tahun}
}
@endif</center>
</h5>
</h5>
@if(!empty(
$filter_tahun
&&
$filter_instrument
))
<a href="
{{
route
(
'cetak_pdf'
,
[
'id'
=>
encrypt
(
$filter_instrument
),
'id2'
=>
encrypt
(
$filter_tahun
)])
}}
" class="
btn
btn
-
primary
me
-
1
mb
-
1
" target="
_blank
">PRINT</a>
@endif
<br><br>
@foreach (
$sub_instrument
as
$data
)
<h6>{{
$data->sub_instrument
}} </h6>
<div class="
table
-
responsive
">
<div class="
table
-
responsive
">
<table class="
table
table
-
striped
mb
-
0
">
<table class="
table
table
-
striped
mb
-
0
">
<thead>
<thead>
<th>No. Pernyataan</th>
<th>No. Pernyataan</th>
<th colspan="
{{
count
(
$fakultas
)}}
"><center>{{
$data->jenis_input
->detail }}</center></th>
@foreach (
$fakultas
as
$data
)
</thead>
<th>
{
{$data->fakultas}
}
</th>
<thead>
<th> </th>
@foreach (
$fakultas
as
$dataa
)
<th>
{
{$dataa->fakultas}
}
</th>
@endforeach
@endforeach
</thead>
</thead>
<tbody>
<tbody>
@foreach (
$sub_instrument
as
$data
)
<form action="
{{
route
(
'lembar_instrument_monitoring.store'
)}}
" method="
POST
" enctype="
multipart
/
form
-
data
">
<form action="
{{
route
(
'lembar_instrument_monitoring.store'
)}}
" method="
POST
" enctype="
multipart
/
form
-
data
">
@csrf
@csrf
<tr>
<td>
<strong>{{
$data->instrument
->instrument }}</strong> <br>
{{
$data->sub_instrument
}}</td>
@for (
$i
= 0;
$i
< count(
$fakultas
) ;
$i
++)
<td></td>
@endfor
<input type="
hidden
" value="
{{
$data
->
id
}}
" name="
id_sub_instrument
" class="
form
-
control
">
<input type="
hidden
" value="
{{
$data
->
id
}}
" name="
id_sub_instrument
" class="
form
-
control
">
</tr>
@php
$no
= 1; @endphp
@php
$no
= 1; @endphp
@foreach(
$pernyataan_instrument
as
$item
)
@foreach(
$pernyataan_instrument
as
$item
)
...
@@ -106,19 +144,10 @@
...
@@ -106,19 +144,10 @@
@for (
$i
= 1;
$i
<= count(
$fakultas
) ;
$i
++)
@for (
$i
= 1;
$i
<= count(
$fakultas
) ;
$i
++)
<td>
<td>
@php
$hasil_instrument
= App\Models\Hasil_Instrument::
where('id_pernyataan_instrument',
$item->id
)
->where('id_sub_pernyataan_instrument',null)
->where('id_fakultas',
$i
)
->where('tahun',
$filter_tahun
)
->first();
@endphp
<input type="
{{
$data
->
jenis_input
->
html
}}
"
<input type="
{{
$data
->
jenis_input
->
html
}}
"
name="
jumlah_pernyataan_instrument
[]
"class="
form
-
control
"
name="
jumlah_pernyataan_instrument
[]
"class="
form
-
control
"
value="
@
if
(
!
empty
(
$hasil_instrument
)){{
$hasil_instrument
->
jumlah
}}
@
endif
">
value="
{{
isset
(
$arr_hasil
[
$item
->
id
][
''
][
$i
][
$filter_tahun
])
?
$arr_hasil
[
$item
->
id
][
''
][
$i
][
$filter_tahun
]
->
jumlah
:
''
}}
">
<input type="
hidden
" value="
{{
$item
->
id
}}
" name="
id_pernyataan_instrument
[]
" class="
form
-
control
">
<input type="
hidden
" value="
{{
$item
->
id
}}
" name="
id_pernyataan_instrument
[]
" class="
form
-
control
">
...
@@ -138,7 +167,7 @@
...
@@ -138,7 +167,7 @@
<td>{{
$value->sub_peryataan
}}</td>
<td>{{
$value->sub_peryataan
}}</td>
@for (
$a
= 1;
$a
<= count(
$fakultas
) ;
$a
++)
@for (
$a
= 1;
$a
<= count(
$fakultas
) ;
$a
++)
<td>
<td>
@php
<!--
@php
$hasil_subinstrument
= App\Models\Hasil_Instrument::
$hasil_subinstrument
= App\Models\Hasil_Instrument::
where('id_pernyataan_instrument',
$item->id
)
where('id_pernyataan_instrument',
$item->id
)
->where('id_sub_pernyataan_instrument',
$value->id
)
->where('id_sub_pernyataan_instrument',
$value->id
)
...
@@ -146,12 +175,13 @@
...
@@ -146,12 +175,13 @@
->where('tahun',
$filter_tahun
)
->where('tahun',
$filter_tahun
)
->first();
->first();
@endphp
@endphp
-->
<input type="
{{
$data
->
jenis_input
->
html
}}
"
<
!-- <
input type="
{{
$data
->
jenis_input
->
html
}}
"
name="
jumlah_sub_peryataan
[
]
"class="
form
-
control
" value="
@
if
(
!
empty
(
$hasil_subinstrument
)){{
$hasil_subinstrument
->
jumlah
}}
@
endif
"
>
name="
jumlah_sub_peryataan
[
{{
$item
->
id
}}][{{
$value
->
id
}}][{{
$a
}}]
"class="
form
-
control
" value="
@
if
(
!
empty
(
$hasil_subinstrument
)){{
$hasil_subinstrument
->
jumlah
}}
@
endif
"> --
>
<input type="
hidden
" value="
{{
$value
->
id
}}
" name="
id_sub_pernyataan_instrument
[]
" class="
form
-
control
" >
<input type="
{{
$data
->
jenis_input
->
html
}}
"
name="
jumlah_sub_peryataan
[{{
$item
->
id
}}][{{
$value
->
id
}}][{{
$a
}}]
"class="
form
-
control
" value="
{{
isset
(
$arr_hasil
[
$item
->
id
][
$value
->
id
][
$a
][
$filter_tahun
])
?
$arr_hasil
[
$item
->
id
][
$value
->
id
][
$a
][
$filter_tahun
]
->
jumlah
:
''
}}
">
<input type="
hidden
" value="
@
if
(
!
empty
(
$hasil_subinstrument
)){{
$hasil_subinstrument
->
id
}}
@
endif
" name="
id_subhasil
[]
" class="
form
-
control
">
<input type="
hidden
" value="
@
if
(
!
empty
(
$hasil_subinstrument
)){{
$hasil_subinstrument
->
id
}}
@
endif
" name="
id_subhasil
[]
" class="
form
-
control
">
...
@@ -170,17 +200,12 @@
...
@@ -170,17 +200,12 @@
<td><strong>Jumlah</strong></td>
<td><strong>Jumlah</strong></td>
@for (
$b
= 1;
$b
<= count(
$fakultas
) ;
$b
++)
@for (
$b
= 1;
$b
<= count(
$fakultas
) ;
$b
++)
@php
$total
= App\Models\Hasil_Instrument::
where('id_sub_instrument',
$data->id
)
->where('id_fakultas',
$b
)
->where('tahun',
$filter_tahun
)
->first();
@endphp
<td><center><strong>@if(!empty(
$total
))
{
{$total->total}
}
@endif</strong></center></td>
<td><center><strong>{{ isset(
$arr_hasil_total[$data->id][$b][$filter_tahun]
) ?
$arr_hasil_total[$data->id][$b][$filter_tahun]
->total : '' }}</strong></center></td>
@endfor
@endfor
</tr>
</tr>
<tr>
<tr>
...
@@ -191,17 +216,18 @@
...
@@ -191,17 +216,18 @@
<div class="
col
-
12
d
-
flex
justify
-
content
-
end
">
<div class="
col
-
12
d
-
flex
justify
-
content
-
end
">
<button type="
submit
" class="
btn
btn
-
success
me
-
1
mb
-
1
">Simpan</button>
<button type="
submit
" class="
btn
btn
-
success
me
-
1
mb
-
1
">Simpan</button>
</div>
</div>
<br><br>
</td>
</td>
</tr>
</tr>
</form>
</form>
@endforeach
</tbody>
</tbody>
</table>
</table>
</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
...
...
resources/views/content/backend/masters/lembar_instrument_monitoring/laporan.blade.php
View file @
19ccab77
<html>
<html>
<head>
<head>
<title>
Membuat Laporan PDF Dengan DOMPDF Laravel
</title>
<title>
LEMBAR @if(!empty($instrumentdetail)) {{$instrumentdetail->instrument}}@endif - TAHUN @if(!empty($filter_tahun)) {{$filter_tahun}}@endif
</title>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity=
"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity=
"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin=
"anonymous"
>
</head>
</head>
<body>
<body>
...
@@ -8,69 +8,75 @@
...
@@ -8,69 +8,75 @@
table
tr
td
,
table
tr
td
,
table
tr
th
{
table
tr
th
{
font-size
:
9pt
;
font-size
:
9pt
;
align
:
center
;
}
}
</style>
</style>
<table
class=
'table table-bordered'
>
<thead>
<th><center><img
style=
"width:70px"
src=
"{{ asset('images/logo_unesa_kuning.png') }}"
alt=
""
></center></th>
<th
colspan=
"2"
><h5
align=
"center"
>
UNIVERSITAS NEGERI SURABAYA
</h5></th>
</thead>
<tbody>
<tr>
<td
rowspan=
"3"
><h6
align=
"center"
>
@if(!empty($instrumentdetail)) {{$instrumentdetail->instrument}}@endif
</h6></td>
<td
>
No. Dokumen
</td>
<td
>
@if(!empty($no_dokumen)) {{$no_dokumen}}@endif
</td>
</tr>
<tr>
<td
>
Revisi
</td>
<td
>
@if(!empty($revisi)) {{$revisi}}@endif
</td>
</tr>
<tr>
<td
>
Tanggal Terbit
</td>
<td
>
@if(!empty($tanggal_terbit)) {{$tanggal_terbit}}@endif
</td>
</tr>
</tbody>
</table>
<center>
<center>
<h
5>
Membuat Laporan PDF Dengan DOMPDF Laravel
</h4
>
<h
6>
<center>
LEMBAR @if(!empty($instrumentdetail)) {{$instrumentdetail->instrument}}@endif
<br>
TAHUN @if(!empty($filter_tahun)) {{$filter_tahun}}@endif
</center></h6
>
<h6><a
target=
"_blank"
href=
"https://www.malasngoding.com/membuat-laporan-…n-dompdf-laravel/"
>
www.malasngoding.com
</a></h5>
</center>
</center>
<br><br>
@foreach ($sub_instrument as $dataa)
<h6>
{{ $dataa->sub_instrument }}
</h6>
<table
class=
'table table-bordered'
>
<table
class=
'table table-bordered'
>
<thead>
<thead>
<th>
No. Pernyataan
</th>
<th><font
size=
"2"
>
No. Pernyataan
</font></th>
<th
colspan=
"{{count($fakultas)}}"
class=
"text-center"
><font
size=
"2"
>
{{ $dataa->jenis_input->detail }}
</font></th>
</thead>
<thead>
<th>
</th>
@foreach ($fakultas as $data)
@foreach ($fakultas as $data)
<th>
{{$data->fakultas}}
</th>
<th>
<font
size=
"2"
>
{{$data->fakultas}}
</font>
</th>
@endforeach
@endforeach
</thead>
</thead>
<tbody>
<tbody>
@foreach ($sub_instrument as $data)
<tr>
<td>
<strong>
{{ $data->instrument->instrument }}
</strong>
<br>
{{ $data->sub_instrument }}
</td>
@for ($i = 0; $i
<
count
($
fakultas
)
;
$
i
++)
<
td
></td>
@endfor
<input
type=
"hidden"
value=
"{{$data->id}}"
name=
"id_sub_instrument"
class=
"form-control"
>
</tr>
@php $no = 1; @endphp
@php $no = 1; @endphp
@foreach($pernyataan_instrument as $item)
@foreach($pernyataan_instrument as $item)
@if($data->id == $item->id_sub_instrument)
@if($data
a
->id == $item->id_sub_instrument)
<tr>
<tr>
<td>
{{ $no++ }}. {{ $item->pernyataan_instrument }}
</td>
<td>
{{ $no++ }}. {{ $item->pernyataan_instrument }}
</td>
@for ($i = 1; $i
<
=
count
($
fakultas
)
;
$
i
++)
@for ($i = 1; $i
<
=
count
($
fakultas
)
;
$
i
++)
<
td
>
<
td
>
@php
$hasil_instrument = App\Models\Hasil_Instrument::
where('id_pernyataan_instrument',$item->id)
->where('id_sub_pernyataan_instrument',null)
->where('id_fakultas',$i)
->where('tahun',$filter_tahun)
->first();
@endphp
<input
type=
"{{ $data->jenis_input->html }}"
name=
"jumlah_pernyataan_instrument[]"
class=
"form-control"
value=
"@if(!empty($hasil_instrument)){{$hasil_instrument->jumlah}}@endif"
>
<input
type=
"hidden"
value=
"{{$item->id}}"
name=
"id_pernyataan_instrument[]"
class=
"form-control"
>
<center>
{{ isset($arr_hasil[$item->id][''][$i][$filter_tahun]) ? $arr_hasil[$item->id][''][$i][$filter_tahun]->jumlah : '' }}
</center
>
<input
type=
"hidden"
value=
"{{$filter_tahun}}"
name=
"tahun"
class=
"form-control"
>
<input
type=
"hidden"
value=
"{{$i}}"
name=
"id_fakultas[]"
class=
"form-control"
>
<input
type=
"hidden"
value=
"@if(!empty($hasil_instrument)){{$hasil_instrument->id}}@endif"
name=
"id[]"
class=
"form-control"
>
</td>
</td>
@endfor
@endfor
...
@@ -82,22 +88,9 @@
...
@@ -82,22 +88,9 @@
<td>
{{ $value->sub_peryataan }}
</td>
<td>
{{ $value->sub_peryataan }}
</td>
@for ($a = 1; $a
<
=
count
($
fakultas
)
;
$
a
++)
@for ($a = 1; $a
<
=
count
($
fakultas
)
;
$
a
++)
<
td
>
<
td
>
@php
$hasil_subinstrument = App\Models\Hasil_Instrument::
where('id_pernyataan_instrument',$item->id)
->where('id_sub_pernyataan_instrument',$value->id)
->where('id_fakultas',$a)
->where('tahun',$filter_tahun)
->first();
@endphp
<input
type=
"{{ $data->jenis_input->html }}"
name=
"jumlah_sub_peryataan[]"
class=
"form-control"
value=
"@if(!empty($hasil_subinstrument)){{$hasil_subinstrument->jumlah}}@endif"
>
<input
type=
"hidden"
value=
"{{$value->id}}"
name=
"id_sub_pernyataan_instrument[]"
class=
"form-control"
>
<input
type=
"hidden"
value=
"@if(!empty($hasil_subinstrument)){{$hasil_subinstrument->id}}@endif"
name=
"id_subhasil[]"
class=
"form-control"
>
<center>
{{ isset($arr_hasil[$item->id][$value->id][$a][$filter_tahun]) ? $arr_hasil[$item->id][$value->id][$a][$filter_tahun]->jumlah : '' }}
</center
>
</td>
</td>
@endfor
@endfor
...
@@ -114,38 +107,19 @@
...
@@ -114,38 +107,19 @@
<td><strong>
Jumlah
</strong></td>
<td><strong>
Jumlah
</strong></td>
@for ($b = 1; $b
<
=
count
($
fakultas
)
;
$
b
++)
@for ($b = 1; $b
<
=
count
($
fakultas
)
;
$
b
++)
@
php
$
total =
App\Models\Hasil_Instrument::
where
('
id_sub_instrument
',$
data-
>
id)
->where('id_fakultas',$b)
->where('tahun',$filter_tahun)
->first();
@endphp
<
td
><center><strong>
{{ isset($arr_hasil_total[$dataa->id][$b][$filter_tahun]) ? $arr_hasil_total[$dataa->id][$b][$filter_tahun]->total : '' }}
</strong></center></td>
<td><center><strong>
@if(!empty($total)){{$total->total}}@endif
</strong></center></td>
@endfor
@endfor
</tr>
</tr>
<tr>
<td>
</td>
<td
colspan=
"{{count($fakultas)}}"
>
<div
class=
"col-12 d-flex justify-content-end"
>
<button
type=
"submit"
class=
"btn btn-success me-1 mb-1"
>
Simpan
</button>
</div>
<br><br>
</td>
</tr>
@endforeach
</tbody>
</tbody>
</table>
</table>
@endforeach
</body>
</body>
</html>
</html>
...
...
routes/web.php
View file @
19ccab77
...
@@ -57,5 +57,5 @@ Route::middleware(['auth:sanctum'])->group(function () {
...
@@ -57,5 +57,5 @@ Route::middleware(['auth:sanctum'])->group(function () {
Route
::
resource
(
'/lembar_instrument_monitoring'
,
LembarInstrumentMonitoringController
::
class
);
Route
::
resource
(
'/lembar_instrument_monitoring'
,
LembarInstrumentMonitoringController
::
class
);
Route
::
post
(
'/filter'
,[
LembarInstrumentMonitoringController
::
class
,
'filter'
])
->
name
(
'filter'
);
Route
::
post
(
'/filter'
,[
LembarInstrumentMonitoringController
::
class
,
'filter'
])
->
name
(
'filter'
);
Route
::
get
(
'cetak_pdf/{id}/{id2}
'
,
[
LembarInstrumentMonitoringController
::
class
,
'cetak_pdf'
])
->
name
(
'cetak_pdf'
);
Route
::
post
(
'cetak_pdf
'
,
[
LembarInstrumentMonitoringController
::
class
,
'cetak_pdf'
])
->
name
(
'cetak_pdf'
);
});
});
\ No newline at end of file
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