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
Oct 08, 2023
by
Novan Bagus Setiawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kasih alert waktu ubah jenis
parent
3a97d299
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
20 deletions
+63
-20
app/Http/Controllers/Operator/DaftarProposalController.php
+27
-5
resources/views/backend/operator/daftar_proposal/index.blade.php
+36
-15
No files found.
app/Http/Controllers/Operator/DaftarProposalController.php
View file @
8bab8222
...
@@ -562,13 +562,35 @@ class DaftarProposalController extends Controller
...
@@ -562,13 +562,35 @@ class DaftarProposalController extends Controller
public
function
change_jenis
(
Request
$request
)
public
function
change_jenis
(
Request
$request
)
{
{
$isi
=
Crypt
::
decrypt
(
$request
->
input
(
'data'
));
try
{
$arrData
=
explode
(
'###'
,
$isi
);
$isi
=
Crypt
::
decrypt
(
$request
->
input
(
'data'
));
$arrData
=
explode
(
'###'
,
$isi
);
$reqProposalId
=
$arrData
[
0
]
?:
''
;
$reqProposalId
=
$arrData
[
0
]
?:
''
;
$reqJenisId
=
$arrData
[
1
]
?:
''
;
$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."
;
}
$delete
=
Proposal
::
where
(
'proposal_id'
,
$reqProposalId
)
->
update
([
'jenis_id'
=>
$reqJenisId
]);
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
)
...
...
resources/views/backend/operator/daftar_proposal/index.blade.php
View file @
8bab8222
...
@@ -233,21 +233,42 @@
...
@@ -233,21 +233,42 @@
$
(
'#example tbody'
)
.
on
(
'change'
,
'.jenis'
,
function
()
{
$
(
'#example tbody'
)
.
on
(
'change'
,
'.jenis'
,
function
()
{
var
isi
=
this
.
value
;
var
isi
=
this
.
value
;
$
.
ajax
({
Swal
.
fire
({
url
:
'{{url("/operator/seleksi-internal-proposal-jenis")}}'
,
title
:
"Apakah Anda Yakin?"
,
type
:
'POST'
,
text
:
"Anda akan meruhan jenis PKM ini?!"
,
data
:
{
icon
:
"warning"
,
"_token"
:
"{{ csrf_token() }}"
,
showCancelButton
:
!
0
,
"data"
:
isi
,
confirmButtonText
:
"Ya, Ubah Jenis"
,
},
cancelButtonText
:
"Tidak, Kembali!"
,
dataType
:
"JSON"
,
confirmButtonClass
:
"btn btn-success mt-2"
,
})
cancelButtonClass
:
"btn btn-danger ms-2 mt-2"
,
.
done
(
function
(
response
){
buttonsStyling
:
!
1
,
swal
.
fire
(
'sukses'
,
'Jenis PKM Berhasil diubah'
,
'success'
)
.
then
(
function
(){
allowOutsideClick
:
!
1
,
// oTable.ajax.reload();
showLoaderOnConfirm
:
true
// location.reload();
})
.
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
)
function
confirmFinal
(
reqId
,
reqStatus
)
...
...
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