From 83ffa580001caef406e6f1138979127d1d5f956a Mon Sep 17 00:00:00 2001 From: rahmagustin Date: Wed, 11 Feb 2026 10:37:07 +0700 Subject: [PATCH] pembaruan halaman admin --- .../Controllers/Admin/DashboardController.php | 16 +- app/Http/Controllers/AduanController.php | 16 +- .../admin/css/vertical-layout-light/style.css | 205 ++++---------- resources/views/admin/index.blade.php | 51 +++- resources/views/user/aduan-tps.blade.php | 2 +- resources/views/user/detail-tps.blade.php | 256 ++++++++---------- 6 files changed, 209 insertions(+), 337 deletions(-) diff --git a/app/Http/Controllers/Admin/DashboardController.php b/app/Http/Controllers/Admin/DashboardController.php index 9663ab0..5aa22f7 100644 --- a/app/Http/Controllers/Admin/DashboardController.php +++ b/app/Http/Controllers/Admin/DashboardController.php @@ -8,8 +8,16 @@ class DashboardController extends Controller { public function index() - { - $title = 'Dashboard Admin'; - return view('admin.index', compact('title')); - } +{ + $totalTps = \App\Models\LokasiTps::count(); + $totalAduan = \App\Models\AduanTps::count(); + $sampahTerbaru = \App\Models\Sampah::orderBy('created_at', 'desc')->first(); + + return view('admin.index', compact( + 'totalTps', + 'totalAduan', + 'sampahTerbaru' + )); +} + } diff --git a/app/Http/Controllers/AduanController.php b/app/Http/Controllers/AduanController.php index 8b6ab29..67b8e2d 100644 --- a/app/Http/Controllers/AduanController.php +++ b/app/Http/Controllers/AduanController.php @@ -8,22 +8,16 @@ class AduanController extends Controller { - /** - * Halaman aduan TPS (user) - */ + public function index(Request $request) { $title = 'Aduan TPS'; - - // TPS terpilih (jika dari detail / SIG) $tps = null; if ($request->filled('tps_id')) { $tps = LokasiTps::with('kategori') ->where('id_tps', $request->tps_id) ->first(); } - - // List TPS untuk dropdown $listTps = LokasiTps::orderBy('nama_tps')->get(); return view('user.aduan-tps', compact( @@ -33,12 +27,8 @@ public function index(Request $request) )); } - /** - * Simpan aduan TPS - */ public function store(Request $request) { - // VALIDASI (FOTO WAJIB) $request->validate([ 'lokasi_tps_id' => 'required|exists:lokasi_tps,id_tps', 'nama_pelapor' => 'required|string|max:100', @@ -52,11 +42,9 @@ public function store(Request $request) 'bukti_foto.image' => 'File harus berupa gambar', ]); - // SIMPAN FOTO $fotoPath = $request->file('bukti_foto') ->store('aduan', 'public'); - // SIMPAN KE DATABASE AduanTps::create([ 'lokasi_tps_id' => $request->lokasi_tps_id, 'nama_pelapor' => $request->nama_pelapor, @@ -64,7 +52,7 @@ public function store(Request $request) 'no_pelapor' => $request->no_pelapor, 'isi_aduan' => $request->isi_aduan, 'bukti_foto' => $fotoPath, - 'tanggal_aduan' => now(), // OTOMATIS + 'tanggal_aduan' => now(), ]); return redirect() diff --git a/public/assets/admin/css/vertical-layout-light/style.css b/public/assets/admin/css/vertical-layout-light/style.css index 0c2575e..a309c49 100644 --- a/public/assets/admin/css/vertical-layout-light/style.css +++ b/public/assets/admin/css/vertical-layout-light/style.css @@ -21970,195 +21970,81 @@ .bg-inverse-dark.breadcrumb-custom .breadcrumb-item:last-child { background: transparent; } -/* Cards */ +/* ===== DASHBOARD CARD (SIG TPS FIX) ===== */ + .card { - box-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - -ms-box-shadow: none; - transition: background 0.25s ease; - -webkit-transition: background 0.25s ease; - -moz-transition: background 0.25s ease; - -ms-transition: background 0.25s ease; + box-shadow: 0 10px 22px rgba(0,0,0,0.08); + transition: all 0.25s ease; border: none; + border-radius: 14px; } -.card.tale-bg { - background: #DAE7FF; -} - -.card.transparent { - background: transparent; -} - -.card .card-body { - padding: 1.25rem 1.25rem; -} - -.card .card-body + .card-body { - padding-top: 1rem; -} - -.card .card-title { - color: #010101; - margin-bottom: 1.2rem; - text-transform: capitalize; - font-size: 1.125rem; - font-weight: 600; -} - -.card .card-subtitle { - font-weight: 400; - margin-top: 0.625rem; - margin-bottom: 0.625rem; -} - -.card .card-description { - margin-bottom: .875rem; - font-weight: 400; - color: #76838f; -} - -.card.card-outline-success { - border: 1px solid #57B657; -} - -.card.card-outline-primary { - border: 1px solid #00A86B; -} - -.card.card-outline-warning { - border: 1px solid #FFC100; -} - -.card.card-outline-danger { - border: 1px solid #FF4747; -} - -.card.card-rounded { - border-radius: 5px; -} - -.card.card-faded { - background: #b5b0b2; - border-color: #b5b0b2; -} - -.card.card-circle-progress { - color: #ffffff; - text-align: center; -} - -.card.card-img-holder { - position: relative; -} - -.card.card-img-holder .card-img-absolute { - position: absolute; - top: 0; - right: 0; - height: 100%; -} - -.card.card-weather .weather-daily .weather-day { - opacity: .5; - font-weight: 900; -} - -.card.card-weather .weather-daily i { - font-size: 20px; -} - -.card.card-weather .weather-daily .weather-temp { - margin-top: .5rem; - margin-bottom: 0; - opacity: .5; - font-size: .75rem; -} - -.card.card-tale { - background: #7DA0FA; - color: #ffffff; -} - -.card.card-tale:hover { - background: #96b2fb; -} - +/* ========================= + TOTAL TPS (HIJAU UTAMA) + ========================= */ .card.card-dark-green { - background: #00A86B; + background: linear-gradient(135deg, #00A86B, #00915d); color: #ffffff; } .card.card-dark-green:hover { - background: #1dbf84; + background: linear-gradient(135deg, #00915d, #007e52); } +.card.card-dark-green p, +.card.card-dark-green small { + color: #ffffff !important; +} + +/* ========================= + TOTAL TPS (KUNING → DIGANTI HIJAU MUDA KONTRAS) + ========================= */ .card.card-light-green { - background: #EFF669; - color: #ffffff; + background: linear-gradient(135deg, #E8F9F1, #BFF0DC); + color: #00A86B; + border: 2px solid #00A86B; } .card.card-light-green:hover { - background: #7fd8a2; + background: linear-gradient(135deg, #D6F5E8, #A6EACF); } +.card.card-light-green p, +.card.card-light-green small { + color: #006f48 !important; + font-weight: 600; +} + +/* ========================= + DATA SAMPAH (ORANYE LOGO) + ========================= */ .card.card-light-danger { - background: #F3797E; + background: linear-gradient(135deg, #FF7A21, #e66a18); color: #ffffff; } .card.card-light-danger:hover { - background: #f59095; + background: linear-gradient(135deg, #e66a18, #cc5f15); } -.card-inverse-primary { - background: rgba(75, 73, 172, 0.2); - border: 1px solid #45439e; - color: #393783; +.card.card-light-danger p, +.card.card-light-danger small { + color: #ffffff !important; } -.card-inverse-secondary { - background: rgba(163, 164, 165, 0.2); - border: 1px solid #969798; - color: #7c7d7d; +/* ========================= + TYPOGRAPHY + ========================= */ +.card .fs-30 { + font-size: 40px; + font-weight: 800; + letter-spacing: 0.5px; } -.card-inverse-success { - background: rgba(87, 182, 87, 0.2); - border: 1px solid #50a750; - color: #428a42; +.card .card-body { + padding: 1.5rem 1.5rem; } -.card-inverse-info { - background: rgba(36, 138, 253, 0.2); - border: 1px solid #217fe9; - color: #1b69c0; -} - -.card-inverse-warning { - background: rgba(255, 193, 0, 0.2); - border: 1px solid #ebb200; - color: #c29300; -} - -.card-inverse-danger { - background: rgba(255, 71, 71, 0.2); - border: 1px solid #eb4141; - color: #c23636; -} - -.card-inverse-light { - background: rgba(248, 249, 250, 0.2); - border: 1px solid #e4e5e6; - color: #bcbdbe; -} - -.card-inverse-dark { - background: rgba(40, 47, 58, 0.2); - border: 1px solid #252b35; - color: #1e242c; -} .data-icon-card-primary { background: #00A86B; @@ -29970,3 +29856,4 @@ @media (max-width: 991px) { /*# sourceMappingURL=../maps/vertical-layout-light/style.css.map */ + diff --git a/resources/views/admin/index.blade.php b/resources/views/admin/index.blade.php index 1f6f9c9..3aa013e 100644 --- a/resources/views/admin/index.blade.php +++ b/resources/views/admin/index.blade.php @@ -5,46 +5,67 @@
-
+

Selamat Datang Admin!

-
All systems are running smoothly! You have 3 unread alerts!
+
Sistem ini membantu admin dalam pengelolaan TPS di Kabupaten Nganjuk
-
+ {{-- TOTAL TPS --}} +
-

Today’s Bookings

-

4006

-

10.00% (30 days)

+

Total TPS

+

+ {{ $totalTps }} +

+
+ + TPS terdaftar di sistem +
-
+ {{-- TOTAL ADUAN TPS --}} +
-

Total Bookings

-

61344

-

22.00% (30 days)

+

Total Aduan TPS

+

+ {{ $totalAduan }} +

+
+ + Aduan dari masyarakat +
-
+ {{-- DATA SAMPAH TERBARU --}} +
-

Number of Meetings

-

34040

-

2.00% (30 days)

+

Data Sampah Terbaru

+

+ {{ number_format($sampahTerbaru->total_sampah ?? 0, 0, ',', '.') }} +

+ + Total sampah (Ton)
+ Update terakhir: + {{ $sampahTerbaru ? \Carbon\Carbon::parse($sampahTerbaru->created_at)->translatedFormat('d M Y') : '-' }} +
+
+
@endsection diff --git a/resources/views/user/aduan-tps.blade.php b/resources/views/user/aduan-tps.blade.php index 4239694..4dcfb24 100644 --- a/resources/views/user/aduan-tps.blade.php +++ b/resources/views/user/aduan-tps.blade.php @@ -42,7 +42,7 @@