feat:reduksi sampah satpel module
parent
179ed00580
commit
69786b96ff
|
|
@ -0,0 +1,91 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace BankSampahApp.Controllers.Main
|
||||||
|
{
|
||||||
|
[Route("Main/[controller]/[action]")]
|
||||||
|
public class ReduksiSampahSatpelController : Controller
|
||||||
|
{
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
return View("~/Views/Main/ReduksiSampahSatpel/Index.cshtml");
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult Table()
|
||||||
|
{
|
||||||
|
var data = new[]
|
||||||
|
{
|
||||||
|
new {
|
||||||
|
periode = "Januari",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Kramatjati",
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">DIVERIFIKASI SATPEL</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Januari",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Kramatjati",
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">DIVERIFIKASI SATPEL</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Februari",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Pasar Rebo",
|
||||||
|
status = "<div class=\"badge badge-warning badge-soft rounded-full\">MENUNGGU VERIFIKASI</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Maret",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Ciracas",
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">DIVERIFIKASI SATPEL</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "April",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Makasar",
|
||||||
|
status = "<div class=\"px-2 py-1 bg-red-50 rounded-full inline-flex items-center justify-center\"><span class=\"text-red-600 text-xs font-semibold font-['Plus_Jakarta_Sans']\">BELUM DISETUJUI</span></div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Mei",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Jatinegara",
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">DIVERIFIKASI SATPEL</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Juni",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Duren Sawit",
|
||||||
|
status = "<div class=\"badge badge-warning badge-soft rounded-full\">MENUNGGU VERIFIKASI</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Juli",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Cipayung",
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">DIVERIFIKASI SATPEL</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Agustus",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Kembangan",
|
||||||
|
status = "<div class=\"px-2 py-1 bg-red-50 rounded-full inline-flex items-center justify-center\"><span class=\"text-red-600 text-xs font-semibold font-['Plus_Jakarta_Sans']\">BELUM DISETUJUI</span></div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "September",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Palmerah",
|
||||||
|
status = "<div class=\"badge badge-warning badge-soft rounded-full\">MENUNGGU VERIFIKASI</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
periode = "Oktober",
|
||||||
|
jumlah_rumah_memilah = "Kecamatan Kebayoran Baru",
|
||||||
|
status = "<div class=\"badge badge-success badge-soft rounded-full\">DIVERIFIKASI SATPEL</div>",
|
||||||
|
gambar = "<a href=\"#\" class=\"btn bg-gray-500 text-white rounded-lg\"><i class=\"ph ph-file-text\"></i></a>",
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
return Json(new { data = data });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Reduksi Sampah";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-2 md:flex-row md:justify-between md:gap-0 items-center">
|
||||||
|
<div class="prose">
|
||||||
|
<span class="text-xl font-semibold text-black">
|
||||||
|
Reduksi Sampah
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex gap-2 items-center">
|
||||||
|
<select class="select rounded-full">
|
||||||
|
<option disabled selected>Pilih Tahun</option>
|
||||||
|
<option>2025</option>
|
||||||
|
<option>2024</option>
|
||||||
|
<option>2023</option>
|
||||||
|
<option>2022</option>
|
||||||
|
<option>2021</option>
|
||||||
|
<option>2020</option>
|
||||||
|
</select>
|
||||||
|
<button type="button" class="btn btn-sm bg-bank-sampah-primary-500 rounded-full text-white"><i class="ph ph-plus"></i>Tambah</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>No</th>
|
||||||
|
<th>Bulan</th>
|
||||||
|
<th>Jumlah Rumah yang Memilah</th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th>Gambar</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: '/Main/ReduksiSampahSatpel/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' },
|
||||||
|
{ data: 'jumlah_rumah_memilah' },
|
||||||
|
{ data: 'status' },
|
||||||
|
{ data: 'gambar' },
|
||||||
|
]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
|
@ -182,9 +182,9 @@
|
||||||
|
|
||||||
<!-- Reduksi -->
|
<!-- Reduksi -->
|
||||||
<li>
|
<li>
|
||||||
<a asp-controller="ReduksiSampah" class="rounded-full @(controller == "ReduksiSampah" ? "menu-active" : "")">
|
<a asp-controller="ReduksiSampahSatpel" class="rounded-full @(controller == "ReduksiSampahSatpel" ? "menu-active" : "")">
|
||||||
<i class="ph ph-database me-2 text-lg"></i>
|
<i class="ph ph-database me-2 text-lg"></i>
|
||||||
Reduksi Sampah
|
Reduksi Sampah Satpel
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<!-- <li>
|
<!-- <li>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue