229 lines
13 KiB
C#
229 lines
13 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BankSampahApp.Controllers.Data
|
|
{
|
|
[Route("Data/[controller]/[action]")]
|
|
public class HargaSampahController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
return View("~/Views/Data/HargaSampah/Index.cshtml");
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Table()
|
|
{
|
|
var data = new[]
|
|
{
|
|
new {
|
|
nama_subkategori = "Plastik kemasan",
|
|
harga = 2500,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Baterai bekas",
|
|
harga = 5000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Sisa makanan",
|
|
harga = 1000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kertas koran",
|
|
harga = 3500,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Botol kaca",
|
|
harga = 4000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kardus bekas",
|
|
harga = 2000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Botol plastik PET",
|
|
harga = 3000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kaleng aluminium",
|
|
harga = 6000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kertas HVS",
|
|
harga = 2800,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Plastik HDPE",
|
|
harga = 3200,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Elektronik bekas",
|
|
harga = 15000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Tembaga",
|
|
harga = 45000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Besi scrap",
|
|
harga = 3500,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kain perca",
|
|
harga = 1500,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Styrofoam",
|
|
harga = 500,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kertas duplex",
|
|
harga = 2200,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Plastik PP",
|
|
harga = 2700,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Gelas plastik",
|
|
harga = 1800,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Buku bekas",
|
|
harga = 2500,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Botol kaca berwarna",
|
|
harga = 3500,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kantong plastik",
|
|
harga = 800,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Aluminium foil",
|
|
harga = 12000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Kertas karton",
|
|
harga = 1800,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Lampu bekas",
|
|
harga = 2000,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
nama_subkategori = "Tutup botol plastik",
|
|
harga = 1200,
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-note-pencil text-white text-sm\"></i></button>" +
|
|
"<button class=\"p-2 bg-red-500 rounded-full w-[36px] h-[36px]\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
};
|
|
|
|
var response = new
|
|
{
|
|
data = data
|
|
};
|
|
|
|
return Json(response);
|
|
}
|
|
}
|
|
}
|