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
9599d4fb
Commit
9599d4fb
authored
Feb 17, 2024
by
Novan Bagus Setiawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan data seleksi proposal internal, jika tolak dan setujui tidak perlu refresh
parent
752dd786
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
8 deletions
+45
-8
app/Http/Controllers/Reviewer/DaftarSeleksiController.php
+9
-4
resources/views/backend/reviewer/seleksi/index.blade.php
+36
-4
No files found.
app/Http/Controllers/Reviewer/DaftarSeleksiController.php
View file @
9599d4fb
...
@@ -52,6 +52,9 @@ class DaftarSeleksiController extends Controller
...
@@ -52,6 +52,9 @@ class DaftarSeleksiController extends Controller
$status
=
$request
->
get
(
'status'
);
$status
=
$request
->
get
(
'status'
);
$tahun
=
$request
->
get
(
'tahun'
);
$tahun
=
$request
->
get
(
'tahun'
);
if
(
$tahun
==
'0'
)
$tahun
=
date
(
'Y'
);
## Read value
## Read value
$draw
=
$request
->
get
(
'draw'
);
$draw
=
$request
->
get
(
'draw'
);
$start
=
$request
->
get
(
"start"
);
$start
=
$request
->
get
(
"start"
);
...
@@ -104,7 +107,7 @@ class DaftarSeleksiController extends Controller
...
@@ -104,7 +107,7 @@ class DaftarSeleksiController extends Controller
->
get
();
->
get
();
$data_arr
=
array
();
$data_arr
=
array
();
$hitung
=
1
;
foreach
(
$records
as
$record
){
foreach
(
$records
as
$record
){
$proposal_id
=
$record
->
proposal_id
;
$proposal_id
=
$record
->
proposal_id
;
$jenis_id
=
$record
->
jenis_id
;
$jenis_id
=
$record
->
jenis_id
;
...
@@ -138,8 +141,8 @@ class DaftarSeleksiController extends Controller
...
@@ -138,8 +141,8 @@ class DaftarSeleksiController extends Controller
$administrasi
=
'<span class="badge bg-danger">Tidak Lolos</span>'
;
$administrasi
=
'<span class="badge bg-danger">Tidak Lolos</span>'
;
else
else
{
{
$lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '1')"
;
$lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '1'
, '"
.
$hitung
.
"'
)"
;
$tidak_lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '2')"
;
$tidak_lolos
=
"confirmFinal('"
.
Crypt
::
encrypt
(
$proposal_id
)
.
"', '2'
, '"
.
$hitung
.
"'
)"
;
$administrasi
=
'<td class="table-action">
$administrasi
=
'<td class="table-action">
<a href="#!" class="btn btn-icon-sm btn-success btn-sm" onclick="'
.
$lolos
.
'">Lolos ?</a>
<a href="#!" class="btn btn-icon-sm btn-success btn-sm" onclick="'
.
$lolos
.
'">Lolos ?</a>
<a href="#!" class="btn btn-icon-sm btn-danger btn-sm" onclick="'
.
$tidak_lolos
.
'">Tidak ?</a>
<a href="#!" class="btn btn-icon-sm btn-danger btn-sm" onclick="'
.
$tidak_lolos
.
'">Tidak ?</a>
...
@@ -159,7 +162,7 @@ class DaftarSeleksiController extends Controller
...
@@ -159,7 +162,7 @@ class DaftarSeleksiController extends Controller
else
else
{
{
if
(
$status_administrasi
==
'2'
)
if
(
$status_administrasi
==
'2'
)
$aksi
=
'<h4>0</h
5
>'
;
$aksi
=
'<h4>0</h
4
>'
;
else
else
$aksi
=
'<a href="'
.
$nilai
.
'" class="btn btn-icon-sm btn-warning btn-sm">Beri nilai<i class="fas fa-arrow-alt-circle-right"></i></a>'
;
$aksi
=
'<a href="'
.
$nilai
.
'" class="btn btn-icon-sm btn-warning btn-sm">Beri nilai<i class="fas fa-arrow-alt-circle-right"></i></a>'
;
}
}
...
@@ -168,6 +171,7 @@ class DaftarSeleksiController extends Controller
...
@@ -168,6 +171,7 @@ class DaftarSeleksiController extends Controller
$aksi
=
'<span class="badge bg-info">Administrasi belum dipilih</span>'
;
$aksi
=
'<span class="badge bg-info">Administrasi belum dipilih</span>'
;
$data_arr
[]
=
array
(
$data_arr
[]
=
array
(
"DT_RowId"
=>
'row_'
.
$hitung
,
"proposal_id"
=>
$proposal_id
,
"proposal_id"
=>
$proposal_id
,
"kode"
=>
$kode
,
"kode"
=>
$kode
,
"jenis_pkm"
=>
$jenis_pkm
,
"jenis_pkm"
=>
$jenis_pkm
,
...
@@ -177,6 +181,7 @@ class DaftarSeleksiController extends Controller
...
@@ -177,6 +181,7 @@ class DaftarSeleksiController extends Controller
"administrasi"
=>
$administrasi
,
"administrasi"
=>
$administrasi
,
"aksi"
=>
$aksi
"aksi"
=>
$aksi
);
);
$hitung
++
;
}
}
$response
=
array
(
$response
=
array
(
...
...
resources/views/backend/reviewer/seleksi/index.blade.php
View file @
9599d4fb
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<select class="
form
-
select
select2
" name="
reqTahun
" id="
reqTahun
">
<select class="
form
-
select
select2
" name="
reqTahun
" id="
reqTahun
">
<option value="
0
">Semua</option>
<option value="
0
">Semua</option>
@foreach (
$periode
as
$res
)
@foreach (
$periode
as
$res
)
<option value="
{{
$res
->
nama
}}
">{{
$res->nama
}}</option>
<option value="
{{
$res
->
nama
}}
"
@php if(
$res->nama
== date('Y')) echo 'selected'; @endphp
>{{
$res->nama
}}</option>
@endforeach
@endforeach
</select>
</select>
</div>
</div>
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
"visible"
:
false
,
"visible"
:
false
,
"searchable"
:
false
"searchable"
:
false
}
}
]
]
,
});
});
$
(
'#reqAdministrasi, #reqStatus, #reqTahun'
)
.
change
(
function
(){
$
(
'#reqAdministrasi, #reqStatus, #reqTahun'
)
.
change
(
function
(){
...
@@ -137,7 +137,13 @@
...
@@ -137,7 +137,13 @@
});
});
});
});
function
confirmFinal
(
reqId
,
reqStatus
)
// $('#example tbody').on('click', '.cek', function () {
// // var id = $(this).attr("id").match(/\d+/)[0];
// // var data = $('#example').DataTable().row( id ).data();
// // console.log(data[0]);
// });
function
confirmFinal
(
reqId
,
reqStatus
,
rowId
)
{
{
if
(
reqStatus
==
'1'
)
if
(
reqStatus
==
'1'
)
{
{
...
@@ -174,7 +180,33 @@
...
@@ -174,7 +180,33 @@
})
})
.
done
(
function
(
response
){
.
done
(
function
(
response
){
swal
.
fire
(
'Updated!'
,
response
.
message
,
response
.
status
)
.
then
(
function
(){
swal
.
fire
(
'Updated!'
,
response
.
message
,
response
.
status
)
.
then
(
function
(){
location
.
reload
();
// $("#row_"+rowId+" td:nth-last-child(2)").find('.upload').remove();
// $("#tr-" + reqUrut +" td:nth-child(3)").empty();
if
(
reqStatus
==
'1'
)
{
$
(
"#row_"
+
rowId
+
" td:nth-last-child(2)"
)
.
empty
()
var
s
=
$
(
'<span class="badge bg-success">Lolos</span>'
);
$
(
"#row_"
+
rowId
+
" td:nth-last-child(2)"
)
.
append
(
s
);
$
(
"#row_"
+
rowId
+
" td:last-child"
)
.
empty
();
var
t
=
$
(
'<a href="{{ URL::to("reviewer/seleksi-internal/") }}/'
+
reqId
+
'/edit" class="btn btn-icon-sm btn-warning btn-sm">Beri nilai<i class="fas fa-arrow-alt-circle-right"></i></a>'
);
$
(
"#row_"
+
rowId
+
" td:last-child"
)
.
append
(
t
);
}
else
{
$
(
"#row_"
+
rowId
+
" td:nth-last-child(4)"
)
.
empty
()
var
r
=
$
(
'<span class="badge bg-success">Sudah dinilai</span>'
);
$
(
"#row_"
+
rowId
+
" td:nth-last-child(4)"
)
.
append
(
r
);
$
(
"#row_"
+
rowId
+
" td:nth-last-child(2)"
)
.
empty
()
var
s
=
$
(
'<span class="badge bg-danger">Tidak Lolos</span>'
);
$
(
"#row_"
+
rowId
+
" td:nth-last-child(2)"
)
.
append
(
s
);
$
(
"#row_"
+
rowId
+
" td:last-child"
)
.
empty
();
var
t
=
$
(
'<h4>0</h4>'
);
$
(
"#row_"
+
rowId
+
" td:last-child"
)
.
append
(
t
);
}
// location.reload();
});
});
})
})
.
fail
(
function
(){
.
fail
(
function
(){
...
...
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