bank-sampah/Views/Main/DataKelurahan/Index.cshtml

65 lines
2.1 KiB
Plaintext

@{
ViewData["Title"] = "Data Kelurahan";
}
<div class="flex flex-col gap-2 md:flex-row md:justify-between md:gap-0">
<div class="prose">
<span class="text-xl font-semibold text-gray-900 font-['Plus_Jakarta_Sans']">
Data Kelurahan
</span>
</div>
</div>
<div class="h-6"></div>
<div class="card bg-white shadow-sm">
<div class="card-body p-2">
<div class="w-full overflow-x-auto">
<table class="table-zebra table w-full" id="example">
<!-- head -->
<thead>
<tr>
<th class="w-[10%]">No</th>
<th class="w-[25%]">Nama Kelurahan</th>
<th class="w-[10%]">Jumlah Bank Sampah</th>
<th class="w-[10%]">Jumlah Nasabah</th>
<th class="w-[10%]">Jumlah Rumah Memilah</th>
<th class="w-[10%]">Jumlah RW</th>
<th class="w-[25%]">Nama Pendamping</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
@section Scripts {
<script type="text/javascript">
var table;
$(document).ready(function () {
table = new DataTable('#example', {
ajax: '/Main/DataKelurahan/Table',
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: 'nama_kelurahan' },
{ data: 'jumlah_bank_sampah' },
{ data: 'jumlah_nasabah' },
{ data: 'jumlah_rumah_memilah' },
{ data: 'jumlah_rw' },
{ data: 'nama_pendamping' },
]
});
});
</script>
}