feat: create success alert

main-dlh
Regiaaaaaa 2025-11-28 08:42:30 +07:00
parent 3976d54f19
commit 0ecbbdeffc
1 changed files with 26 additions and 1 deletions

View File

@ -10,7 +10,7 @@
<div class="flex justify-between items-center mb-6"> <div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-semibold">Input Checklist Rumah</h2> <h2 class="text-2xl font-semibold">Input Checklist Rumah</h2>
<button class="btn btn-primary rounded-full text-white"> <button id="BtnSimpanInput" class="btn btn-primary rounded-full text-white">
<span class="icon me-1">save</span> <span class="icon me-1">save</span>
Simpan Simpan
</button> </button>
@ -178,6 +178,31 @@ $(document).ready(function () {
} }
}); });
$('#BtnSimpanInput').on('click', function (e) {
e.preventDefault();
Swal.fire({
title: 'Simpan Input Checklist Rumah?',
text: "Pastikan Input Sudah Benar.",
icon: 'question',
showCancelButton: true,
confirmButtonColor: '#22c55e',
cancelButtonColor: '#6b7280',
confirmButtonText: 'Simpan',
cancelButtonText: 'Batal'
}).then((result) => {
if (result.isConfirmed) {
Swal.fire({
title: 'Berhasil!',
text: 'Input Checklist Rumah Berhasil Disimpan.',
icon: 'success',
confirmButtonText: 'OK',
confirmButtonColor: '#22c55e'
});
}
});
});
$('#BtnSimpanKegiatan').on('click', function (e) { $('#BtnSimpanKegiatan').on('click', function (e) {
e.preventDefault(); e.preventDefault();