bps-rw/Views/VolumeTimbulanSampah/_TabIndexWilayah.cshtml

58 lines
1.9 KiB
Plaintext

<!-- TABLE -->
<div class="overflow-x-auto">
<table class="table-zebra table w-full text-sm" id="tableWilayah">
<thead>
<tr>
<th class="w-[5%]">No</th>
<th class="w-[30%]">Wilayah</th>
<th class="w-[15%]">Mudah Terurai</th>
<th class="w-[15%]">Daur Ulang</th>
<th class="w-[15%]">B3</th>
<th class="w-[15%]">Residu</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<script src="/lib/jquery/jquery-3.7.1.js"></script>
<script src="/lib/datatables/dataTables.js"></script>
<script src="/plugins/datatables/dataTables.tailwindcss.js"></script>
<script type="text/javascript">
$(document).ready(function () {
new DataTable('#tableWilayah', {
ajax: '@Url.Action("TableWilayah", "VolumeTimbulanSampah")',
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: 'wilayah' },
{
data: 'mudahTerurai',
render: data => data.toLocaleString("id-ID")
},
{
data: 'daurUlang',
render: data => data.toLocaleString("id-ID")
},
{
data: 'b3',
render: data => data.toLocaleString("id-ID")
},
{
data: 'residu',
render: data => data.toLocaleString("id-ID")
}
]
});
});
</script>