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
ba6027dc
Commit
ba6027dc
authored
Apr 22, 2024
by
Muhammad Iskandar Java
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add middleware nilai seleksi
parent
f5057285
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
8 deletions
+52
-8
app/Http/Controllers/Reviewer/DaftarSeleksiController.php
+2
-2
app/Http/Kernel.php
+2
-0
app/Http/Middleware/NilaiSeleksiInternal.php
+40
-0
resources/views/backend/reviewer/seleksi/nilai.blade.php
+6
-4
resources/views/layouts/headpg.blade.php
+2
-2
No files found.
app/Http/Controllers/Reviewer/DaftarSeleksiController.php
View file @
ba6027dc
...
@@ -32,7 +32,7 @@ class DaftarSeleksiController extends Controller
...
@@ -32,7 +32,7 @@ class DaftarSeleksiController extends Controller
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
middleware
(
'auth'
);
$this
->
middleware
(
'auth'
);
$this
->
middleware
(
'nilai.seleksi-internal'
,
[
'only'
=>
[
'edit'
,
'update'
]]);
$this
->
middleware
(
function
(
$request
,
$next
)
{
$this
->
middleware
(
function
(
$request
,
$next
)
{
$this
->
rBiodata
=
Auth
::
user
()
->
rBiodata
;
$this
->
rBiodata
=
Auth
::
user
()
->
rBiodata
;
...
@@ -161,7 +161,7 @@ class DaftarSeleksiController extends Controller
...
@@ -161,7 +161,7 @@ class DaftarSeleksiController extends Controller
if
(
$status_administrasi
!=
0
)
if
(
$status_administrasi
!=
0
)
{
{
if
(
$status_nilai
==
0
)
if
(
$status_nilai
==
1
)
{
{
if
(
$urut
==
'1'
)
if
(
$urut
==
'1'
)
$aksi
=
'<h4>'
.
$nilai_1
.
'</h4>'
;
$aksi
=
'<h4>'
.
$nilai_1
.
'</h4>'
;
...
...
app/Http/Kernel.php
View file @
ba6027dc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
App\Http
;
namespace
App\Http
;
use
App\Http\Middleware\NilaiSeleksiInternal
;
use
Illuminate\Foundation\Http\Kernel
as
HttpKernel
;
use
Illuminate\Foundation\Http\Kernel
as
HttpKernel
;
class
Kernel
extends
HttpKernel
class
Kernel
extends
HttpKernel
...
@@ -66,5 +67,6 @@ class Kernel extends HttpKernel
...
@@ -66,5 +67,6 @@ class Kernel extends HttpKernel
'throttle'
=>
\Illuminate\Routing\Middleware\ThrottleRequests
::
class
,
'throttle'
=>
\Illuminate\Routing\Middleware\ThrottleRequests
::
class
,
'verified'
=>
\Illuminate\Auth\Middleware\EnsureEmailIsVerified
::
class
,
'verified'
=>
\Illuminate\Auth\Middleware\EnsureEmailIsVerified
::
class
,
'role'
=>
\Spatie\Permission\Middlewares\RoleMiddleware
::
class
,
'role'
=>
\Spatie\Permission\Middlewares\RoleMiddleware
::
class
,
'nilai.seleksi-internal'
=>
NilaiSeleksiInternal
::
class
];
];
}
}
app/Http/Middleware/NilaiSeleksiInternal.php
0 → 100644
View file @
ba6027dc
<?php
namespace
App\Http\Middleware
;
use
Closure
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Support\Facades\DB
;
class
NilaiSeleksiInternal
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public
function
handle
(
Request
$request
,
Closure
$next
)
{
$id
=
$request
->
route
(
'seleksi_internal'
);
$biodata
=
Auth
::
user
()
->
rBiodata
;
$noidentitas
=
$biodata
->
noidentitas
;
$proposal_id
=
decrypt
(
$id
);
$status_nilai
=
DB
::
select
(
"select ambil_data_reviewer_proposal('"
.
$noidentitas
.
"', '"
.
$proposal_id
.
"', '2')"
)[
0
]
->
ambil_data_reviewer_proposal
;
$status_administrasi
=
DB
::
select
(
"select ambil_data_reviewer_proposal('"
.
$noidentitas
.
"', '"
.
$proposal_id
.
"', '3')"
)[
0
]
->
ambil_data_reviewer_proposal
;
if
(
$status_administrasi
!=
0
)
{
if
(
$status_nilai
!=
1
)
{
if
(
$status_administrasi
!=
'2'
)
return
$next
(
$request
);
}
}
return
redirect
()
->
back
();
}
}
resources/views/backend/reviewer/seleksi/nilai.blade.php
View file @
ba6027dc
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
<tr class="
table
-
light
">
<tr class="
table
-
light
">
<td>
<td>
<input type="
hidden
" name="
jenis_penilaian_id
[]
" value="
{{
$val
->
jenis_penilaian_monev_id
}}
">
<input type="
hidden
" name="
jenis_penilaian_id
[]
" value="
{{
$val
->
jenis_penilaian_monev_id
}}
">
<span>{{
$val->nama
}}</span>
<span>{{
$val->nama
}}
{{
$val->bobot
}}
</span>
</td>
</td>
<td>
<td>
<select name="
skor
[]
" class="
hitung_skor
" data-id="
{{
$val
->
jenis_penilaian_monev_id
}}
">
<select name="
skor
[]
" class="
hitung_skor
" data-id="
{{
$val
->
jenis_penilaian_monev_id
}}
">
...
@@ -146,6 +146,8 @@
...
@@ -146,6 +146,8 @@
@section('js')
@section('js')
<script>
<script>
// sum();
$(function(){
$(function(){
$('#input-file').change(function(){
$('#input-file').change(function(){
var input = this;
var input = this;
...
@@ -157,7 +159,7 @@
...
@@ -157,7 +159,7 @@
$('.hitung_skor').on('change', function() {
$('.hitung_skor').on('change', function() {
var id = $(this).attr("
data
-
id
");
var id = $(this).attr("
data
-
id
");
var val = $(this).find("
:
checked
").val();
var val = $(this).find("
:
checked
").val();
var bobot =
$('#varBobot-'+id).text()
;
var bobot =
1
;
var nilai = val * bobot;
var nilai = val * bobot;
$('#varNilai-'+id).text(nilai);
$('#varNilai-'+id).text(nilai);
...
@@ -167,8 +169,8 @@
...
@@ -167,8 +169,8 @@
function sum(){
function sum(){
var sum = 0;
var sum = 0;
$('.
clsNilai
').each(function () {
$('.
hitung_skor
').each(function () {
sum += Number($(this).
text
());
sum += Number($(this).
val
());
});
});
$('#varTotalNilai').text(sum);
$('#varTotalNilai').text(sum);
...
...
resources/views/layouts/headpg.blade.php
View file @
ba6027dc
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"universitas-negeri-surabaya"
content=
"custom"
/>
<meta
name=
"universitas-negeri-surabaya"
content=
"custom"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"description"
content=
"Sistem Informasi Manajemen Program
Kreativitas Mahasisw
a"
>
<meta
name=
"description"
content=
"Sistem Informasi Manajemen Program
Mahasiswa Wirausah
a"
>
<meta
name=
"author"
content=
"PPTI Unesa Surabaya"
>
<meta
name=
"author"
content=
"PPTI Unesa Surabaya"
>
<meta
name=
"keywords"
content=
"sistem, informasi, pkm, program, kreativitas, mahasiswa, unesa"
>
<meta
name=
"keywords"
content=
"sistem, informasi, pkm, program, kreativitas, mahasiswa, unesa"
>
<meta
name=
"language"
content=
"id"
>
<meta
name=
"language"
content=
"id"
>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<meta
name=
"geo.position"
content=
"-7.300818;112.672689"
>
<meta
name=
"geo.position"
content=
"-7.300818;112.672689"
>
<meta
name=
"geo.placename"
content=
"Surabaya"
>
<meta
name=
"geo.placename"
content=
"Surabaya"
>
<meta
name=
"geo.region"
content=
"Indonesia"
>
<meta
name=
"geo.region"
content=
"Indonesia"
>
<title>
SIM PMW UNESA | Sistem Informasi Manajemen Program
Kreativitas Mahasisw
a
</title>
<title>
SIM PMW UNESA | Sistem Informasi Manajemen Program
Mahasiswa Wirausah
a
</title>
<!-- App favicon -->
<!-- App favicon -->
<link
rel=
"shortcut icon"
href=
"{{ asset('theme/images/favicon.ico') }}"
>
<link
rel=
"shortcut icon"
href=
"{{ asset('theme/images/favicon.ico') }}"
>
...
...
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