From 95af8e3a8f8e89140468ea4f9a4d3becb0ae657b Mon Sep 17 00:00:00 2001 From: Ahmad Afandi Date: Tue, 25 Nov 2025 13:40:15 +0700 Subject: [PATCH 1/4] Penambahan statistik pengisian sandang --- app/Enums/Modul.php | 27 +- app/Helpers/general.php | 2 +- .../StatistikSandangController.php | 14 + public/assets/costume/css/admin.css | 12 + .../views/presisi/statistik/sandang.blade.php | 491 ++++++++++++++++++ routes/web.php | 4 + 6 files changed, 546 insertions(+), 4 deletions(-) create mode 100644 app/Http/Controllers/StatistikSandangController.php create mode 100644 resources/views/presisi/statistik/sandang.blade.php diff --git a/app/Enums/Modul.php b/app/Enums/Modul.php index 77d2e8d03..ccf0afb66 100644 --- a/app/Enums/Modul.php +++ b/app/Enums/Modul.php @@ -14,7 +14,10 @@ final class Modul extends Enum { const permision = [ - 'read', 'write', 'edit', 'delete', + 'read', + 'write', + 'edit', + 'delete', ]; const Menu = [ @@ -105,6 +108,24 @@ final class Modul extends Enum 'icon' => 'fa fa-chart-pie', 'permission' => 'datapresisi', 'submenu' => [ + [ + 'text' => 'Statistik', + 'icon' => 'fa fa-chart-pie', + 'submenu' => [ + [ + 'icon' => 'far fa-fw fa-circle', + 'text' => 'Pangan', + 'url' => 'data-presisi/statistik/pangan', + 'permission' => 'statistik-datapresisi-pangan', + ], + [ + 'icon' => 'far fa-fw fa-circle', + 'text' => 'Sandang', + 'url' => 'data-presisi/statistik/sandang', + 'permission' => 'statistik-datapresisi-sandang', + ] + ] + ], [ 'icon' => 'far fa-fw fa-circle', 'text' => 'Data Presisi Pangan', @@ -349,8 +370,8 @@ final class Modul extends Enum [ 'text' => 'Aktivasi OTP dan 2FA', 'icon' => 'far fa-fw fa-circle', - 'url' => 'pengaturan/otp', - ] + 'url' => 'pengaturan/otp', + ] ], ], ]; diff --git a/app/Helpers/general.php b/app/Helpers/general.php index e2bd7d99d..0a5c87d65 100644 --- a/app/Helpers/general.php +++ b/app/Helpers/general.php @@ -770,7 +770,7 @@ function convertMenu($menu, $parentId = null, &$idCounter = 1) 'text' => $menu['text'] ?? 'text', 'href' => $menu['url'] ?? null, 'icon' => $menu['icon'], - 'permission' => $menu['permission'], + 'permission' => $menu['permission'] ?? null, ]; if (isset($menu['submenu']) && is_array($menu['submenu'])) { diff --git a/app/Http/Controllers/StatistikSandangController.php b/app/Http/Controllers/StatistikSandangController.php new file mode 100644 index 000000000..81a04524e --- /dev/null +++ b/app/Http/Controllers/StatistikSandangController.php @@ -0,0 +1,14 @@ + url(''), + 'judul' => 'Sandang' + ]); + } +} diff --git a/public/assets/costume/css/admin.css b/public/assets/costume/css/admin.css index c89e92b95..6d33c1332 100644 --- a/public/assets/costume/css/admin.css +++ b/public/assets/costume/css/admin.css @@ -552,3 +552,15 @@ tr.shown td.details-control { .pl-50 { padding-left: 50px } + +/* Add padding left for nested submenu levels */ +.nav-treeview .nav-treeview { + padding-left: 5px !important; +} +.nav-treeview .nav-item { + padding-left: 5px !important; +} + +.has-treeview .has-treeview { + padding-left: 5px !important; +} \ No newline at end of file diff --git a/resources/views/presisi/statistik/sandang.blade.php b/resources/views/presisi/statistik/sandang.blade.php new file mode 100644 index 000000000..b1375d561 --- /dev/null +++ b/resources/views/presisi/statistik/sandang.blade.php @@ -0,0 +1,491 @@ +@extends('layouts.index') + +@section('plugins.chart', true) + +@section('title', 'Data Statistik') + +@section('content_header') +

Data Statistik {{ $judul }}

+@stop + +@section('content') + @include('partials.breadcrumbs') +
+
+
+
+

Statistik {{ $judul }}

+
+ +
+
+
+ +
+
+
+
+
+
+
+

+
+
+
+ + + +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ + + + + + + + + +
NoNilaiJumlah
+
+
+
+
+
+@endsection + +@section('js') + + @include('statistik.chart') + +@endsection +@push('css') + +@endpush diff --git a/routes/web.php b/routes/web.php index 62c4cc6e7..845180f94 100644 --- a/routes/web.php +++ b/routes/web.php @@ -311,6 +311,10 @@ Route::get('cetak', [App\Http\Controllers\DataPresisiAdatController::class, 'cetak'])->name('data-pokok.data-presisi-adat.cetak'); }) ->middleware(['permission:datapresisi-adat-read']); + + Route::prefix('statistik')->group(function () { + Route::get('sandang', [App\Http\Controllers\StatistikSandangController::class, 'index']); + }); }); // Prodeskel From 850729bf88cbd4dabaa84303e385d033dea1018b Mon Sep 17 00:00:00 2001 From: Ahmad Afandi Date: Tue, 25 Nov 2025 13:50:53 +0700 Subject: [PATCH 2/4] perbaikan default kategori statistik --- .../views/presisi/statistik/sandang.blade.php | 39 +++---------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/resources/views/presisi/statistik/sandang.blade.php b/resources/views/presisi/statistik/sandang.blade.php index b1375d561..18dc0612a 100644 --- a/resources/views/presisi/statistik/sandang.blade.php +++ b/resources/views/presisi/statistik/sandang.blade.php @@ -40,12 +40,7 @@ - -
- -
+