92 lines
3.0 KiB
Plaintext
92 lines
3.0 KiB
Plaintext
@{
|
|
ViewData["Title"] = "Rumah Memilah";
|
|
}
|
|
|
|
<div class="breadcrumbs text-sm">
|
|
<ul>
|
|
<li class="text-gray-500"><a>Data Sudin</a></li>
|
|
<li>Rumah Memilah</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- Header -->
|
|
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
|
<div class="prose">
|
|
<h3 class="mb-2">Rumah Memilah</h3>
|
|
</div>
|
|
<div class="justify-self-end lg:self-center">
|
|
<a class="btn rounded-full bg-white" href="#">
|
|
<span class="icon icon-fill me-2">filter_list</span>
|
|
Filter
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="h-8"></div>
|
|
|
|
<div class="card bg-white shadow-sm">
|
|
<div class="card-body p-0">
|
|
<table class="table-zebra table" id="example">
|
|
<thead>
|
|
<tr>
|
|
<th class="w-[5%]">No</th>
|
|
<th class="w-[45%]">Kecamatan</th>
|
|
<th class="w-[10%]">Jumlah RW</th>
|
|
<th class="w-[10%]">Total Rumah</th>
|
|
<th class="w-[10%]">Rumah Aktif Memilah</th>
|
|
<th class="w-[10%]">Rumah Nasabah</th>
|
|
<th class="w-[10%]">Bank Sampah</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
<script src="https://cdn.datatables.net/2.3.4/js/dataTables.js"></script>
|
|
<script src="/plugins/datatables/dataTables.tailwindcss.js"></script>
|
|
<script type="text/javascript">
|
|
var table;
|
|
|
|
$(document).ready(function () {
|
|
table = new DataTable('#example', {
|
|
ajax: '@Url.Action("Table", "RumahMemilah")',
|
|
scrollX: true,
|
|
autoWidth: false,
|
|
initComplete: function () {
|
|
$('div.dt-scroll-body thead').css('visibility', 'collapse');
|
|
},
|
|
columns: [
|
|
{ data: null, render: (d, t, r, m) => m.row + 1, orderable: false, searchable: false },
|
|
{ data: 'kecamatan' },
|
|
{ data: 'jumlah_rw' },
|
|
{ data: 'total_rumah' },
|
|
{ data: 'rumah_aktif_memilah' },
|
|
{ data: 'rumah_nasabah' },
|
|
{ data: 'bank_sampah' },
|
|
]
|
|
});
|
|
|
|
table.on("click", ".delete", function (e) {
|
|
e.preventDefault();
|
|
|
|
let url = $(this).data("url");
|
|
swal.fire({
|
|
title: "Apakah anda yakin?",
|
|
text: "Data yang dihapus tidak dapat dikembalikan lagi",
|
|
icon: "question",
|
|
showCancelButton: true,
|
|
confirmButtonText: "Ya, Hapus",
|
|
cancelButtonText: "Batal",
|
|
buttonsStyling: false,
|
|
customClass: {
|
|
confirmButton: "btn btn-error text-white",
|
|
cancelButton: "btn btn-link no-underline text-gray-500",
|
|
},
|
|
});
|
|
});
|
|
});
|
|
</script>
|