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
481bda46
Commit
481bda46
authored
Apr 21, 2025
by
Alfiro Pratama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filtering by Fakultas (Export Excel - Daftar Proposal)
parent
2fa52189
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
14 deletions
+80
-14
app/Exports/ProposalExport.php
+9
-1
app/Http/Controllers/Operator/ProposalController.php
+16
-2
resources/views/backend/operator/proposal/excel.blade.php
+16
-4
resources/views/backend/operator/proposal/index.blade.php
+39
-7
No files found.
app/Exports/ProposalExport.php
View file @
481bda46
...
...
@@ -15,8 +15,9 @@ class ProposalExport implements FromView
/**
* @return \Illuminate\Support\Collection
*/
public
function
__construct
(
$jenis
,
$status
,
$tahun
)
public
function
__construct
(
$
fakultas
,
$
jenis
,
$status
,
$tahun
)
{
$this
->
fakultas
=
$fakultas
;
$this
->
jenis
=
$jenis
;
$this
->
status
=
$status
;
$this
->
tahun
=
$tahun
;
...
...
@@ -26,6 +27,11 @@ class ProposalExport implements FromView
{
$statement
=
" STATUS_HAPUS = '0' "
;
if
(
$this
->
fakultas
!=
"0"
)
{
$statement
.=
" AND split_part(IDENTITAS_KETUA, '###', 3) = '"
.
$this
->
fakultas
.
"'"
;
}
if
(
$this
->
jenis
!=
"0"
)
{
$statement
.=
" AND jenis_id = '
{
$this
->
jenis
}
'"
;
...
...
@@ -80,6 +86,7 @@ class ProposalExport implements FromView
$row
[
'kelompok'
][]
=
[
'fak'
=>
$detil
->
fakultas
,
'prodi'
=>
$detil
->
prodi
,
'nama'
=>
$detil
->
nama
,
'nim'
=>
$detil
->
nim
,
'keanggotaan'
=>
$keanggotaan
,
...
...
@@ -90,6 +97,7 @@ class ProposalExport implements FromView
}
$datas
[
'list_proposal'
]
=
$result
;
$datas
[
'req_fakultas'
]
=
$this
->
fakultas
;
return
view
(
'backend.operator.proposal.excel'
,
$datas
);
}
...
...
app/Http/Controllers/Operator/ProposalController.php
View file @
481bda46
...
...
@@ -17,9 +17,11 @@ use App\Models\Proposal;
use
Illuminate\Http\Request
;
use
App\Models\DaftarProposal
;
use
App\Exports\ProposalExport
;
use
App\Helpers\InseoHelper
;
use
App\Http\Controllers\Controller
;
use
Maatwebsite\Excel\Facades\Excel
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Str
;
class
ProposalController
extends
Controller
{
...
...
@@ -27,12 +29,15 @@ class ProposalController extends Controller
{
$periode
=
Periode
::
query
()
->
get
();
$jenis
=
Jenis
::
query
()
->
where
(
'status_hapus'
,
'0'
)
->
get
();
return
view
(
'backend.operator.proposal.index'
,
compact
(
'periode'
,
'jenis'
))
->
withTitle
(
'Daftar Proposal'
);
$fakultas
=
array_unique
(
array_values
(
InseoHelper
::
singkatan_fakultas
()));
sort
(
$fakultas
);
return
view
(
'backend.operator.proposal.index'
,
compact
(
'periode'
,
'jenis'
,
'fakultas'
))
->
withTitle
(
'Daftar Proposal'
);
}
/* AJAX request */
public
function
getData
(
Request
$request
){
// parameter
$fakultas
=
$request
->
get
(
'fakultas'
);
$jenis
=
$request
->
get
(
'jenis'
);
$status
=
$request
->
get
(
'status'
);
$tahun
=
$request
->
get
(
'tahun'
);
...
...
@@ -59,6 +64,10 @@ class ProposalController extends Controller
// Total records
$statementGlobal
=
" STATUS_HAPUS = '0' "
;
if
(
$fakultas
!=
"0"
)
{
$statementGlobal
.=
" AND split_part(IDENTITAS_KETUA, '###', 3) = '"
.
$fakultas
.
"'"
;
}
if
(
$jenis
!=
"0"
)
{
$statementGlobal
.=
" AND JENIS_ID = '"
.
$jenis
.
"'"
;
...
...
@@ -341,6 +350,7 @@ class ProposalController extends Controller
public
function
cetak_proposal
(
Request
$request
)
{
ini_set
(
'max_execution_time'
,
0
);
$fakultas
=
$request
->
fakultas
;
$jenis
=
$request
->
jenis
;
$status
=
$request
->
status
;
$tahun
=
$request
->
tahun
;
...
...
@@ -353,7 +363,11 @@ class ProposalController extends Controller
$startTime
=
microtime
(
true
);
// Ekspor ke Excel
$response
=
Excel
::
download
(
new
ProposalExport
(
$jenis
,
$status
,
$tahun
),
'daftar-proposal-pmw-'
.
$tahun
.
'_export.xlsx'
);
if
(
$fakultas
!=
'0'
)
{
$response
=
Excel
::
download
(
new
ProposalExport
(
$fakultas
,
$jenis
,
$status
,
$tahun
),
'daftar-proposal-pmw-'
.
Str
::
slug
(
$fakultas
)
.
'-'
.
$tahun
.
'_export.xlsx'
);
}
else
{
$response
=
Excel
::
download
(
new
ProposalExport
(
$fakultas
,
$jenis
,
$status
,
$tahun
),
'daftar-proposal-pmw-'
.
$tahun
.
'_export.xlsx'
);
}
// Akhir pencatatan waktu
$endTime
=
microtime
(
true
);
...
...
resources/views/backend/operator/proposal/excel.blade.php
View file @
481bda46
...
...
@@ -4,23 +4,28 @@
<
table
>
<
thead
>
<
tr
>
<
th
colspan
=
"
3
"
style
=
"font-size: 16;"
><
strong
>
DAFTAR
PROPOSAL
PMW
MAHASISWA
UNESA
</
strong
></
th
>
<
th
colspan
=
"
5
"
style
=
"font-size: 16;"
><
strong
>
DAFTAR
PROPOSAL
PMW
MAHASISWA
UNESA
</
strong
></
th
>
<
th
></
th
>
<
th
></
th
>
<
th
><
strong
>
Keterangan
:</
strong
></
th
>
<
th
style
=
"background-color: yellow; border: 1px solid black;"
></
th
>
<
th
colspan
=
"
2
"
><
strong
>
(
Menunggu
Persetujuan
Dosen
Pembimbing
)
</
strong
></
th
>
<
th
colspan
=
"
4
"
><
strong
>
(
Menunggu
Persetujuan
Dosen
Pembimbing
)
</
strong
></
th
>
</
tr
>
</
thead
>
<
tbody
>
<
tr
>
<
td
colspan
=
"
3
"
style
=
"font-size: 14;"
><
strong
>
Periode
:
{{
$list_proposal
[
0
][
'periode'
]
}}
</
strong
></
td
>
<
td
colspan
=
"
5
"
style
=
"font-size: 14;"
><
strong
>
Periode
:
{{
$list_proposal
[
0
][
'periode'
]
}}
</
strong
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
></
td
>
<
td
style
=
"background-color: red; border: 1px solid black;"
></
td
>
<
td
colspan
=
"
2
"
><
strong
>
(
Ditolak
oleh
Dosen
Pembimbing
)
</
strong
></
td
>
<
td
colspan
=
"
4
"
><
strong
>
(
Ditolak
oleh
Dosen
Pembimbing
)
</
strong
></
td
>
</
tr
>
@
if
(
$req_fakultas
!==
'0'
)
<
tr
>
<
td
colspan
=
"3"
style
=
"font-size: 14;"
><
strong
>
Fakultas
:
{{
$req_fakultas
}}
</
strong
></
td
>
</
tr
>
@
endif
</
tbody
>
</
table
><
br
>
<
table
border
=
"1"
>
...
...
@@ -30,6 +35,7 @@
<
th
valign
=
"middle"
style
=
"background-color: orange; text-align: center; border: 1px solid black;"
><
strong
>
Kode
Kelompok
</
strong
></
th
>
<
th
valign
=
"middle"
style
=
"background-color: orange; text-align: center; border: 1px solid black;"
><
strong
>
Kategori
PMW
</
strong
></
th
>
<
th
valign
=
"middle"
style
=
"background-color: orange; text-align: center; border: 1px solid black;"
><
strong
>
Fakultas
</
strong
></
th
>
<
th
valign
=
"middle"
style
=
"background-color: orange; text-align: center; border: 1px solid black;"
><
strong
>
Prodi
</
strong
></
th
>
<
th
valign
=
"middle"
style
=
"background-color: orange; text-align: center; border: 1px solid black;"
><
strong
>
Nama
</
strong
></
th
>
<
th
valign
=
"middle"
style
=
"background-color: orange; text-align: center; border: 1px solid black;"
><
strong
>
NIM
</
strong
></
th
>
<
th
valign
=
"middle"
style
=
"background-color: orange; text-align: center; border: 1px solid black;"
><
strong
>
Keanggotaan
</
strong
></
th
>
...
...
@@ -59,6 +65,7 @@
<
td
rowspan
=
"{{ count(
$proposal['kelompok']
) }}"
style
=
"background-color: red; vertical-align: top; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kode'
]
}}
</
td
>
<
td
rowspan
=
"{{ count(
$proposal['kelompok']
) }}"
style
=
"background-color: red; vertical-align: top; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'jenis'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'fak'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'prodi'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; border: 1px solid black;"
>
{{
ucwords
(
$proposal
[
'kelompok'
][
0
][
'nama'
])
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'nim'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'keanggotaan'
]
}}
</
td
>
...
...
@@ -78,6 +85,7 @@
@
if
(
$key
!=
0
)
<
tr
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$member
[
'fak'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$member
[
'prodi'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; border: 1px solid black;"
>
{{
ucwords
(
$member
[
'nama'
])
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$member
[
'nim'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: red; text-align: center; border: 1px solid black;"
>
{{
$member
[
'keanggotaan'
]
}}
</
td
>
...
...
@@ -90,6 +98,7 @@
<
td
rowspan
=
"{{ count(
$proposal['kelompok']
) }}"
style
=
"background-color: yellow; vertical-align: top; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kode'
]
}}
</
td
>
<
td
rowspan
=
"{{ count(
$proposal['kelompok']
) }}"
style
=
"background-color: yellow; vertical-align: top; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'jenis'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'fak'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'prodi'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; border: 1px solid black;"
>
{{
ucwords
(
$proposal
[
'kelompok'
][
0
][
'nama'
])
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'nim'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'keanggotaan'
]
}}
</
td
>
...
...
@@ -109,6 +118,7 @@
@
if
(
$key
!=
0
)
<
tr
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$member
[
'fak'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$member
[
'prodi'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; border: 1px solid black;"
>
{{
ucwords
(
$member
[
'nama'
])
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$member
[
'nim'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"background-color: yellow; text-align: center; border: 1px solid black;"
>
{{
$member
[
'keanggotaan'
]
}}
</
td
>
...
...
@@ -121,6 +131,7 @@
<
td
rowspan
=
"{{ count(
$proposal['kelompok']
) }}"
style
=
"vertical-align: top; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kode'
]
}}
</
td
>
<
td
rowspan
=
"{{ count(
$proposal['kelompok']
) }}"
style
=
"vertical-align: top; text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'jenis'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'fak'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'prodi'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"border: 1px solid black;"
>
{{
ucwords
(
$proposal
[
'kelompok'
][
0
][
'nama'
])
}}
</
td
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'nim'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$proposal
[
'kelompok'
][
0
][
'keanggotaan'
]
}}
</
td
>
...
...
@@ -140,6 +151,7 @@
@
if
(
$key
!=
0
)
<
tr
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$member
[
'fak'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$member
[
'prodi'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"border: 1px solid black;"
>
{{
ucwords
(
$member
[
'nama'
])
}}
</
td
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$member
[
'nim'
]
}}
</
td
>
<
td
valign
=
"middle"
style
=
"text-align: center; border: 1px solid black;"
>
{{
$member
[
'keanggotaan'
]
}}
</
td
>
...
...
resources/views/backend/operator/proposal/index.blade.php
View file @
481bda46
...
...
@@ -35,9 +35,22 @@
<div class="
card
-
body
">
{!! csrf_field() !!}
<div class="
row
">
<div class="
col
-
md
-
4
">
<div class="
col
-
md
-
3
">
<div class="
row
">
<label class="
col
-
sm
-
3
col
-
form
-
label
">Kategori PMW : </label>
<label class="
col
-
sm
-
4
col
-
form
-
label
">Fakultas : </label>
<div class="
col
-
sm
-
6
">
<select class="
form
-
select
" name="
reqFakultas
" id="
reqFakultas
">
<option value="
0
">Semua</option>
@foreach (
$fakultas
as
$fak
)
<option value="
{{
$fak
}}
">{{
$fak
}}</option>
@endforeach
</select>
</div>
</div>
</div>
<div class="
col
-
md
-
3
">
<div class="
row
">
<label class="
col
-
sm
-
4
col
-
form
-
label
">Kategori PMW : </label>
<div class="
col
-
sm
-
6
">
<select class="
form
-
select
" name="
reqJenisPkm
" id="
reqJenisPkm
">
<option value="
0
">Semua</option>
...
...
@@ -48,7 +61,7 @@
</div>
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
col
-
md
-
3
">
<div class="
row
">
<label class="
col
-
sm
-
3
col
-
form
-
label
">Status : </label>
<div class="
col
-
sm
-
6
">
...
...
@@ -61,7 +74,7 @@
</div>
</div>
</div>
<div class="
col
-
md
-
4
">
<div class="
col
-
md
-
3
">
<div class="
row
">
<label class="
col
-
sm
-
3
col
-
form
-
label
">Tahun : </label>
<div class="
col
-
sm
-
6
">
...
...
@@ -98,11 +111,20 @@
</div>
</div> <!-- end col -->
</div> <!-- end row -->
<!-- Tambahkan di luar container -->
<div id="
spinner
" style="
display
:
none
;
position
:
fixed
;
z
-
index
:
9999
;
top
:
50
%
;
left
:
50
%
;
transform
:
translate
(
-
50
%
,
-
50
%
);
padding
:
1
rem
;
background
:
rgba
(
255
,
255
,
255
,
0.8
);
border
-
radius
:
6
px
;
">
<div class="
spinner
-
border
text
-
primary
" role="
status
"></div>
<span style="
margin
-
left
:
10
px
;
">Loading...</span>
</div>
@endsection
@section('js')
<script>
$("
#reqJenisPkm, #reqStatus, #reqTahun").select2({
$("
#req
Fakultas, #req
JenisPkm, #reqStatus, #reqTahun").select2({
placeholder
:
"Semua"
,
allowClear
:
true
});
...
...
@@ -116,6 +138,7 @@
"url"
:
"
{
{route('operator.getProposal')}
}
"
,
"data"
:
function
(
data
)
{
data
.
fakultas
=
$
(
"#reqFakultas"
)
.
val
();
data
.
jenis
=
$
(
"#reqJenisPkm"
)
.
val
();
data
.
status
=
$
(
"#reqStatus"
)
.
val
();
data
.
tahun
=
$
(
"#reqTahun"
)
.
val
();
...
...
@@ -140,10 +163,18 @@
]
});
$
(
'#reqJenisPkm, #reqStatus, #reqTahun'
)
.
change
(
function
(){
$
(
'#req
Fakultas, #req
JenisPkm, #reqStatus, #reqTahun'
)
.
change
(
function
(){
oTable
.
draw
();
});
oTable
.
on
(
'processing.dt'
,
function
(
e
,
settings
,
processing
)
{
if
(
processing
)
{
$
(
'#spinner'
)
.
show
();
}
else
{
$
(
'#spinner'
)
.
hide
();
}
});
$
(
'#example'
)
.
on
(
'click'
,
'.viewdetails'
,
function
(){
var
kelId
=
$
(
this
)
.
attr
(
'data-id'
);
...
...
@@ -218,11 +249,12 @@
function
cetak
()
{
var
_token
=
$
(
'input[name="_token"]'
)
.
val
();
var
fakultas
=
$
(
"#reqFakultas"
)
.
val
();
var
jenis
=
$
(
"#reqJenisPkm"
)
.
val
();
var
status
=
$
(
"#reqStatus"
)
.
val
();
var
tahun
=
$
(
"#reqTahun"
)
.
val
();
window
.
open
(
'{{url("/operator/cetak-proposal/")}}?jenis='
+
jenis
+
'&tahun='
+
tahun
+
'&status='
+
status
+
'&_token='
+
_token
,
'_blank'
);
window
.
open
(
'{{url("/operator/cetak-proposal/")}}?
fakultas='
+
fakultas
+
'&
jenis='
+
jenis
+
'&tahun='
+
tahun
+
'&status='
+
status
+
'&_token='
+
_token
,
'_blank'
);
};
</
script
>
@
endsection
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