diff --git a/Areas/Dinas/Controllers/KategoriController.cs b/Areas/Dinas/Controllers/KategoriController.cs new file mode 100644 index 0000000..761262d --- /dev/null +++ b/Areas/Dinas/Controllers/KategoriController.cs @@ -0,0 +1,64 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BankSampahApp.Areas.Dinas.Controllers +{ + [Area("Dinas")] + [Route("Dinas/[controller]/[action]")] + public class KategoriController : Controller + { + public IActionResult Index() + { + return View(); + } + + [HttpGet] + public IActionResult Table() + { + var data = new[] + { + new { + nama = "Warga", + aksi = "
", + }, + new { + nama = "Sekolah", + aksi = "", + }, + new { + nama = "Perkantoran", + aksi = "", + }, + new { + nama = "Kawasan", + aksi = "", + }, + new { + nama = "Rumah Ibadah", + aksi = "", + }, + }; + + var response = new + { + data = data + }; + + return Json(response); + } + } +} diff --git a/Areas/Dinas/Views/Kategori/Index.cshtml b/Areas/Dinas/Views/Kategori/Index.cshtml new file mode 100644 index 0000000..ff75c01 --- /dev/null +++ b/Areas/Dinas/Views/Kategori/Index.cshtml @@ -0,0 +1,79 @@ +@{ + ViewData["Title"] = "Kategori"; +} + +| No | +Nama Kategori | +Aksi | +
|---|