From 4e831ede3f453ba9da9583814ab2c1789ac06ae4 Mon Sep 17 00:00:00 2001 From: Yuri Dimas Date: Sun, 9 Nov 2025 22:58:51 +0700 Subject: [PATCH] style: add menu Data RT role Admin --- Areas/Admin/Controllers/DataRtController.cs | 78 +++++++++++++++++++++ Areas/Admin/Views/DataRt/Index.cshtml | 64 +++++++++++++++++ Areas/Shared/Layouts/App/_Sidebar.cshtml | 2 +- 3 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 Areas/Admin/Controllers/DataRtController.cs create mode 100644 Areas/Admin/Views/DataRt/Index.cshtml diff --git a/Areas/Admin/Controllers/DataRtController.cs b/Areas/Admin/Controllers/DataRtController.cs new file mode 100644 index 0000000..92e182b --- /dev/null +++ b/Areas/Admin/Controllers/DataRtController.cs @@ -0,0 +1,78 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BpsRwApp.Areas.Admin.Controllers +{ + [Area("Admin")] + public class DataRtController : Controller + { + public IActionResult Index() + { + return View(); + } + + [HttpGet] + public IActionResult Table() + { + var data = new[] + { + new { + rt = "001", + rw = "001", + kecamatan = "Kebayoran", + }, + new { + rt = "002", + rw = "001", + kecamatan = "Tebet", + }, + new { + rt = "003", + rw = "001", + kecamatan = "Menteng", + }, + new { + rt = "004", + rw = "001", + kecamatan = "Cilandak", + }, + new { + rt = "005", + rw = "001", + kecamatan = "Setiabudi", + }, + new { + rt = "006", + rw = "001", + kecamatan = "Gambir", + }, + new { + rt = "007", + rw = "001", + kecamatan = "Cakung", + }, + new { + rt = "008", + rw = "001", + kecamatan = "Kelapa Gading", + }, + new { + rt = "009", + rw = "001", + kecamatan = "Pancoran", + }, + new { + rt = "010", + rw = "001", + kecamatan = "Tanah Abang", + }, + }; + + var response = new + { + data = data + }; + + return Json(response); + } + } +} diff --git a/Areas/Admin/Views/DataRt/Index.cshtml b/Areas/Admin/Views/DataRt/Index.cshtml new file mode 100644 index 0000000..2af236f --- /dev/null +++ b/Areas/Admin/Views/DataRt/Index.cshtml @@ -0,0 +1,64 @@ +@{ + ViewData["Title"] = "Data RT"; +} + + + + +
+
+

Data RT

+
+ +
+ +
+ +
+
+ + + + + + + + + + +
NoRTRWKecamatan
+
+
+ + + + + \ No newline at end of file diff --git a/Areas/Shared/Layouts/App/_Sidebar.cshtml b/Areas/Shared/Layouts/App/_Sidebar.cshtml index 6c08b9a..d150a2f 100644 --- a/Areas/Shared/Layouts/App/_Sidebar.cshtml +++ b/Areas/Shared/Layouts/App/_Sidebar.cshtml @@ -71,7 +71,7 @@
  • - + list Data RT