diff --git a/app/Http/Controllers/MapController.php b/app/Http/Controllers/MapController.php index d476abf..d6561a7 100644 --- a/app/Http/Controllers/MapController.php +++ b/app/Http/Controllers/MapController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Models\Curas; +use App\Models\Curanmor; use Illuminate\Http\Request; class MapController extends Controller @@ -10,48 +11,33 @@ class MapController extends Controller /** * Display a listing of the resource. */ - public function index() + public function mapCuras() { $data = Curas::with(['punyaKecamatanCuras', 'punyaKlasterCuras'])->get()->map(function ($item) { return [ - 'kecamatan' => $item->punyaKecamatanCuras->nama_kecamatan, // pastikan nama kolom benar + 'kecamatan' => $item->punyaKecamatanCuras->nama_kecamatan, 'jumlah_curas' => $item->jumlah_curas, - 'klaster' => $item->punyaKlasterCuras?->warna ?? '#cccccc' // fallback warna abu-abu jika tidak ada + 'klaster' => $item->punyaKlasterCuras?->nama_klaster ?? 'Tidak Diketahui', + 'warna' => $item->punyaKlasterCuras?->warna ?? '#cccccc' // warna tetap dipakai untuk pewarnaan peta + ]; + }); + return response()->json($data); + + } + + // CuranmorController.php + public function mapCuranmor() + { + $data = Curanmor::with(['punyaKecamatanCuranmor', 'punyaKlasterCuranmor'])->get()->map(function ($item) { + return [ + 'kecamatan' => $item->punyaKecamatanCuranmor->nama_kecamatan, + 'jumlah_curanmor' => $item->jumlah_curanmor, + 'klaster' => $item->punyaKlasterCuranmor?->nama_klaster ?? 'Tidak diketahui', + 'warna' => $item->punyaKlasterCuranmor?->warna ?? '#cccccc' ]; }); return response()->json($data); } - /** - * Store a newly created resource in storage. - */ - public function store(Request $request) - { - // - } - - /** - * Display the specified resource. - */ - public function show(string $id) - { - // - } - - /** - * Update the specified resource in storage. - */ - public function update(Request $request, string $id) - { - // - } - - /** - * Remove the specified resource from storage. - */ - public function destroy(string $id) - { - // - } } diff --git a/public/assets/images/logo_polije.png b/public/assets/images/logo_polije.png new file mode 100644 index 0000000..80c1c48 Binary files /dev/null and b/public/assets/images/logo_polije.png differ diff --git a/public/assets/images/user/admin-daffa.jpeg b/public/assets/images/user/admin-daffa.jpeg new file mode 100644 index 0000000..9abfb16 Binary files /dev/null and b/public/assets/images/user/admin-daffa.jpeg differ diff --git a/resources/views/Admin/dashboardAdmin.blade.php b/resources/views/Admin/dashboardAdmin.blade.php index c615010..a3ae6c3 100644 --- a/resources/views/Admin/dashboardAdmin.blade.php +++ b/resources/views/Admin/dashboardAdmin.blade.php @@ -85,15 +85,16 @@
@@ -102,237 +103,6 @@ -789 Item
-657 Item
-489 Item
-468 Item
-Total Sell : 45897
-Total Earned : $45,89 M
-Total Sell : 44359
-Total Earned : $45,50 M
-Income
-Expenses
-Average Orders
-Top Orders
-Sales enables you to effectively control sales KPIs and monitor them in one central
- place while helping teams to reach sales goals.
Berikut ini merupakan data kasus Pencurian Kendaraan Bermotor (CURANMOR) pada
+ masing masing kecamatan di Kabupaten Probolinggo
Sales enables you to effectively control sales KPIs and monitor them in one central
- place while helping teams to reach sales goals.
Berikut ini merupakan data kasus Pencurian Dengan Kekerasan (CURAS) pada
+ masing masing kecamatan di Kabupaten Probolinggo
Sales enables you to effectively control sales KPIs and monitor them in one central
- place while helping teams to reach sales goals.
Berikut merupakan data Klaster atau Kategori yang dijadikan sebagai acuan pemetaan.
+ Ingat dalam pengisian data klaster, kategori aman atau rendah dimulai dari id 1