165 lines
6.1 KiB
Plaintext
165 lines
6.1 KiB
Plaintext
@{
|
|
ViewData["Title"] = "Rincian Target Rumah Memilah";
|
|
}
|
|
|
|
<div class="breadcrumbs text-sm">
|
|
<ul>
|
|
<li class="text-gray-500"><a>Laporan</a></li>
|
|
<li>Rincian Target 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">Rincian Target Rumah Memilah</h3>
|
|
</div>
|
|
<div class="justify-self-end lg:self-center">
|
|
<a class="btn btn-primary text-white rounded-full" href="#">
|
|
<span class="icon icon-fill me-2">download</span>
|
|
Download
|
|
</a>
|
|
<button class="btn bg-white rounded-full" type="button" onclick="modal_filter_target.showModal()">
|
|
<span class="icon icon-fill me-2">filter_list</span>
|
|
Filter
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Filter Modal -->
|
|
<dialog id="modal_filter_target" class="modal modal-bottom sm:modal-middle">
|
|
<div class="modal-box w-full sm:max-w-sm">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<h3 class="text-lg font-bold">Filter</h3>
|
|
<button type="button" class="btn btn-sm btn-circle btn-ghost" onclick="modal_filter_target.close()">✕</button>
|
|
</div>
|
|
|
|
<form id="filterForm">
|
|
|
|
<!-- Tahun -->
|
|
<fieldset class="fieldset max-w-sm">
|
|
<legend class="fieldset-legend">Tahun</legend>
|
|
<select id="filterTahun" class="select w-full">
|
|
<option selected disabled>Pilih Tahun</option>
|
|
<option>2025</option>
|
|
<option>2024</option>
|
|
<option>2023</option>
|
|
</select>
|
|
</fieldset>
|
|
|
|
<!-- Bulan -->
|
|
<fieldset class="fieldset mt-4">
|
|
<legend class="fieldset-legend">Bulan</legend>
|
|
<select id="filterBulan" class="select w-full">
|
|
<option selected disabled>Pilih Bulan</option>
|
|
<option value="01">Januari</option>
|
|
<option value="02">Februari</option>
|
|
<option value="03">Maret</option>
|
|
<option value="04">April</option>
|
|
<option value="05">Mei</option>
|
|
<option value="06">Juni</option>
|
|
<option value="07">Juli</option>
|
|
<option value="08">Agustus</option>
|
|
<option value="09">September</option>
|
|
<option value="10">Oktober</option>
|
|
<option value="11">November</option>
|
|
<option value="12">Desember</option>
|
|
</select>
|
|
</fieldset>
|
|
|
|
<div class="modal-action">
|
|
<button type="button" class="btn" id="clearFilter">Bersihkan</button>
|
|
<button type="submit" class="btn btn-neutral">Terapkan Filter</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</dialog>
|
|
|
|
|
|
<div class="h-8"></div>
|
|
|
|
<div class="card bg-white shadow-sm">
|
|
<div class="card-body p-0">
|
|
<table class="table-zebra table" id="target-table">
|
|
<thead>
|
|
<tr>
|
|
<th class="w-[5%]">No</th>
|
|
<th class="w-[35%]">Wilayah</th>
|
|
<th class="w-[20%]">Jumlah PJLP Pendamping BPS RW</th>
|
|
<th class="w-[20%]">Target Rumah Memilah per Bulan</th>
|
|
<th class="w-[20%]">Target Rumah Memilah 8 Bulan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<link rel="stylesheet" href="/lib/datatables/rowGroup.dataTables.min.css" />
|
|
<script src="/lib/jquery/jquery-3.7.1.js"></script>
|
|
<script src="/lib/datatables/dataTables.js"></script>
|
|
<script src="/lib/datatables/dataTables.rowGroup.min.js"></script>
|
|
<script src="/plugins/datatables/dataTables.tailwindcss.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
function formatNumber(value) {
|
|
const number = Number(value ?? 0);
|
|
return number.toLocaleString('id-ID');
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
new DataTable('#target-table', {
|
|
ajax: '@Url.Action("Table", "RincianTargetRumahMemilah")',
|
|
scrollX: true,
|
|
autoWidth: false,
|
|
rowGroup: {
|
|
dataSrc: 'wilayah',
|
|
startRender: function (rows, group) {
|
|
const firstRow = rows.data()[0];
|
|
const row = $('<tr/>').addClass('bg-gray-50 font-semibold text-gray-800');
|
|
|
|
row.append(`<td class="align-middle">${firstRow.no}</td>`);
|
|
row.append(`<td class="align-middle">${group}</td>`);
|
|
row.append(`<td class="align-middle">${formatNumber(firstRow.total_jumlah_pjlp)}</td>`);
|
|
row.append(`<td class="align-middle">${formatNumber(firstRow.total_target_bulan)}</td>`);
|
|
row.append(`<td class="align-middle">${formatNumber(firstRow.total_target_8_bulan)}</td>`);
|
|
|
|
return row;
|
|
}
|
|
},
|
|
columns: [
|
|
{
|
|
data: 'row_number',
|
|
orderable: false,
|
|
searchable: false,
|
|
render: function (data) {
|
|
return data || '';
|
|
}
|
|
},
|
|
{ data: 'kelurahan', defaultContent: '-' },
|
|
{
|
|
data: 'jumlah_pjlp',
|
|
render: function (data) {
|
|
return formatNumber(data);
|
|
}
|
|
},
|
|
{
|
|
data: 'target_bulan',
|
|
render: function (data) {
|
|
return formatNumber(data);
|
|
}
|
|
},
|
|
{
|
|
data: 'target_8_bulan',
|
|
render: function (data) {
|
|
return formatNumber(data);
|
|
}
|
|
}
|
|
],
|
|
order: [[0, 'asc']],
|
|
columnDefs: [
|
|
{ targets: '_all', className: 'align-middle' }
|
|
]
|
|
});
|
|
});
|
|
</script> |