fix: Adjustments to the checkbox box, checkbox position, and success alert

main-dlh
Regiaaaaaa 2025-12-02 09:07:29 +07:00 committed by Yuri Dimas
parent fb814270e9
commit 7def029774
No known key found for this signature in database
GPG Key ID: 9FD7E44BC294C68C
1 changed files with 51 additions and 9 deletions

View File

@ -22,7 +22,7 @@
<span class="icon">arrow_back</span> <span class="icon">arrow_back</span>
Kembali Kembali
</a> </a>
<button type="button" class="btn btn-primary rounded-full text-white border-0"> <button id="BtnVerifikasi" class="btn btn-primary rounded-full text-white border-0">
<span class="icon icon-fill me-2">check_circle</span> <span class="icon icon-fill me-2">check_circle</span>
Verifikasi Verifikasi
</button> </button>
@ -66,10 +66,10 @@
<th class="w-[5%]">No</th> <th class="w-[5%]">No</th>
<th class="w-[35%]">Alamat Rumah</th> <th class="w-[35%]">Alamat Rumah</th>
<th class="w-[8%]">RW</th> <th class="w-[8%]">RW</th>
<th class="w-[10%]">Mudah Terurai</th> <th class="w-[10%] text-center">Mudah Terurai</th>
<th class="w-[10%]">Material Daur</th> <th class="w-[10%] text-center">Material Daur</th>
<th class="w-[8%]">B3</th> <th class="w-[8%] text-center">B3</th>
<th class="w-[10%]">Residu</th> <th class="w-[10%] text-center">Residu</th>
<th class="w-[14%]">Photo</th> <th class="w-[14%]">Photo</th>
</tr> </tr>
</thead> </thead>
@ -99,6 +99,7 @@
<script src="https://code.jquery.com/jquery-3.7.1.js"></script> <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://cdn.datatables.net/2.3.4/js/dataTables.js"></script> <script src="https://cdn.datatables.net/2.3.4/js/dataTables.js"></script>
<script src="/plugins/datatables/dataTables.tailwindcss.js"></script> <script src="/plugins/datatables/dataTables.tailwindcss.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
@ -115,19 +116,31 @@
{ data: 'rw' }, { data: 'rw' },
{ {
data: 'mudah_terurai', data: 'mudah_terurai',
render: (value) => value ? '<input type="checkbox" checked="checked" class="checkbox checkbox-success checked:text-white" disabled />' : '<input type="checkbox" class="checkbox" disabled />' className: '!align-middle !text-center',
render: (value) => value
? '<input type="checkbox" checked class="checkbox checkbox-success text-white" disabled />'
: '<input type="checkbox" class="checkbox" disabled />'
}, },
{ {
data: 'material_daur', data: 'material_daur',
render: (value) => value ? '<input type="checkbox" checked="checked" class="checkbox checkbox-success checked:text-white" disabled />' : '<input type="checkbox" class="checkbox" disabled />' className: '!align-middle !text-center',
render: (value) => value
? '<input type="checkbox" checked class="checkbox checkbox-success text-white" disabled />'
: '<input type="checkbox" class="checkbox" disabled />'
}, },
{ {
data: 'b3', data: 'b3',
render: (value) => value ? '<input type="checkbox" checked="checked" class="checkbox checkbox-success checked:text-white" disabled />' : '<input type="checkbox" class="checkbox" disabled />' className: '!align-middle !text-center',
render: (value) => value
? '<input type="checkbox" checked class="checkbox checkbox-success" disabled />'
: '<input type="checkbox" class="checkbox" disabled />'
}, },
{ {
data: 'residu', data: 'residu',
render: (value) => value ? '<input type="checkbox" checked="checked" class="checkbox checkbox-success checked:text-white" disabled />' : '<input type="checkbox" class="checkbox" disabled />' className: '!align-middle !text-center',
render: (value) => value
? '<input type="checkbox" checked class="checkbox checkbox-success text-white" disabled />'
: '<input type="checkbox" class="checkbox" disabled />'
}, },
{ data: 'photo' } { data: 'photo' }
] ]
@ -136,5 +149,34 @@
$(document).on('click', '.btn-lihat-gambar', function() { $(document).on('click', '.btn-lihat-gambar', function() {
modal_image.showModal(); modal_image.showModal();
}); });
$('#BtnVerifikasi').on('click', function (e) {
e.preventDefault();
Swal.fire({
title: 'Verifikasi Checklist Harian?',
text: "Pastikan semua data pada checklist ini sudah benar.",
icon: 'question',
showCancelButton: true,
confirmButtonColor: '#22c55e',
cancelButtonColor: '#6b7280',
confirmButtonText: 'Verifikasi',
cancelButtonText: 'Batal'
}).then((result) => {
if (result.isConfirmed) {
Swal.fire({
title: 'Berhasil Diverifikasi!',
text: 'Checklist Harian berhasil diverifikasi.',
icon: 'success',
confirmButtonText: 'OK',
confirmButtonColor: '#22c55e'
}).then(() => {
window.location.href = '/DataVerifikasiChecklistHarian/Index';
});
}
});
});
}); });
</script> </script>