bank-sampah/Views/Wilayah/Kota/Index.cshtml

59 lines
1.8 KiB
Plaintext

@{
ViewData["Title"] = "Wilayah Kota";
}
<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-black">
Wilayah Kota
</span>
</div>
</div>
<div class="h-6"></div>
<div class="card bg-white">
<div class="card-body p-2">
<div class="w-full overflow-x-auto">
<table class="table-zebra table" id="example">
<!-- head -->
<thead>
<tr>
<th class="w-[5%]">No</th>
<th class="w-[10%]">Kode</th>
<th class="w-[30%]">Nama Kota/Kabupaten</th>
<th class="w-[25%]">Provinsi</th>
<th class="w-[15%]">Latitude</th>
<th class="w-[15%]">Longitude</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: '/Wilayah/Kota/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: 'kode' },
{ data: 'kabupaten' },
{ data: 'provinsi' },
{ data: 'latitude' },
{ data: 'longitude' },
]
});
});
</script>
}