diff --git a/app/Http/Controllers/DataPresisiPanganController.php b/app/Http/Controllers/DataPresisiPanganController.php index e614e8a5..0f4f10b7 100644 --- a/app/Http/Controllers/DataPresisiPanganController.php +++ b/app/Http/Controllers/DataPresisiPanganController.php @@ -13,6 +13,17 @@ public function index() return view('data_pokok.data_presisi.pangan.index', compact('title')); } + public function detailData() + { + $colomn = ''; + $title = 'Data Presisi Pangan '.request('judul'); + $filter = request('filter'); + if($filter['tipe'] && $filter['nilai']){ + $colomn = $filter['tipe'].':'.$filter['nilai']; + } + return view('data_pokok.data_presisi.pangan.detail_data', compact('title', 'colomn')); + } + public function detail(Request $request) { $data = json_decode($request->data); diff --git a/app/Http/Controllers/StatistikPanganController.php b/app/Http/Controllers/StatistikPanganController.php index 46228e03..51d40ec3 100644 --- a/app/Http/Controllers/StatistikPanganController.php +++ b/app/Http/Controllers/StatistikPanganController.php @@ -7,7 +7,7 @@ class StatistikPanganController extends Controller public function index() { return view('presisi.statistik.pangan', [ - 'detailLink' => url(''), + 'detailLink' => url('data-presisi/pangan/detail_data'), 'judul' => 'Pangan' ]); } diff --git a/resources/views/components/filter-tahun.blade.php b/resources/views/components/filter-tahun.blade.php index f23a189c..37fe3266 100644 --- a/resources/views/components/filter-tahun.blade.php +++ b/resources/views/components/filter-tahun.blade.php @@ -3,10 +3,11 @@ @php $currentYear = date('Y'); $startYear = $currentYear - 5; + $selectedYear = $selectedYear ?? $currentYear; @endphp @for($year = $currentYear; $year >= $startYear; $year--) - + @endfor \ No newline at end of file diff --git a/resources/views/data_pokok/data_presisi/pangan/detail_data.blade.php b/resources/views/data_pokok/data_presisi/pangan/detail_data.blade.php new file mode 100644 index 00000000..e4c07119 --- /dev/null +++ b/resources/views/data_pokok/data_presisi/pangan/detail_data.blade.php @@ -0,0 +1,218 @@ +@extends('layouts.index') + +@section('title', $title) + +@section('content_header') +

{{ $title }}

+@stop + +@section('content') +@include('partials.breadcrumbs') + +
+
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NONIKNOMOR KKNAMAJENIS LAHANLUAS LAHANLUAS TANAMSTATUS LAHANKOMODITI UTAMA TANAMAN PANGANKOMODITI TANAMAN PANGAN LAINNYAJUMLAH BERDASARKAN JENIS KOMODITIUSIA KOMODITIJENIS PETERNAKANJUMLAH POPULASIJENIS PERIKANANFREKWENSI MAKANAN PERHARIFREKWENSI KONSUMSI SAYUR PERHARIFREKWENSI KONSUMSI BUAH PERHARIFREKWENSI KONSUMSI DAGING PERHARILONGITUDELATITUDETANGGAL PENGISIANSTATUS PENGISIAN
+
+
+
+
+
+@endsection + +@section('js') + +@endsection \ No newline at end of file diff --git a/resources/views/data_pokok/data_presisi/pangan/index.blade.php b/resources/views/data_pokok/data_presisi/pangan/index.blade.php index 4b799bfe..fcf1b08b 100644 --- a/resources/views/data_pokok/data_presisi/pangan/index.blade.php +++ b/resources/views/data_pokok/data_presisi/pangan/index.blade.php @@ -28,7 +28,7 @@
- +
diff --git a/resources/views/presisi/statistik/pangan.blade.php b/resources/views/presisi/statistik/pangan.blade.php index db8c577e..0f604936 100644 --- a/resources/views/presisi/statistik/pangan.blade.php +++ b/resources/views/presisi/statistik/pangan.blade.php @@ -5,463 +5,461 @@ @section('title', 'Data Statistik') @section('content_header') -

Data Statistik {{ $judul }}

+

Data Statistik {{ $judul }}

@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 + // Event listener for year filter change + $('#filter-tahun').on('change', function() { + statistik.ajax.reload(); + }); + $(document).on('click', '#reset', function(e) { + e.preventDefault(); + statistik.ajax.reload(); + }); + }); + +@endsection +@push('css') + +@endpush \ No newline at end of file diff --git a/resources/views/presisi/statistik/senibudaya.blade.php b/resources/views/presisi/statistik/senibudaya.blade.php index 50e0e0f5..44506d8a 100644 --- a/resources/views/presisi/statistik/senibudaya.blade.php +++ b/resources/views/presisi/statistik/senibudaya.blade.php @@ -389,7 +389,7 @@ className: 'dt-body-right', urlDetail.searchParams.set('nama', nilai); urlDetail.searchParams.set('tipe', $('.pilih-kategori > a.active').text().trim()); urlDetail.searchParams.set('chart-view', true); - + return `${nilai}` } diff --git a/routes/web.php b/routes/web.php index 78851184..013484a9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -316,6 +316,7 @@ Route::prefix('pangan')->group(function () { Route::get('/', [App\Http\Controllers\DataPresisiPanganController::class, 'index'])->name('data-pokok.data-presisi-pangan.index'); Route::get('/detail', [App\Http\Controllers\DataPresisiPanganController::class, 'detail'])->name('data-pokok.data-presisi-pangan.detail'); + Route::get('detail_data', [App\Http\Controllers\DataPresisiPanganController::class, 'detailData'])->name('data-pokok.data-presisi-pangan.detail_data'); Route::get('cetak', [App\Http\Controllers\DataPresisiPanganController::class, 'cetak'])->name('data-pokok.data-presisi-pangan.cetak'); }) ->middleware(['permission:datapresisi-pangan-read']);