feat: create checklist harian page
parent
a055978fe5
commit
932a35cb96
|
|
@ -0,0 +1,138 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace BpsRwApp.Controllers
|
||||||
|
{
|
||||||
|
[Route("[controller]/[action]")]
|
||||||
|
public class ChecklistHarianController : AppControllerBase
|
||||||
|
{
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult Table()
|
||||||
|
{
|
||||||
|
var data = new[]
|
||||||
|
{
|
||||||
|
new {
|
||||||
|
tanggal = "01 Januari 2025",
|
||||||
|
mudah_terurai = 20,
|
||||||
|
material_daur_ulang = 10,
|
||||||
|
b3 = 2,
|
||||||
|
residu = 5,
|
||||||
|
status = "<div class=\"badge badge-error badge-soft rounded-full\">Belum Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "02 Januari 2025",
|
||||||
|
mudah_terurai = 15,
|
||||||
|
material_daur_ulang = 8,
|
||||||
|
b3 = 1,
|
||||||
|
residu = 3,
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">Sudah Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "03 Januari 2025",
|
||||||
|
mudah_terurai = 18,
|
||||||
|
material_daur_ulang = 9,
|
||||||
|
b3 = 1,
|
||||||
|
residu = 4,
|
||||||
|
status = "<div class=\"badge badge-error badge-soft rounded-full\">Belum Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "04 Januari 2025",
|
||||||
|
mudah_terurai = 22,
|
||||||
|
material_daur_ulang = 11,
|
||||||
|
b3 = 2,
|
||||||
|
residu = 6,
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">Sudah Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "05 Januari 2025",
|
||||||
|
mudah_terurai = 17,
|
||||||
|
material_daur_ulang = 7,
|
||||||
|
b3 = 2,
|
||||||
|
residu = 3,
|
||||||
|
status = "<div class=\"badge badge-error badge-soft rounded-full\">Belum Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "06 Januari 2025",
|
||||||
|
mudah_terurai = 19,
|
||||||
|
material_daur_ulang = 12,
|
||||||
|
b3 = 1,
|
||||||
|
residu = 4,
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">Sudah Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "07 Januari 2025",
|
||||||
|
mudah_terurai = 21,
|
||||||
|
material_daur_ulang = 13,
|
||||||
|
b3 = 2,
|
||||||
|
residu = 5,
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">Sudah Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "08 Januari 2025",
|
||||||
|
mudah_terurai = 16,
|
||||||
|
material_daur_ulang = 9,
|
||||||
|
b3 = 1,
|
||||||
|
residu = 3,
|
||||||
|
status = "<div class=\"badge badge-error badge-soft rounded-full\">Belum Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "09 Januari 2025",
|
||||||
|
mudah_terurai = 23,
|
||||||
|
material_daur_ulang = 14,
|
||||||
|
b3 = 3,
|
||||||
|
residu = 6,
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">Sudah Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
tanggal = "10 Januari 2025",
|
||||||
|
mudah_terurai = 14,
|
||||||
|
material_daur_ulang = 7,
|
||||||
|
b3 = 1,
|
||||||
|
residu = 2,
|
||||||
|
status = "<div class=\"badge badge-error badge-soft rounded-full\">Belum Diverifikasi</div>",
|
||||||
|
aksi = "<div class=\"flex gap-2\">" +
|
||||||
|
"<a href=\"#\" class=\"btn bg-white rounded-full btn-sm\">Detail</a>" +
|
||||||
|
"</div>"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var response = new
|
||||||
|
{
|
||||||
|
data = data
|
||||||
|
};
|
||||||
|
|
||||||
|
return Json(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Checklist Harian";
|
||||||
|
}
|
||||||
|
|
||||||
|
<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">
|
||||||
|
|
||||||
|
<!-- TAB 1 -->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- TAB 2 -->
|
||||||
|
<input type="radio" name="tab_checklist_harian" class="tab checked:text-white [--tab-bg:green]" aria-label="Sudah Diverifikasi" />
|
||||||
|
<div class="tab-content bg-base-100 border-base-300 p-0">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TAB 3 -->
|
||||||
|
<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">
|
||||||
|
</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">
|
||||||
|
<p class="py-4">
|
||||||
|
<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>
|
||||||
|
</p>
|
||||||
|
<div class="modal-action">
|
||||||
|
<button type="button" class="btn rounded-full" onclick="modal_filter_checklist.close()">Bersihkan</button>
|
||||||
|
<button type="submit" class="btn btn-success 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 type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
var tableChecklist = new DataTable('#tableChecklist', {
|
||||||
|
ajax: '@Url.Action("Table", "ChecklistHarian")',
|
||||||
|
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: 'tanggal' },
|
||||||
|
{ data: 'mudah_terurai' },
|
||||||
|
{ data: 'material_daur_ulang' },
|
||||||
|
{ data: 'b3' },
|
||||||
|
{ data: 'residu' },
|
||||||
|
{ data: 'status' },
|
||||||
|
{ data: 'aksi', orderable: false, searchable: false }
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<div class="card bg-base-100 rounded-none border border-base-300">
|
||||||
|
<div class="card-body p-0">
|
||||||
|
<!-- Table -->
|
||||||
|
<div class="overflow-x-auto">
|
||||||
|
<table class="table-zebra table w-full text-sm" id="tableChecklist">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-[5%]">No</th>
|
||||||
|
<th class="w-[15%]">Tanggal</th>
|
||||||
|
<th class="w-[15%]">Mudah Terurai</th>
|
||||||
|
<th class="w-[15%]">Material Daur Ulang</th>
|
||||||
|
<th class="w-[10%]">B3</th>
|
||||||
|
<th class="w-[10%]">Residu</th>
|
||||||
|
<th class="w-[15%]">Status</th>
|
||||||
|
<th class="w-[15%] text-center">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -167,6 +167,12 @@
|
||||||
Laporan RW (RW)
|
Laporan RW (RW)
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a asp-controller="ChecklistHarian" asp-action="Index" class="@(controller == "ChecklistHarian" ? "menu-active" : "")">
|
||||||
|
<span class="icon icon-fill">playlist_add_check</span>
|
||||||
|
Checklist Harian
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue