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
8bab8222
Commit
8bab8222
authored
a year ago
by
Novan Bagus Setiawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kasih alert waktu ubah jenis
parent
3a97d299
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
3 deletions
+46
-3
app/Http/Controllers/Operator/DaftarProposalController.php
+22
-0
resources/views/backend/operator/daftar_proposal/index.blade.php
+24
-3
No files found.
app/Http/Controllers/Operator/DaftarProposalController.php
View file @
8bab8222
...
@@ -562,6 +562,7 @@ class DaftarProposalController extends Controller
...
@@ -562,6 +562,7 @@ class DaftarProposalController extends Controller
public
function
change_jenis
(
Request
$request
)
public
function
change_jenis
(
Request
$request
)
{
{
try
{
$isi
=
Crypt
::
decrypt
(
$request
->
input
(
'data'
));
$isi
=
Crypt
::
decrypt
(
$request
->
input
(
'data'
));
$arrData
=
explode
(
'###'
,
$isi
);
$arrData
=
explode
(
'###'
,
$isi
);
...
@@ -569,6 +570,27 @@ class DaftarProposalController extends Controller
...
@@ -569,6 +570,27 @@ class DaftarProposalController extends Controller
$reqJenisId
=
$arrData
[
1
]
?:
''
;
$reqJenisId
=
$arrData
[
1
]
?:
''
;
$delete
=
Proposal
::
where
(
'proposal_id'
,
$reqProposalId
)
->
update
([
'jenis_id'
=>
$reqJenisId
]);
$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
)
public
function
cetak_daftar_proposal
(
Request
$request
)
...
...
This diff is collapsed.
Click to expand it.
resources/views/backend/operator/daftar_proposal/index.blade.php
View file @
8bab8222
...
@@ -233,6 +233,20 @@
...
@@ -233,6 +233,20 @@
$
(
'#example tbody'
)
.
on
(
'change'
,
'.jenis'
,
function
()
{
$
(
'#example tbody'
)
.
on
(
'change'
,
'.jenis'
,
function
()
{
var
isi
=
this
.
value
;
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
({
$
.
ajax
({
url
:
'{{url("/operator/seleksi-internal-proposal-jenis")}}'
,
url
:
'{{url("/operator/seleksi-internal-proposal-jenis")}}'
,
type
:
'POST'
,
type
:
'POST'
,
...
@@ -243,10 +257,17 @@
...
@@ -243,10 +257,17 @@
dataType
:
"JSON"
,
dataType
:
"JSON"
,
})
})
.
done
(
function
(
response
){
.
done
(
function
(
response
){
swal
.
fire
(
'sukses'
,
'Jenis PKM Berhasil diubah'
,
'success'
)
.
then
(
function
(){
swal
.
fire
(
'Updated!'
,
response
.
message
,
response
.
status
);
// oTable.ajax.reload();
})
// location.reload();
.
fail
(
function
(){
swal
.
fire
(
'Oops...'
,
'Something went wrong with ajax !'
,
'error'
);
});
});
}
else
{
swal
.
fire
(
'Batal!'
,
'Data batal diproses.'
,
'error'
);
}
})
})
});
});
...
...
This diff is collapsed.
Click to expand it.
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