bps-rw/Views/DataKecamatanRumahMemilah/Index.cshtml

72 lines
2.2 KiB
Plaintext

@{
ViewData["Title"] = "Rumah Memilah";
}
<div class="breadcrumbs text-sm">
<ul>
<li class="text-gray-500"><a>Data Kecamatan</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.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", "DataKecamatanRumahMemilah")',
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' },
]
});
});
</script>