Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simlitabmas
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
simlitabmas
Commits
288c30f2
Commit
288c30f2
authored
3 years ago
by
Muhammad Iskandar Java
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hapus kekayaan
parent
87c50032
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
resources/views/user/kekayaan/index.blade.php
+22
-1
No files found.
resources/views/user/kekayaan/index.blade.php
View file @
288c30f2
...
...
@@ -42,7 +42,7 @@
</td>
<td>
<a class="
btn
btn
-
warning
" href="
{{
route
(
'kekayaanintelek.edit'
,
[
'kekayaanintelek'
=>
encrypt
(
$item
->
id
)])
}}
">Hapus</a>
<button class="
btn
btn
-
danger
" type="
button
" onclick="
hapus
(
'form_kekayaan_{{ $loop->iteration }}'
)
">Hapus</button>
<button class="
btn
btn
-
danger
delete
" type="
button
" data-target="
form_kekayaan_
{{
$loop
->
iteration
}}
">Hapus</button>
<form id="
form_kekayaan_
{{
$loop
->
iteration
}}
" action="
{{
route
(
'kekayaanintelek.destroy'
,
[
'kekayaanintelek'
=>
encrypt
(
$item
->
id
)])
}}
" method="
POST
">
{{ method_field('DELETE') }}
@csrf
...
...
@@ -78,6 +78,27 @@
function hapus(id){
$('#'+id).submit();
}
$("
body
").on("
click
", "
.
delete
", function (e) {
e.preventDefault();
var id = $(this).data('target');
Swal.fire({
title: "
Apakah
Anda
Yakin
?
",
text: "
Anda
akan
menghapus
data
ini
!
",
icon: "
warning
",
showCancelButton: true,
confirmButtonColor: "
#DD6B55",
confirmButtonText
:
"Yes"
,
cancelButtonText
:
"No"
})
.
then
((
result
)
=>
{
if
(
result
.
value
)
{
Swal
.
close
();
$
(
"#"
+
id
)
.
submit
();
}
else
if
(
result
.
dismiss
===
Swal
.
DismissReason
.
cancel
)
{
Swal
.
fire
(
'Dibatalkan'
,
'Data batal dihapus'
,
'error'
);
}
});
});
</
script
>
@
endsection
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