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
2238c7a4
Commit
2238c7a4
authored
Oct 08, 2023
by
Farendi Giotivano R.P
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.unesa.ac.id/farendi/simpkm
parents
6177b7d8
8bab8222
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
1 deletions
+95
-1
app/Http/Controllers/Operator/DaftarProposalController.php
+54
-1
resources/views/backend/operator/daftar_proposal/index.blade.php
+40
-0
routes/web.php
+1
-0
No files found.
app/Http/Controllers/Operator/DaftarProposalController.php
View file @
2238c7a4
...
...
@@ -13,6 +13,7 @@ use App\Models\Jenis;
use
GuzzleHttp\Client
;
use
App\Models\Periode
;
use
App\Models\Proposal
;
use
App\Models\Reviewer
;
use
Illuminate\Http\Request
;
use
App\Models\DaftarProposal
;
...
...
@@ -172,6 +173,25 @@ class DaftarProposalController extends Controller
</select>
</td>'
;
$jenis
=
Jenis
::
where
(
"status_hapus"
,
'0'
)
->
get
();
$opt
=
''
;
foreach
(
$jenis
as
$key
=>
$value
)
{
$selected
=
""
;
if
(
$value
->
jenis_id
==
$jenis_id
)
$selected
=
'selected'
;
$opt
.=
'<option value="'
.
Crypt
::
encrypt
(
$proposal_id
.
'###'
.
$value
->
jenis_id
)
.
'" '
.
$selected
.
'>'
.
$value
->
nama
.
'</option>'
;
}
$pil_jenis_pkm
=
'<td class="table-action">
<select class="form-control select2 jenis">
'
.
$opt
.
'
</select>
</td>'
;
if
(
$status_final
==
'1'
)
{
$aksi
=
'<span class="badge bg-success">Lolos</span>'
;
...
...
@@ -191,7 +211,7 @@ class DaftarProposalController extends Controller
$data_arr
[]
=
array
(
"proposal_id"
=>
$proposal_id
,
"kode"
=>
$kode
,
"jenis_pkm"
=>
$jenis_pkm
,
"jenis_pkm"
=>
$
pil_
jenis_pkm
,
"judul"
=>
$judul
,
"dospem"
=>
$dospem
,
"reviewer_1"
=>
$pilihan_1
,
...
...
@@ -540,6 +560,39 @@ class DaftarProposalController extends Controller
}
}
public
function
change_jenis
(
Request
$request
)
{
try
{
$isi
=
Crypt
::
decrypt
(
$request
->
input
(
'data'
));
$arrData
=
explode
(
'###'
,
$isi
);
$reqProposalId
=
$arrData
[
0
]
?:
''
;
$reqJenisId
=
$arrData
[
1
]
?:
''
;
$delete
=
Proposal
::
where
(
'proposal_id'
,
$reqProposalId
)
->
update
([
'jenis_id'
=>
$reqJenisId
]);
if
(
$delete
)
{
$status
=
'success'
;
$message
=
"Berhasil ubah Jenis PKM."
;
}
else
{
$status
=
'error'
;
$message
=
"Data gagal diproses."
;
}
return
response
()
->
json
([
'status'
=>
$status
,
'message'
=>
$message
,
]);
}
catch
(
\Exception
$id
)
{
return
response
()
->
json
([
'status'
=>
'error'
,
'message'
=>
"Data gagal diproses."
,
]);
}
}
public
function
cetak_daftar_proposal
(
Request
$request
)
{
ini_set
(
'max_execution_time'
,
0
);
...
...
resources/views/backend/operator/daftar_proposal/index.blade.php
View file @
2238c7a4
...
...
@@ -231,6 +231,46 @@
});
});
$
(
'#example tbody'
)
.
on
(
'change'
,
'.jenis'
,
function
()
{
var
isi
=
this
.
value
;
Swal
.
fire
({
title
:
"Apakah Anda Yakin?"
,
text
:
"Anda akan meruhan jenis PKM ini?!"
,
icon
:
"warning"
,
showCancelButton
:
!
0
,
confirmButtonText
:
"Ya, Ubah Jenis"
,
cancelButtonText
:
"Tidak, Kembali!"
,
confirmButtonClass
:
"btn btn-success mt-2"
,
cancelButtonClass
:
"btn btn-danger ms-2 mt-2"
,
buttonsStyling
:
!
1
,
allowOutsideClick
:
!
1
,
showLoaderOnConfirm
:
true
})
.
then
((
result
)
=>
{
if
(
result
.
value
){
$
.
ajax
({
url
:
'{{url("/operator/seleksi-internal-proposal-jenis")}}'
,
type
:
'POST'
,
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
"data"
:
isi
,
},
dataType
:
"JSON"
,
})
.
done
(
function
(
response
){
swal
.
fire
(
'Updated!'
,
response
.
message
,
response
.
status
);
})
.
fail
(
function
(){
swal
.
fire
(
'Oops...'
,
'Something went wrong with ajax !'
,
'error'
);
});
}
else
{
swal
.
fire
(
'Batal!'
,
'Data batal diproses.'
,
'error'
);
}
})
});
function
confirmFinal
(
reqId
,
reqStatus
)
{
if
(
reqStatus
==
'1'
)
...
...
routes/web.php
View file @
2238c7a4
...
...
@@ -173,6 +173,7 @@ Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
// SELEKSI INTERNAL
Route
::
resource
(
'seleksi_internal_reviewer'
,
ReviewerController
::
class
);
Route
::
resource
(
'seleksi-internal-proposal'
,
DaftarProposalController
::
class
);
Route
::
post
(
'seleksi-internal-proposal-jenis'
,
[
DaftarProposalController
::
class
,
'change_jenis'
])
->
name
(
'seleksi-internal-proposal-jenis'
);
Route
::
get
(
'/seleksi-internal-reviewer-approval/{id}/{status}'
,
[
DaftarProposalController
::
class
,
'approval'
])
->
name
(
'seleksi-internal.approval'
);
Route
::
get
(
'getDaftarProposal'
,
[
DaftarProposalController
::
class
,
'getData'
])
->
name
(
'getDaftarProposal'
);
Route
::
get
(
'cetak-daftar-proposal'
,
[
DaftarProposalController
::
class
,
'cetak_daftar_proposal'
])
->
name
(
'cetak-daftar-proposal'
);
...
...
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