From 94be771bcb3d27c1d1e4f1e7fb7e9b9793605db0 Mon Sep 17 00:00:00 2001 From: Kevin Hendrawan Date: Thu, 27 Nov 2025 14:36:29 +0700 Subject: [PATCH] feat: dashboard --- Controllers/Main/DashboardBsiController.cs | 12 + Controllers/Main/DashboardBsuController.cs | 13 + Controllers/Main/DashboardController.cs | 83 - .../Main/DashboardNasabahController.cs | 91 + Views/Main/DashboardBsi/Index.cshtml | 173 ++ .../Bsu.cshtml => DashboardBsu/Index.cshtml} | 39 +- .../Index.cshtml} | 48 +- Views/Shared/_SidebarUnified.cshtml | 13 +- wwwroot/images/welcome_modal.svg | 2258 +++++++++++++++++ 9 files changed, 2606 insertions(+), 124 deletions(-) create mode 100644 Controllers/Main/DashboardBsiController.cs create mode 100644 Controllers/Main/DashboardBsuController.cs create mode 100644 Controllers/Main/DashboardNasabahController.cs create mode 100644 Views/Main/DashboardBsi/Index.cshtml rename Views/Main/{Dashboard/Bsu.cshtml => DashboardBsu/Index.cshtml} (83%) rename Views/Main/{Dashboard/Nasabah.cshtml => DashboardNasabah/Index.cshtml} (80%) create mode 100644 wwwroot/images/welcome_modal.svg diff --git a/Controllers/Main/DashboardBsiController.cs b/Controllers/Main/DashboardBsiController.cs new file mode 100644 index 0000000..dfa71d8 --- /dev/null +++ b/Controllers/Main/DashboardBsiController.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BankSampahApp.Controllers.Main +{ + public class DashboardBsiController : Controller + { + public IActionResult Index() + { + return View("~/Views/Main/DashboardBsi/Index.cshtml"); + } + } +} \ No newline at end of file diff --git a/Controllers/Main/DashboardBsuController.cs b/Controllers/Main/DashboardBsuController.cs new file mode 100644 index 0000000..b27aa15 --- /dev/null +++ b/Controllers/Main/DashboardBsuController.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BankSampahApp.Controllers.Main +{ + [Route("Main/[controller]/[action]")] + public class DashboardBsuController : Controller + { + public IActionResult Index() + { + return View("~/Views/Main/DashboardBsu/Index.cshtml"); + } + } +} \ No newline at end of file diff --git a/Controllers/Main/DashboardController.cs b/Controllers/Main/DashboardController.cs index c0952a1..ba13442 100644 --- a/Controllers/Main/DashboardController.cs +++ b/Controllers/Main/DashboardController.cs @@ -10,92 +10,9 @@ namespace BankSampahApp.Controllers.Main return View("~/Views/Main/Dashboard/Index.cshtml"); } - public IActionResult Nasabah() - { - return View("~/Views/Main/Dashboard/Nasabah.cshtml"); - } - public IActionResult Bsu() { return View("~/Views/Main/Dashboard/Bsu.cshtml"); } - - [HttpGet] - public IActionResult Table(){ - var data = new[] - { - new { - kategori = "Logam", - total_berat = 400, - }, - new { - kategori = "Plastik", - total_berat = 120, - }, - new { - kategori = "Kertas", - total_berat = 85, - }, - new { - kategori = "Kaca", - total_berat = 300, - }, - new { - kategori = "Elektronik", - total_berat = 25, - }, - new { - kategori = "Organik", - total_berat = 500, - }, - new { - kategori = "Tekstil", - total_berat = 60, - }, - new { - kategori = "Karet", - total_berat = 150, - }, - new { - kategori = "Kayu", - total_berat = 270, - }, - new { - kategori = "Baterai", - total_berat = 18, - }, - new { - kategori = "Minyak", - total_berat = 90, - }, - new { - kategori = "Medis", - total_berat = 45, - }, - new { - kategori = "Aluminium", - total_berat = 200, - }, - new { - kategori = "Tembaga", - total_berat = 155, - }, - new { - kategori = "Karet Sintetis", - total_berat = 130, - }, - new { - kategori = "Kompos", - total_berat = 420, - }, - }; - - var response = new - { - data = data - }; - - return Json(response); - } } } diff --git a/Controllers/Main/DashboardNasabahController.cs b/Controllers/Main/DashboardNasabahController.cs new file mode 100644 index 0000000..ea46c8c --- /dev/null +++ b/Controllers/Main/DashboardNasabahController.cs @@ -0,0 +1,91 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BankSampahApp.Controllers.Main +{ + [Route("Main/[controller]/[action]")] + public class DashboardNasabahController : Controller + { + public IActionResult Index() + { + return View("~/Views/Main/DashboardNasabah/Index.cshtml"); + } + + [HttpGet] + public IActionResult Table(){ + var data = new[] + { + new { + kategori = "Logam", + total_berat = 400, + }, + new { + kategori = "Plastik", + total_berat = 120, + }, + new { + kategori = "Kertas", + total_berat = 85, + }, + new { + kategori = "Kaca", + total_berat = 300, + }, + new { + kategori = "Elektronik", + total_berat = 25, + }, + new { + kategori = "Organik", + total_berat = 500, + }, + new { + kategori = "Tekstil", + total_berat = 60, + }, + new { + kategori = "Karet", + total_berat = 150, + }, + new { + kategori = "Kayu", + total_berat = 270, + }, + new { + kategori = "Baterai", + total_berat = 18, + }, + new { + kategori = "Minyak", + total_berat = 90, + }, + new { + kategori = "Medis", + total_berat = 45, + }, + new { + kategori = "Aluminium", + total_berat = 200, + }, + new { + kategori = "Tembaga", + total_berat = 155, + }, + new { + kategori = "Karet Sintetis", + total_berat = 130, + }, + new { + kategori = "Kompos", + total_berat = 420, + }, + }; + + var response = new + { + data = data + }; + + return Json(response); + } + } +} \ No newline at end of file diff --git a/Views/Main/DashboardBsi/Index.cshtml b/Views/Main/DashboardBsi/Index.cshtml new file mode 100644 index 0000000..1b8c21b --- /dev/null +++ b/Views/Main/DashboardBsi/Index.cshtml @@ -0,0 +1,173 @@ +@{ + ViewData["Title"] = "Dashboard BSI"; +} + +
+
+ Dashboard BSI +
+
+ +
+ +
+
+ Selamat Datang + BSI Jakarta Timur +
+
+ +
+ +
+
+
+
Total Sampah BSI
+
5,812 Kg
+
+ + + 40% + + vs bulan kemarin +
+
+
+
+
+
Total Sampah BSI
+
5,812 Kg
+
+ + + 40% + + vs bulan kemarin +
+
+
+
+
+
Total Sampah Offtaker
+
89.4 Kg
+
+ + + 40% + + vs bulan kemarin +
+
+
+
+ +
+ +
+
+
+
+
+ + Sampah Daur Ulang Terkelola (Kg) + +
+ +
+ +
+
+
+ +
+
+
+
+
+
+ + + +@section Scripts { + + +} \ No newline at end of file diff --git a/Views/Main/Dashboard/Bsu.cshtml b/Views/Main/DashboardBsu/Index.cshtml similarity index 83% rename from Views/Main/Dashboard/Bsu.cshtml rename to Views/Main/DashboardBsu/Index.cshtml index d2833a7..dd11642 100644 --- a/Views/Main/Dashboard/Bsu.cshtml +++ b/Views/Main/DashboardBsu/Index.cshtml @@ -4,7 +4,7 @@
- Dashboard BSU <-- Update data --!> + Dashboard BSU
@@ -90,27 +90,6 @@ -
- -
-
-
- - - - - - - - - - - -
NoKategori SampahTotal Berat Sampah(Kg)
-
-
-
- @section Scripts { @@ -126,22 +105,6 @@ 90000, 110000 ]; - $(document).ready(() => { - new DataTable('#example', { - ajax: '/Main/Dashboard/Table', - scrollX: true, - autoWidth: false, - initComplete: () => { - $('div.dt-scroll-body thead').css('visibility', 'collapse'); - }, - columns: [ - { data: null, render: (d, t, r, m) => m.row + 1, orderable: false, searchable: false }, - { data: 'kategori' }, - { data: 'total_berat' }, - ] - }); - }); - // --------------------------------------------------------- // Utility: Create gradient // --------------------------------------------------------- diff --git a/Views/Main/Dashboard/Nasabah.cshtml b/Views/Main/DashboardNasabah/Index.cshtml similarity index 80% rename from Views/Main/Dashboard/Nasabah.cshtml rename to Views/Main/DashboardNasabah/Index.cshtml index e88be4c..f2e0934 100644 --- a/Views/Main/Dashboard/Nasabah.cshtml +++ b/Views/Main/DashboardNasabah/Index.cshtml @@ -8,12 +8,57 @@ + + + + + + + + +
Selamat Datang Ikhdan Nizar Maulana +
+ Status Aktif +
@@ -124,8 +169,9 @@ ]; $(document).ready(() => { + success_modal.showModal(); new DataTable('#example', { - ajax: '/Main/Dashboard/Table', + ajax: '/Main/DashboardNasabah/Table', scrollX: true, autoWidth: false, initComplete: () => { diff --git a/Views/Shared/_SidebarUnified.cshtml b/Views/Shared/_SidebarUnified.cshtml index b602073..81090c0 100644 --- a/Views/Shared/_SidebarUnified.cshtml +++ b/Views/Shared/_SidebarUnified.cshtml @@ -28,7 +28,7 @@
  • - + Dashboard Nasabah @@ -36,12 +36,21 @@
  • - + Dashboard BSU
  • + +
  • + + + Dashboard BSI + +
  • + +
  • diff --git a/wwwroot/images/welcome_modal.svg b/wwwroot/images/welcome_modal.svg new file mode 100644 index 0000000..a531285 --- /dev/null +++ b/wwwroot/images/welcome_modal.svg @@ -0,0 +1,2258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +