diff --git a/.gitignore b/.gitignore index 5615236f..0e7b63b7 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ package-lock.json /playwright-report/ .env.e2e /template_ai/ +AGENTS.md diff --git a/app/Http/Controllers/DataPresisiPapanController.php b/app/Http/Controllers/DataPresisiPapanController.php new file mode 100644 index 00000000..3f4450e4 --- /dev/null +++ b/app/Http/Controllers/DataPresisiPapanController.php @@ -0,0 +1,29 @@ +input('judul'); + $title = htmlspecialchars(strip_tags($title), ENT_QUOTES, 'UTF-8'); + $filter = $request->input('filter'); + + if (isset($filter['tipe'], $filter['nilai']) && $filter['tipe'] && $filter['nilai']) { + $colomn = $filter['tipe'] . ':' . $filter['nilai']; + } + + return view('data_pokok.data_presisi.papan.detail_data', compact('title', 'colomn')); + } +} diff --git a/app/Http/Controllers/StatistikPapanController.php b/app/Http/Controllers/StatistikPapanController.php index cab69a9f..2dc5bf78 100644 --- a/app/Http/Controllers/StatistikPapanController.php +++ b/app/Http/Controllers/StatistikPapanController.php @@ -7,7 +7,7 @@ class StatistikPapanController extends Controller public function index() { return view('presisi.statistik.papan', [ - 'detailLink' => url(''), + 'detailLink' => url('data-presisi/papan/detail_data'), 'judul' => 'Papan' ]); } diff --git a/resources/views/data_pokok/data_presisi/papan/detail_data.blade.php b/resources/views/data_pokok/data_presisi/papan/detail_data.blade.php new file mode 100644 index 00000000..08efef40 --- /dev/null +++ b/resources/views/data_pokok/data_presisi/papan/detail_data.blade.php @@ -0,0 +1,184 @@ +@extends('layouts.index') + +@section('title', $title) + +@section('content_header') +

{{ html_entity_decode($title) }}

+@stop + +@section('content') +@include('partials.breadcrumbs') + +
+
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
NONIKNOMOR KKNAMASTATUS KEPEMILIKANLUAS LANTAI (M²)JENIS LANTAIJENIS DINDINGSUMBER AIR MINUMSUMBER PENERANGANDAYA TERPASANGDAYA TERPASANG 2DAYA TERPASANG 3TANGGAL PENGISIANSTATUS PENGISIAN
+
+
+
+
+
+@endsection + +@section('js') + +@endsection \ No newline at end of file diff --git a/resources/views/presisi/statistik/papan.blade.php b/resources/views/presisi/statistik/papan.blade.php index f51af8e3..50c1d0df 100644 --- a/resources/views/presisi/statistik/papan.blade.php +++ b/resources/views/presisi/statistik/papan.blade.php @@ -9,365 +9,364 @@ @stop @section('content') - @include('partials.breadcrumbs') -
-
-
-
-

Statistik {{ $judul }}

-
- -
-
-
- +@include('partials.breadcrumbs') +
+
+
+
+

Statistik {{ $judul }}

+
+
+
+ +
-
-
-
-
-

+
+
+
+
+
+

+
+
+ +
+
-
- -
- -
-
- -
-
- -
+
+ +
+
+
-
-
-
-
-
- -
-
+
+
+
+
+
+
+
+
+
-
-
- -
-
+
+
+
+
+
-
- - - - - - - - - -
NoNilaiJumlah
-
+
+ + + + + + + + + +
NoNilaiJumlah
+
@endsection @section('js') - - @include('statistik.chart') - +@include('statistik.chart') + + }); + @endsection @push('css') - + @endpush \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 3572c6aa..d3e882cf 100644 --- a/routes/web.php +++ b/routes/web.php @@ -331,6 +331,11 @@ Route::get('cetak', [App\Http\Controllers\DataPresisiPanganController::class, 'cetak'])->name('data-pokok.data-presisi-pangan.cetak'); }) ->middleware(['permission:datapresisi-pangan-read']); + + Route::prefix('papan')->group(function () { + Route::get('detail_data', [App\Http\Controllers\DataPresisiPapanController::class, 'detailData'])->name('data-pokok.data-presisi-papan.detail_data'); + }) + ->middleware(['permission:datapresisi-papan-read']); Route::prefix('sandang')->group(function () { Route::get('detail_data', [App\Http\Controllers\DataPresisiSandangController::class, 'detailData'])->name('data-pokok.data-presisi-sandang.detail_data'); diff --git a/tests/Feature/DataPresisiPapanControllerTest.php b/tests/Feature/DataPresisiPapanControllerTest.php new file mode 100644 index 00000000..4a7ff597 --- /dev/null +++ b/tests/Feature/DataPresisiPapanControllerTest.php @@ -0,0 +1,40 @@ +actingAsAdmin($user) + ->get(route('data-pokok.data-presisi-papan.detail_data', [ + 'judul' => 'Test Judul', + 'filter' => [ + 'tipe' => 'test_tipe', + 'nilai' => 'test_nilai' + ] + ])); + + $response->assertStatus(200); + $response->assertViewIs('data_pokok.data_presisi.papan.detail_data'); + } + + public function test_detail_data_returns_success_without_filter() + { + $user = User::first(); + $response = $this->actingAsAdmin($user) + ->get(route('data-pokok.data-presisi-papan.detail_data', [ + 'judul' => 'Test Judul Tanpa Filter' + ])); + + $response->assertStatus(200); + $response->assertViewIs('data_pokok.data_presisi.papan.detail_data'); + } +} \ No newline at end of file