329 lines
18 KiB
C#
329 lines
18 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BankSampahApp.Controllers.Main
|
|
{
|
|
[Route("Main/[controller]/[action]")]
|
|
public class NasabahController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
return View("~/Views/Main/Nasabah/Index.cshtml");
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Table()
|
|
{
|
|
var data = new[]
|
|
{
|
|
new {
|
|
id = 1,
|
|
nama = "Andi Prabowo",
|
|
tgl_pendaftaran = "15 Nov 2023",
|
|
status = "Aktif",
|
|
saldo_awal = 400000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"1\"><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] delete-btn\" data-id=\"1\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 2,
|
|
nama = "Siti Nurhaliza",
|
|
tgl_pendaftaran = "8 Jan 2025",
|
|
status = "Aktif",
|
|
saldo_awal = 600000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"2\"><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] delete-btn\" data-id=\"2\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 3,
|
|
nama = "Budi Santoso",
|
|
tgl_pendaftaran = "19 Sep 2023",
|
|
status = "Aktif",
|
|
saldo_awal = 500000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"3\"><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] delete-btn\" data-id=\"3\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 4,
|
|
nama = "Nina Sari",
|
|
tgl_pendaftaran = "3 Des 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 100000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"4\"><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] delete-btn\" data-id=\"4\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 5,
|
|
nama = "Dewi Lestari",
|
|
tgl_pendaftaran = "27 Apr 2026",
|
|
status = "Tidak Aktif",
|
|
saldo_awal = 300000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"5\"><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] delete-btn\" data-id=\"5\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 6,
|
|
nama = "Rudi Hartono",
|
|
tgl_pendaftaran = "11 Jul 2025",
|
|
status = "Tidak Aktif",
|
|
saldo_awal = 200000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"6\"><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] delete-btn\" data-id=\"6\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 7,
|
|
nama = "Fitri Handayani",
|
|
tgl_pendaftaran = "22 Feb 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 450000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"7\"><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] delete-btn\" data-id=\"7\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 8,
|
|
nama = "Ahmad Fauzi",
|
|
tgl_pendaftaran = "5 Mei 2023",
|
|
status = "Aktif",
|
|
saldo_awal = 350000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"8\"><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] delete-btn\" data-id=\"8\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 9,
|
|
nama = "Linda Wijaya",
|
|
tgl_pendaftaran = "14 Jun 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 550000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"9\"><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] delete-btn\" data-id=\"9\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 10,
|
|
nama = "Bambang Suryanto",
|
|
tgl_pendaftaran = "30 Okt 2023",
|
|
status = "Tidak Aktif",
|
|
saldo_awal = 250000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"10\"><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] delete-btn\" data-id=\"10\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 11,
|
|
nama = "Rina Kusuma",
|
|
tgl_pendaftaran = "17 Mar 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 480000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"11\"><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] delete-btn\" data-id=\"11\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 12,
|
|
nama = "Joko Susilo",
|
|
tgl_pendaftaran = "9 Agt 2023",
|
|
status = "Aktif",
|
|
saldo_awal = 420000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"12\"><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] delete-btn\" data-id=\"12\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 13,
|
|
nama = "Sri Wahyuni",
|
|
tgl_pendaftaran = "25 Des 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 380000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"13\"><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] delete-btn\" data-id=\"13\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 14,
|
|
nama = "Agus Setiawan",
|
|
tgl_pendaftaran = "12 Apr 2024",
|
|
status = "Tidak Aktif",
|
|
saldo_awal = 320000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"14\"><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] delete-btn\" data-id=\"14\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 15,
|
|
nama = "Maya Putri",
|
|
tgl_pendaftaran = "6 Jul 2023",
|
|
status = "Aktif",
|
|
saldo_awal = 520000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"15\"><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] delete-btn\" data-id=\"15\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 16,
|
|
nama = "Hendra Gunawan",
|
|
tgl_pendaftaran = "28 Nov 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 410000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"16\"><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] delete-btn\" data-id=\"16\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 17,
|
|
nama = "Yuni Astuti",
|
|
tgl_pendaftaran = "3 Feb 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 470000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"17\"><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] delete-btn\" data-id=\"17\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 18,
|
|
nama = "Dedi Kurniawan",
|
|
tgl_pendaftaran = "19 Mei 2023",
|
|
status = "Tidak Aktif",
|
|
saldo_awal = 290000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"18\"><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] delete-btn\" data-id=\"18\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 19,
|
|
nama = "Taufik Rahman",
|
|
tgl_pendaftaran = "7 Sep 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 530000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"19\"><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] delete-btn\" data-id=\"19\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 20,
|
|
nama = "Sari Indah",
|
|
tgl_pendaftaran = "21 Jan 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 390000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"20\"><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] delete-btn\" data-id=\"20\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 21,
|
|
nama = "Indra Permana",
|
|
tgl_pendaftaran = "15 Okt 2023",
|
|
status = "Tidak Aktif",
|
|
saldo_awal = 270000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"21\"><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] delete-btn\" data-id=\"21\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 22,
|
|
nama = "Lina Marlina",
|
|
tgl_pendaftaran = "4 Jun 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 490000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"22\"><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] delete-btn\" data-id=\"22\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 23,
|
|
nama = "Fajar Hidayat",
|
|
tgl_pendaftaran = "18 Mar 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 430000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"23\"><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] delete-btn\" data-id=\"23\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 24,
|
|
nama = "Wati Suryani",
|
|
tgl_pendaftaran = "10 Agt 2023",
|
|
status = "Tidak Aktif",
|
|
saldo_awal = 310000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"24\"><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] delete-btn\" data-id=\"24\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
new {
|
|
id = 25,
|
|
nama = "Eko Prasetyo",
|
|
tgl_pendaftaran = "26 Des 2024",
|
|
status = "Aktif",
|
|
saldo_awal = 560000,
|
|
status_penarikan = "-",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<button class=\"p-2 bg-amber-500 rounded-full w-[36px] h-[36px] edit-btn\" data-id=\"25\"><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] delete-btn\" data-id=\"25\"><i class=\"ph ph-trash text-white text-sm\"></i></button>" +
|
|
"</div>",
|
|
},
|
|
};
|
|
|
|
var response = new
|
|
{
|
|
data = data
|
|
};
|
|
|
|
return Json(response);
|
|
}
|
|
}
|
|
}
|