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 @@ -
-
-
-
-

Top Products

-
-
- -
-
-
-
    -
  • -
    -
    -
    - image -
    -
    -
    Organic Cream
    -

    789 Item

    -
    -
    -
    -
  • -
  • -
    -
    -
    - image -
    -
    -
    Rain Umbrella
    -

    657 Item

    -
    -
    -
    -
  • -
  • -
    -
    -
    - image -
    -
    -
    Serum Bottle
    -

    489 Item

    -
    -
    -
    -
  • -
  • -
    -
    -
    - image -
    -
    -
    Organic Cream
    -

    468 Item

    -
    -
    -
    -
  • -
-
-
-
-
-
-
-
-

Best Item All Time

-
-
-
View All
-
-
-
-
-
-
-
- image -
-
-
Coffee Beans Packet
-

Total Sell : 45897

-

Total Earned : $45,89 M

-
-
-
-
-
-
-
-
- image -
-
-
Bottle Cup Set
-

Total Sell : 44359

-

Total Earned : $45,50 M

-
-
-
-
-
-
-
-
-
-
-

Income

-
$ 98,7800 K
-
-
- -
-
-
-
-
-
-
-
-
-

Expenses

-
$ 45,8956 K
-
-
- -
-
-
-
-
-
-
-
-
-
-

Order Summary

-
-
- -
-
-
-
-
-
- - - - - - -
46%
-
-
-
$12,6598
-

Average Orders

-
-
-
-
- - - - - - -
46%
-
-
-
$59,8478
-

Top Orders

-
-
-
-
-
-
-
-
-
@@ -340,28 +110,44 @@ {{-- Script MAP --}} + + + + \ No newline at end of file diff --git a/resources/views/Admin/dashboardEditKecamatan.blade.php b/resources/views/Admin/dashboardEditKecamatan.blade.php index 653397f..96f7d6d 100644 --- a/resources/views/Admin/dashboardEditKecamatan.blade.php +++ b/resources/views/Admin/dashboardEditKecamatan.blade.php @@ -6,7 +6,7 @@
-

Add Sale

+

Ubah Data Kecamatan

diff --git a/resources/views/Admin/dashboardEditKlaster.blade.php b/resources/views/Admin/dashboardEditKlaster.blade.php index ffbc713..bc0a05e 100644 --- a/resources/views/Admin/dashboardEditKlaster.blade.php +++ b/resources/views/Admin/dashboardEditKlaster.blade.php @@ -6,7 +6,7 @@
-

Ubah Data Klaster {{ $klaster->nama_klaster }}

+

Ubah Data Klaster

@@ -35,7 +35,7 @@
- +
diff --git a/resources/views/Admin/dashboardListCuranmor.blade.php b/resources/views/Admin/dashboardListCuranmor.blade.php index c3a8522..85a399c 100644 --- a/resources/views/Admin/dashboardListCuranmor.blade.php +++ b/resources/views/Admin/dashboardListCuranmor.blade.php @@ -6,8 +6,8 @@

Daftar Kasus Pencurian Kendaraan Bermotor (CURANMOR)

-

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

Tambah Kasus Curanmor
diff --git a/resources/views/Admin/dashboardListCuras.blade.php b/resources/views/Admin/dashboardListCuras.blade.php index 7753e0d..a6e22c5 100644 --- a/resources/views/Admin/dashboardListCuras.blade.php +++ b/resources/views/Admin/dashboardListCuras.blade.php @@ -6,8 +6,8 @@

Daftar Kasus Pencurian Dengan Kekerasan (CURAS)

-

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

Tambah Kasus Curas
diff --git a/resources/views/Admin/dashboardListKecamatan.blade.php b/resources/views/Admin/dashboardListKecamatan.blade.php index 3ca774f..332b7d0 100644 --- a/resources/views/Admin/dashboardListKecamatan.blade.php +++ b/resources/views/Admin/dashboardListKecamatan.blade.php @@ -34,7 +34,7 @@ - id + No Nama Kecamatan Action diff --git a/resources/views/Admin/dashboardListKlaster.blade.php b/resources/views/Admin/dashboardListKlaster.blade.php index dd7bb8b..8198cb7 100644 --- a/resources/views/Admin/dashboardListKlaster.blade.php +++ b/resources/views/Admin/dashboardListKlaster.blade.php @@ -6,10 +6,10 @@

Daftar Klaster

-

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

- Add Sale + Tambah Klaster
@if (session()->has('succes')) diff --git a/resources/views/Admin/dashboardMapCuranmor.blade.php b/resources/views/Admin/dashboardMapCuranmor.blade.php new file mode 100644 index 0000000..67192df --- /dev/null +++ b/resources/views/Admin/dashboardMapCuranmor.blade.php @@ -0,0 +1,71 @@ + +
+ +
+ + +
+ + + + + +
+
\ No newline at end of file diff --git a/resources/views/Admin/dashboardMapCuras.blade.php b/resources/views/Admin/dashboardMapCuras.blade.php index 30f1626..f2eed1f 100644 --- a/resources/views/Admin/dashboardMapCuras.blade.php +++ b/resources/views/Admin/dashboardMapCuras.blade.php @@ -7,7 +7,7 @@