feat(MasterFasilitas): add Kategori Field on table and Form

main
Kevin Hendrawan 2025-11-21 23:03:31 +07:00
parent 818805caf1
commit 4a1353c093
2 changed files with 47 additions and 16 deletions

View File

@ -17,6 +17,7 @@ namespace BankSampahApp.Controllers.Master
{
new {
nama = "Tong Pilah",
kategori = "Peralatan Dasar",
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-circle btn-warning text-white btn-sm\"><i class=\"ph ph-note-pencil\"></i></a>" +
"<a href=\"#\" class=\"btn btn-circle btn-error delete text-white btn-sm\"><i class=\"ph ph-trash\"></i></a>" +
@ -24,6 +25,7 @@ namespace BankSampahApp.Controllers.Master
},
new {
nama = "Tong Komposter",
kategori = "Peralatan Dasar",
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-circle btn-warning text-white btn-sm\"><i class=\"ph ph-note-pencil\"></i></a>" +
"<a href=\"#\" class=\"btn btn-circle btn-error delete text-white btn-sm\"><i class=\"ph ph-trash\"></i></a>" +
@ -31,6 +33,7 @@ namespace BankSampahApp.Controllers.Master
},
new {
nama = "Mesin Pengepress",
kategori = "Mesin Produksi",
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-circle btn-warning text-white btn-sm\"><i class=\"ph ph-note-pencil\"></i></a>" +
"<a href=\"#\" class=\"btn btn-circle btn-error delete text-white btn-sm\"><i class=\"ph ph-trash\"></i></a>" +
@ -38,6 +41,7 @@ namespace BankSampahApp.Controllers.Master
},
new {
nama = "Mesin Pencacah",
kategori = "Mesin Produksi",
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-circle btn-warning text-white btn-sm\"><i class=\"ph ph-note-pencil\"></i></a>" +
"<a href=\"#\" class=\"btn btn-circle btn-error delete text-white btn-sm\"><i class=\"ph ph-trash\"></i></a>" +
@ -45,6 +49,7 @@ namespace BankSampahApp.Controllers.Master
},
new {
nama = "Mesin Cetak Roster",
kategori = "Mesin Produksi",
aksi = "<div class=\"flex gap-2\">" +
"<a href=\"#\" class=\"btn btn-circle btn-warning text-white btn-sm\"><i class=\"ph ph-note-pencil\"></i></a>" +
"<a href=\"#\" class=\"btn btn-circle btn-error delete text-white btn-sm\"><i class=\"ph ph-trash\"></i></a>" +
@ -52,6 +57,7 @@ namespace BankSampahApp.Controllers.Master
},
};
var response = new
{
data = data

View File

@ -24,6 +24,29 @@
<form id="formTambah" onsubmit="submitForm(event)">
<input type="hidden" id="edit_mode" value="false">
<div class="flex flex-col gap-6">
<!-- Fiel Kategori -->
<div class="flex flex-col">
<fieldset class="fieldset">
<legend class="fieldset-legend">
Kategori
<span class="text-red-500">*</span>
</legend>
<select id="kelurahan" class="select w-full" required>
<option value="" disabled selected>Pilih Kategori</option>
<option value="Timbangan">Timbangan</option>
<option value="Gudang Penyimpanan">Gudang Penyimpanan</option>
<option value="Mesin Pencacah">Mesin Pencacah</option>
<option value="Mesin Press">Mesin Press</option>
<option value="Rak Penyimpanan">Rak Penyimpanan</option>
<option value="Tempat Pemilahan">Tempat Pemilahan</option>
<option value="Gerobak Angkut">Gerobak Angkut</option>
<option value="Komposter">Komposter</option>
<option value="Tempat Cuci Sampah">Tempat Cuci Sampah</option>
<option value="Perlengkapan Keselamatan">Perlengkapan Keselamatan</option>
</select>
</fieldset>
</div>
<!-- Field Nama -->
<div class="flex flex-col">
<fieldset class="fieldset">
@ -62,7 +85,8 @@
<thead>
<tr>
<th class="w-[5%]">No</th>
<th class="w-[85%]">Nama Fasilitas</th>
<th class="w-[70%]">Nama Fasilitas</th>
<th class="w-[15%]">Kategori</th>
<th class="w-[10%]">Aksi</th>
</tr>
</thead>
@ -88,6 +112,7 @@
columns: [
{ data: null, render: (d, t, r, m) => m.row + 1, orderable: false, searchable: false },
{ data: 'nama' },
{ data: 'ketegori' },
{ data: 'aksi' },
]
});