From b6a88fd2f872d113311ff4e9cc6d5c163a742f90 Mon Sep 17 00:00:00 2001 From: rahmagustin Date: Thu, 25 Dec 2025 13:32:57 +0700 Subject: [PATCH] detail tps --- app/Http/Controllers/SigController.php | 63 ++++- resources/views/user/detail-tps.blade.php | 71 ++++++ resources/views/user/sig-tps.blade.php | 285 ++++++++-------------- routes/web.php | 6 +- 4 files changed, 235 insertions(+), 190 deletions(-) create mode 100644 resources/views/user/detail-tps.blade.php diff --git a/app/Http/Controllers/SigController.php b/app/Http/Controllers/SigController.php index 619a4c4..e6d32f2 100644 --- a/app/Http/Controllers/SigController.php +++ b/app/Http/Controllers/SigController.php @@ -4,11 +4,68 @@ use Illuminate\Http\Request; -class SigController extends Controller +class SIGController extends Controller { public function index() { - $title = 'User SIG'; - return view('user.sig-tps', compact('title')); + $tps = [ + [ + 'id' => 1, + 'nama' => 'TPS Berbek', + 'jenis' => 'TPS', + 'alamat' => 'Kecamatan Berbek', + 'lat' => -7.5978, + 'lng' => 111.917 + ], + [ + 'id' => 2, + 'nama' => 'TPS 3R Loceret', + 'jenis' => 'TPS 3R', + 'alamat' => 'Kecamatan Loceret', + 'lat' => -7.6280, + 'lng' => 111.910 + ], + [ + 'id' => 3, + 'nama' => 'TPA Nganjuk', + 'jenis' => 'TPA', + 'alamat' => 'Kabupaten Nganjuk', + 'lat' => -7.6140, + 'lng' => 111.900 + ] + ]; + + return view('user.sig-tps', compact('tps')); + } + + public function show($id) + { + $data = [ + 1 => [ + 'nama' => 'TPS Berbek', + 'jenis' => 'TPS', + 'alamat' => 'Kecamatan Berbek', + 'foto' => '/img/tps/berbek.jpg', + 'keterangan' => 'TPS aktif melayani wilayah Berbek' + ], + 2 => [ + 'nama' => 'TPS 3R Loceret', + 'jenis' => 'TPS 3R', + 'alamat' => 'Kecamatan Loceret', + 'foto' => '/img/tps/loceret.jpg', + 'keterangan' => 'TPS dengan sistem 3R' + ], + 3 => [ + 'nama' => 'TPA Nganjuk', + 'jenis' => 'TPA', + 'alamat' => 'Kabupaten Nganjuk', + 'foto' => '/img/tps/tpa-nganjuk.jpg', + 'keterangan' => 'Tempat Pemrosesan Akhir Kabupaten Nganjuk' + ] + ]; + + return view('user.detail-tps', [ + 'tps' => $data[$id] + ]); } } diff --git a/resources/views/user/detail-tps.blade.php b/resources/views/user/detail-tps.blade.php new file mode 100644 index 0000000..72cb89f --- /dev/null +++ b/resources/views/user/detail-tps.blade.php @@ -0,0 +1,71 @@ +@extends('user.template') + +@section('content') + +
+
+

Detail TPS

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

Sistem Informasi Geografis Tempat Pembuangan Sampah di Kabupaten Nganjuk

+ + +
+ +
+ +

Sistem Informasi Geografis yang menampilkan visualisasi lokasi Tempat + Pembuangan Sampah di Kabupaten Nganjuk secara mudah, cepat, dan interaktif.

+ +
+ +

Peta Interaktif Lokasi TPS

+
+

Peta digital yang memudahkan pengguna menemukan lokasi TPS terdekat, lengkap dengan tampilan + yang intuitif sehingga informasi dapat diakses dengan cepat dan jelas.

+ +
+ +

Informasi TPS Lengkap

+
+

Menyajikan berbagai informasi penting seperti kapasitas, kondisi, status, hingga jenis + pengelolaan TPS, sehingga pengguna dapat memahami keadaan TPS secara menyeluruh.

+ +
+ +

Layanan Aduan TPS

+
+

Fitur yang memungkinkan masyarakat menyampaikan keluhan atau laporan terkait TPS dengan + mudah, membantu pemerintah dalam memperbaiki serta meningkatkan pengelolaan sampah.

+ +
+
+ +
+ +
+ +
+ +
+@endsection diff --git a/resources/views/user/sig-tps.blade.php b/resources/views/user/sig-tps.blade.php index c4847bb..3b670df 100644 --- a/resources/views/user/sig-tps.blade.php +++ b/resources/views/user/sig-tps.blade.php @@ -1,121 +1,69 @@ @extends('user.template') @section('content') + + - - - + + +
+
+

Sebaran TPS di Kabupaten Nganjuk

+ +
+
- #mapTPS { - width: 100%; - height: 450px; - } - - /* FIX Z-INDEX */ - .leaflet-top, - .leaflet-bottom { - z-index: 400 !important; - } - - #header { - z-index: 1000 !important; - position: sticky; - top: 0; - } - - /* POPUP */ - .leaflet-popup-content-wrapper { - border-radius: 12px; - } - - /* ================= LEGEND ================= */ - .map-legend { - background: #fff; - padding: 10px 14px; - border-radius: 10px; - box-shadow: 0 4px 14px rgba(0,0,0,.15); - font-size: 13px; - line-height: 1.6; - } - - .map-legend h6 { - margin: 0 0 6px 0; - font-size: 14px; - font-weight: 600; - } - - .legend-item { - display: flex; - align-items: center; - gap: 8px; - margin-bottom: 4px; - } - - .legend-color { - width: 14px; - height: 14px; - border-radius: 50%; - } - - - -
-
-

Sebaran TPS Kabupaten Nganjuk

- -
-
- - -
-
-
+
+
-
-
+ - - + }); + @endsection diff --git a/routes/web.php b/routes/web.php index 7f09bec..cf2dae2 100644 --- a/routes/web.php +++ b/routes/web.php @@ -8,7 +8,11 @@ Route::get('/index', [IndexController::class, 'index'])->name('user.index'); Route::get('/about', [AboutController::class, 'index'])->name('user.about'); Route::get('/about-tps', [AboutController::class, 'tps'])->name('user.about-tps'); -Route::get('/sig-tps', [SigController::class, 'index'])->name('user.sig-tps'); +Route::get('/sig-tps', [SIGController::class, 'index']) + ->name('user.sig-tps'); + +Route::get('/tps/{id}', [SIGController::class, 'show']) + ->name('user.detail-tps'); Route::get('/', function () { return view('welcome');