207 lines
8.2 KiB
Plaintext
207 lines
8.2 KiB
Plaintext
@{
|
|
ViewData["Title"] = "Checklist Harian";
|
|
}
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/tom-select@2.2.2/dist/css/tom-select.css" rel="stylesheet">
|
|
|
|
<div class="breadcrumbs text-sm">
|
|
<ul>
|
|
<li class="text-gray-500"><a>Checklist Harian</a></li>
|
|
<li id="breadcrumb-active">Semua</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2 mt-4">
|
|
<div class="prose">
|
|
<h3 class="mb-2">Data Checklist Rumah</h3>
|
|
</div>
|
|
<div class="justify-self-end lg:self-center">
|
|
<button class="btn rounded-full bg-white" onclick="modal_filter_checklist.showModal()">
|
|
<span class="icon icon-fill me-2">filter_list</span>
|
|
Filter
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="h-8"></div>
|
|
|
|
<!-- Tabs -->
|
|
<div class="tabs tabs-lift">
|
|
|
|
<input type="radio" name="tab_checklist_harian" checked class="tab checked:text-white [--tab-bg:green]" aria-label="Semua" />
|
|
<div class="tab-content bg-base-100 border-base-300 p-0">
|
|
@await Html.PartialAsync("_TabIndexSemua")
|
|
</div>
|
|
|
|
<input type="radio" name="tab_checklist_harian" class="tab checked:text-white [--tab-bg:green]" aria-label="Verifikasi" />
|
|
<div class="tab-content bg-base-100 border-base-300 p-0">
|
|
@await Html.PartialAsync("_TabIndexSudahVerifikasi")
|
|
</div>
|
|
|
|
<input type="radio" name="tab_checklist_harian" class="tab checked:text-white [--tab-bg:green]" aria-label="Belum Terverifikasi" />
|
|
<div class="tab-content bg-base-100 border-base-300 p-0">
|
|
@await Html.PartialAsync("_TabIndexBelumVerifikasi")
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Filter Modal -->
|
|
<dialog id="modal_filter_checklist" 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_checklist.close()">✕</button>
|
|
</div>
|
|
<form action="#" method="get">
|
|
<fieldset class="fieldset max-w-sm">
|
|
<legend class="fieldset-legend">Tahun</legend>
|
|
<select class="select w-full">
|
|
<option disabled selected>Pilih Tahun</option>
|
|
<option>2025</option>
|
|
<option>2024</option>
|
|
<option>2023</option>
|
|
</select>
|
|
</fieldset>
|
|
<div class="grid grid-cols-2 gap-4">
|
|
<fieldset class="fieldset">
|
|
<legend class="fieldset-legend">Bulan Awal</legend>
|
|
<input type="month" class="input w-full" placeholder="Pilih bulan">
|
|
</fieldset>
|
|
<fieldset class="fieldset">
|
|
<legend class="fieldset-legend">Bulan Akhir</legend>
|
|
<input type="month" class="input w-full" placeholder="Pilih bulan">
|
|
</fieldset>
|
|
</div>
|
|
<fieldset class="fieldset mt-4">
|
|
<legend class="fieldset-legend">Kelurahan</legend>
|
|
<select id="kelurahanSelect" class="w-full">
|
|
<option value="">Pilih Kelurahan</option>
|
|
<option value="Sukamaju">Kelurahan Sukamaju</option>
|
|
<option value="Sukadamai">Kelurahan Sukadamai</option>
|
|
<option value="Mekarsari">Kelurahan Mekarsari</option>
|
|
<option value="HarapanJaya">Kelurahan Harapan Jaya</option>
|
|
<option value="Cibinong">Kelurahan Cibinong</option>
|
|
</select>
|
|
</fieldset>
|
|
<fieldset class="fieldset mt-4">
|
|
<legend class="fieldset-legend">RW</legend>
|
|
<select id="rwSelect" class="w-full">
|
|
<option value="">Pilih RW</option>
|
|
<option value="01">RW 01</option>
|
|
<option value="02">RW 02</option>
|
|
<option value="03">RW 03</option>
|
|
<option value="04">RW 04</option>
|
|
<option value="05">RW 05</option>
|
|
<option value="06">RW 06</option>
|
|
<option value="07">RW 07</option>
|
|
<option value="08">RW 08</option>
|
|
<option value="09">RW 09</option>
|
|
<option value="10">RW 10</option>
|
|
</select>
|
|
</fieldset>
|
|
<div class="modal-action">
|
|
<button type="button" class="btn rounded-full" onclick="modal_filter_checklist.close()">Bersihkan</button>
|
|
<button type="submit" class="btn btn-primary rounded-full text-white">Terapkan Filter</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</dialog>
|
|
|
|
@section Scripts {
|
|
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
|
<script src="https://cdn.datatables.net/2.3.4/js/dataTables.js"></script>
|
|
<script src="/plugins/datatables/dataTables.tailwindcss.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.2.2/dist/js/tom-select.complete.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
new TomSelect("#kelurahanSelect", {
|
|
closeAfterSelect: true,
|
|
maxItems: 1,
|
|
placeholder: "Pilih Kelurahan",
|
|
});
|
|
|
|
new TomSelect("#rwSelect", {
|
|
closeAfterSelect: true,
|
|
maxItems: 1,
|
|
placeholder: "Pilih RW",
|
|
});
|
|
|
|
let tableSemua = null;
|
|
let tableSudah = null;
|
|
let tableBelum = null;
|
|
|
|
function initTableSemua() {
|
|
if (tableSemua != null) return;
|
|
|
|
tableSemua = new DataTable('#tableChecklistSemua', {
|
|
ajax: '@Url.Action("Table", "ChecklistHarian")?status=semua',
|
|
scrollX: true,
|
|
autoWidth: false,
|
|
initComplete: () => $('div.dt-scroll-body thead').css('visibility', 'collapse'),
|
|
columns: [
|
|
{ data: null, render: (d,t,r,m)=> m.row+1 },
|
|
{ data: 'tanggal' },
|
|
{ data: 'mudah_terurai' },
|
|
{ data: 'material_daur_ulang' },
|
|
{ data: 'b3' },
|
|
{ data: 'residu' },
|
|
{ data: 'status' },
|
|
{ data: 'aksi' }
|
|
]
|
|
});
|
|
}
|
|
|
|
function initTableSudahVerifikasi() {
|
|
if (tableSudah != null) return;
|
|
|
|
tableSudah = new DataTable('#tableChecklistSudahVerifikasi', {
|
|
ajax: '@Url.Action("Table", "ChecklistHarian")?status=sudah',
|
|
scrollX: true,
|
|
autoWidth: false,
|
|
initComplete: () => $('div.dt-scroll-body thead').css('visibility', 'collapse'),
|
|
columns: [
|
|
{ data: null, render: (d,t,r,m)=> m.row+1 },
|
|
{ data: 'tanggal' },
|
|
{ data: 'mudah_terurai' },
|
|
{ data: 'material_daur_ulang' },
|
|
{ data: 'b3' },
|
|
{ data: 'residu' },
|
|
{ data: 'status' },
|
|
{ data: 'aksi' }
|
|
]
|
|
});
|
|
}
|
|
|
|
function initTableBelumVerifikasi() {
|
|
if (tableBelum != null) return;
|
|
|
|
tableBelum = new DataTable('#tableChecklistBelumVerifikasi', {
|
|
ajax: '@Url.Action("Table", "ChecklistHarian")?status=belum',
|
|
scrollX: true,
|
|
autoWidth: false,
|
|
initComplete: () => $('div.dt-scroll-body thead').css('visibility', 'collapse'),
|
|
columns: [
|
|
{ data: null, render: (d,t,r,m)=> m.row+1 },
|
|
{ data: 'tanggal' },
|
|
{ data: 'mudah_terurai' },
|
|
{ data: 'material_daur_ulang' },
|
|
{ data: 'b3' },
|
|
{ data: 'residu' },
|
|
{ data: 'status' },
|
|
{ data: 'aksi' }
|
|
]
|
|
});
|
|
}
|
|
|
|
document.querySelectorAll('input[name="tab_checklist_harian"]').forEach((tab, index) => {
|
|
tab.addEventListener('change', () => {
|
|
if (index === 0) initTableSemua();
|
|
if (index === 1) initTableSudahVerifikasi();
|
|
if (index === 2) initTableBelumVerifikasi();
|
|
});
|
|
});
|
|
|
|
initTableSemua();
|
|
|
|
</script>
|
|
} |