Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simpkm
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
Farendi Giotivano R.P
simpkm
Commits
752dd786
Commit
752dd786
authored
Feb 17, 2024
by
Novan Bagus Setiawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perhitungan reviewer pertahun
parent
d1f7f15c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
7 deletions
+68
-7
app/Http/Controllers/Operator/ReviewerController.php
+7
-2
app/Http/Controllers/Operator/ReviewerMonevController.php
+11
-4
resources/views/backend/operator/reviewer/index.blade.php
+27
-1
resources/views/backend/operator/reviewer/monev.blade.php
+23
-0
No files found.
app/Http/Controllers/Operator/ReviewerController.php
View file @
752dd786
...
...
@@ -24,13 +24,18 @@ class ReviewerController extends Controller
use
LoginTrait
;
public
function
index
()
{
return
view
(
'backend.operator.reviewer.index'
)
->
withTitle
(
'Reviewer Seleksi Internal'
);
$periode
=
Periode
::
query
()
->
get
();
return
view
(
'backend.operator.reviewer.index'
,
compact
(
'periode'
))
->
withTitle
(
'Reviewer Seleksi Internal'
);
}
/* AJAX request */
public
function
getData
(
Request
$request
){
$jenis_monev_id
=
'ba11c2b5-d65d-4360-9717-98e4fa9b9188'
;
$tahun
=
$request
->
get
(
'tahun'
);
if
(
$tahun
==
'0'
)
$tahun
=
'0'
;
## Read value
$draw
=
$request
->
get
(
'draw'
);
...
...
@@ -61,7 +66,7 @@ class ReviewerController extends Controller
$records
=
Reviewer
::
orderBy
(
$columnName
,
$columnSortOrder
)
->
whereRaw
(
$statementGlobal
.
$statement
)
->
select
(
'reviewer.*'
)
->
selectRaw
(
"ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '1', '"
.
$jenis_monev_id
.
"', '0'
) jumlah_harus_review, ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '1', '"
.
$jenis_monev_id
.
"', '1
') jumlah_sudah_review"
)
->
selectRaw
(
"ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '1', '"
.
$jenis_monev_id
.
"', '0'
, '"
.
$tahun
.
"') jumlah_harus_review, ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '1', '"
.
$jenis_monev_id
.
"', '1', '"
.
$tahun
.
"
') jumlah_sudah_review"
)
->
skip
(
$start
)
->
take
(
$rowperpage
)
->
get
();
...
...
app/Http/Controllers/Operator/ReviewerMonevController.php
View file @
752dd786
...
...
@@ -10,21 +10,24 @@ use Uuid;
use
Alert
;
use
Crypt
;
use
GuzzleHttp\Client
;
use
App\Models\
Reviewer
;
use
App\Models\
Periode
;
use
App\Models\Reviewer
;
use
App\Models\JenisMonev
;
use
App\Traits\LoginTrait
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
App\Traits\LoginTrait
;
class
ReviewerMonevController
extends
Controller
{
use
LoginTrait
;
public
function
index
(
$id
)
{
$periode
=
Periode
::
query
()
->
get
();
$jenis_monev
=
JenisMonev
::
select
(
'nama'
)
->
where
(
'jenis_monev_id'
,
Crypt
::
decrypt
(
$id
))
->
first
();
$data
=
[
'id'
=>
$id
'id'
=>
$id
,
'periode'
=>
$periode
];
return
view
(
'backend.operator.reviewer.monev'
,
compact
(
'data'
))
->
withTitle
(
'Reviewer '
.
$jenis_monev
->
nama
);
}
...
...
@@ -33,6 +36,10 @@ class ReviewerMonevController extends Controller
public
function
getDataMonev
(
Request
$request
){
$jenis_monev_id
=
Crypt
::
decrypt
(
$request
->
get
(
'jenis_monev_id'
));
$tahun
=
$request
->
get
(
'tahun'
);
if
(
$tahun
==
'0'
)
$tahun
=
'0'
;
## Read value
$draw
=
$request
->
get
(
'draw'
);
...
...
@@ -67,7 +74,7 @@ class ReviewerMonevController extends Controller
$records
=
Reviewer
::
orderBy
(
$columnName
,
$columnSortOrder
)
->
whereRaw
(
$statementGlobal
.
$statement
)
->
select
(
'reviewer.*'
)
->
selectRaw
(
"ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '2', '"
.
$jenis_monev_id
.
"', '0'
) jumlah_harus_review, ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '2', '"
.
$jenis_monev_id
.
"', '1
') jumlah_sudah_review"
)
->
selectRaw
(
"ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '2', '"
.
$jenis_monev_id
.
"', '0'
, '"
.
$tahun
.
"') jumlah_harus_review, ambil_jumlah_reviewer_info_review(reviewer.reviewer_id, '2', '"
.
$jenis_monev_id
.
"', '1', '"
.
$tahun
.
"
') jumlah_sudah_review"
)
->
skip
(
$start
)
->
take
(
$rowperpage
)
->
get
();
...
...
resources/views/backend/operator/reviewer/index.blade.php
View file @
752dd786
...
...
@@ -28,6 +28,7 @@
</button>
</div>
</div>
</div>
</div>
<!-- end page title -->
...
...
@@ -38,6 +39,23 @@
<div class="
col
-
12
">
<div class="
card
">
<div class="
card
-
body
">
{!! csrf_field() !!}
<div class="
row
">
<div class="
col
-
md
-
4
">
<div class="
row
">
<label class="
col
-
sm
-
3
col
-
form
-
label
">Tahun : </label>
<div class="
col
-
sm
-
6
">
<select class="
form
-
select
select2
" name="
reqTahun
" id="
reqTahun
">
<option value="
0
">Semua</option>
@foreach (
$periode
as
$res
)
<option value="
{{
$res
->
nama
}}
" @php if(
$res->nama
== date('Y')) echo 'selected'; @endphp>{{
$res->nama
}}</option>
@endforeach
</select>
</div>
</div>
</div>
</div>
<br>
<table id="
example
" class="
table
table
-
bordered
dt
-
responsive
nowrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<thead>
...
...
@@ -113,7 +131,11 @@
processing: true,
serverSide: true,
ajax: {
"
url
" : "
{{
route
(
'operator.getReviewer'
)}}
"
"
url
" : "
{{
route
(
'operator.getReviewer'
)}}
",
"
data
" : function ( data )
{
data.tahun = $("
#reqTahun").val();
}
},
columns
:
[
{
data
:
'reviewer_id'
},
...
...
@@ -133,6 +155,10 @@
]
});
$
(
'#reqTahun'
)
.
change
(
function
(){
oTable
.
draw
();
});
var
oTable1
=
$
(
'#example1'
)
.
DataTable
({
paging
:
true
,
searching
:
true
,
...
...
resources/views/backend/operator/reviewer/monev.blade.php
View file @
752dd786
...
...
@@ -12,6 +12,7 @@
@php
$reqId
=
$data['id']
;
$periode
=
$data['periode']
;
@endphp
@section('contents')
...
...
@@ -42,6 +43,23 @@
<div class="
col
-
12
">
<div class="
card
">
<div class="
card
-
body
">
{!! csrf_field() !!}
<div class="
row
">
<div class="
col
-
md
-
4
">
<div class="
row
">
<label class="
col
-
sm
-
3
col
-
form
-
label
">Tahun : </label>
<div class="
col
-
sm
-
6
">
<select class="
form
-
select
select2
" name="
reqTahun
" id="
reqTahun
">
<option value="
0
">Semua</option>
@foreach (
$periode
as
$res
)
<option value="
{{
$res
->
nama
}}
" @php if(
$res->nama
== date('Y')) echo 'selected'; @endphp>{{
$res->nama
}}</option>
@endforeach
</select>
</div>
</div>
</div>
</div>
<br>
<table id="
example
" class="
table
table
-
bordered
dt
-
responsive
nowrap
" style="
border
-
collapse
:
collapse
;
border
-
spacing
:
0
;
width
:
100
%
;
">
<thead>
...
...
@@ -110,6 +128,7 @@
"
data
" : function ( data )
{
data.jenis_monev_id = '{{
$reqId
}}';
data.tahun = $("
#reqTahun").val();
}
},
columns
:
[
...
...
@@ -130,6 +149,10 @@
]
});
$
(
'#reqTahun'
)
.
change
(
function
(){
oTable
.
draw
();
});
var
oTable1
=
$
(
'#example1'
)
.
DataTable
({
paging
:
true
,
searching
:
true
,
...
...
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