239 lines
14 KiB
C#
239 lines
14 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BankSampahApp.Controllers.Data
|
|
{
|
|
[Route("Data/[controller]/[action]")]
|
|
public class NasabahController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
return View("~/Views/Data/Nasabah/Index.cshtml");
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Table()
|
|
{
|
|
var data = new[]
|
|
{
|
|
new {
|
|
id = 1,
|
|
nama = "Andi Prabowo",
|
|
tgl_pendaftaran = "15 Nov 2023",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 200000,
|
|
saldo_sekarang = 400000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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_pendaftaran = "Belum Setujui",
|
|
saldo_awal = 300000,
|
|
saldo_sekarang = 600000,
|
|
status_nasabah = "Tidak Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "20 Jan 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 150000,
|
|
saldo_sekarang = 250000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Dewi Lestari",
|
|
tgl_pendaftaran = "5 Feb 2024",
|
|
status_pendaftaran = "Belum Setujui",
|
|
saldo_awal = 500000,
|
|
saldo_sekarang = 750000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Rizky Novian",
|
|
tgl_pendaftaran = "2 Mar 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 300000,
|
|
saldo_sekarang = 550000,
|
|
status_nasabah = "Tidak Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Putri Maharani",
|
|
tgl_pendaftaran = "10 Apr 2024",
|
|
status_pendaftaran = "Belum Setujui",
|
|
saldo_awal = 200000,
|
|
saldo_sekarang = 300000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Hendra Wijaya",
|
|
tgl_pendaftaran = "12 Jun 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 700000,
|
|
saldo_sekarang = 900000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Nadia Fadhilah",
|
|
tgl_pendaftaran = "1 Jul 2024",
|
|
status_pendaftaran = "Belum Setujui",
|
|
saldo_awal = 80000,
|
|
saldo_sekarang = 120000,
|
|
status_nasabah = "Tidak Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Galih Ramadhan",
|
|
tgl_pendaftaran = "19 Jul 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 600000,
|
|
saldo_sekarang = 820000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Silvia Ayu",
|
|
tgl_pendaftaran = "30 Aug 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 200000,
|
|
saldo_sekarang = 410000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Yusuf Hakim",
|
|
tgl_pendaftaran = "12 Sep 2024",
|
|
status_pendaftaran = "Belum Setujui",
|
|
saldo_awal = 100000,
|
|
saldo_sekarang = 200000,
|
|
status_nasabah = "Tidak Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Rani Oktaviani",
|
|
tgl_pendaftaran = "22 Sep 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 350000,
|
|
saldo_sekarang = 500000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Dimas Prakoso",
|
|
tgl_pendaftaran = "11 Oct 2024",
|
|
status_pendaftaran = "Belum Setujui",
|
|
saldo_awal = 200000,
|
|
saldo_sekarang = 330000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Lala Kamila",
|
|
tgl_pendaftaran = "7 Nov 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 50000,
|
|
saldo_sekarang = 90000,
|
|
status_nasabah = "Tidak Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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 = "Farhan Saputra",
|
|
tgl_pendaftaran = "12 Dec 2024",
|
|
status_pendaftaran = "Setuju",
|
|
saldo_awal = 600000,
|
|
saldo_sekarang = 780000,
|
|
status_nasabah = "Aktif",
|
|
aksi = "<div class=\"flex gap-2\">" +
|
|
"<a href=\"javascript:void(0)\" class=\"btn btn-circle btn-success text-white btn-sm\"><i class=\"ph ph-check\"></i></a>" +
|
|
"<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>",
|
|
},
|
|
};
|
|
|
|
var response = new
|
|
{
|
|
data = data
|
|
};
|
|
|
|
return Json(response);
|
|
}
|
|
}
|
|
}
|