96 lines
3.4 KiB
Plaintext
96 lines
3.4 KiB
Plaintext
@{
|
|
ViewData["Title"] = "Reduksi Sampah";
|
|
}
|
|
|
|
<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">
|
|
Reduksi Sampah
|
|
</span>
|
|
</div>
|
|
<div class="flex gap-2">
|
|
<button type="button" class="btn btn-sm bg-bank-sampah-primary-500 rounded-full text-white">Downloads</button>
|
|
<button class="btn btn-sm rounded-full bg-white" onclick="modal_filter.showModal()">
|
|
<i class="ph ph-funnel-simple"></i>
|
|
Filter
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal Filter -->
|
|
<dialog id="modal_filter" class="modal modal-bottom sm:modal-middle">
|
|
<div class="modal-box w-full sm:max-w-sm">
|
|
<h3 class="text-lg font-bold">Filter</h3>
|
|
<form id="formFilter" onsubmit="applyFilter(event)">
|
|
<fieldset class="fieldset">
|
|
<legend class="fieldset-legend">Periiode Bulan</legend>
|
|
<input type="date" id="periode_bulan" class="input w-full" />
|
|
</fieldset>
|
|
<fieldset class="fieldset">
|
|
<legend class="fieldset-legend">Kecamatan</legend>
|
|
<select id="filterKecamatan" class="select w-full">
|
|
<option value="">Pilih salah satu</option>
|
|
</select>
|
|
</fieldset>
|
|
|
|
<div class="modal-action">
|
|
<button type="button" class="btn btn-outline rounded-full" onclick="modal_filter.close()">Tutup</button>
|
|
<button type="submit" class="btn bg-bank-sampah-primary-500 rounded-full text-white">Terapkan</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</dialog>
|
|
<!-- /modal filter -->
|
|
|
|
<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-[8%]">No</th>
|
|
<th class="w-[15%]">Periode Bulan</th>
|
|
<th class="w-[20%]">Kecamatan</th>
|
|
<th class="w-[12%]">Maggot (Kg)</th>
|
|
<th class="w-[15%]">Composting (Kg)</th>
|
|
<th class="w-[15%]">Bank Sampah (Kg)</th>
|
|
<th class="w-[15%]">Total Reduksi (Kg)</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: '/Reduksi/ReduksiSampah/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: 'periode_bulan' },
|
|
{ data: 'kecamatan' },
|
|
{ data: 'maggot' },
|
|
{ data: 'composting' },
|
|
{ data: 'bank_sampah' },
|
|
{ data: 'total_reduksi' },
|
|
]
|
|
});
|
|
});
|
|
</script>
|
|
}
|