Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions app/Http/Controllers/DataPresisiKesehatanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace App\Http\Controllers;

use App\Http\Requests\DetailDataKesehatanRequest;
use Illuminate\Http\Request;
use Illuminate\View\View;

class DataPresisiKesehatanController extends Controller
{
Expand All @@ -24,4 +26,26 @@ public function cetak(Request $request)
{
return view('data_pokok.data_presisi.kesehatan.cetak', ['filter' => $request->getQueryString()]);
}

public function detailData(DetailDataKesehatanRequest $request): View
{
$title = $request->filled('judul') ? htmlspecialchars(strip_tags($request->input('judul'))) : '';

$colomn = '';

$filter = $request->input('filter');
$tipe = $request->input('tipe');
$nilai = $request->input('filter.nilai');

if (is_array($filter) && isset($filter['tipe'], $filter['nilai']) && $filter['tipe'] !== '' && $filter['nilai'] !== '') {
$colomn = $filter['tipe'] . ':' . $filter['nilai'];
} elseif ($tipe && $nilai) {
$colomn = $tipe . ':' . $nilai;
}

return view('data_pokok.data_presisi.kesehatan.detail_data', [
'title' => $title,
'colomn' => $colomn,
]);
}
}
6 changes: 3 additions & 3 deletions app/Http/Controllers/StatistikKesehatanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

class StatistikKesehatanController extends Controller
{
public function index()
public function index(): \Illuminate\View\View
{
return view('presisi.statistik.kesehatan', [
'detailLink' => url(''),
'judul' => 'Kesehatan'
'detailLink' => url('data-presisi/kesehatan/detail_data'),
'judul' => 'Kesehatan'
]);
}
}
24 changes: 24 additions & 0 deletions app/Http/Requests/DetailDataKesehatanRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class DetailDataKesehatanRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}

public function rules(): array
{
return [
'judul' => 'nullable|string',
'filter' => 'nullable|array',
'filter.tipe' => 'nullable|string',
'filter.nilai' => 'nullable|string',
'tipe' => 'nullable|string',
];
}
}
9 changes: 5 additions & 4 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ Di rilis ini, versi 2605.0.1 berisi penambahan dan perbaikan yang diminta penggu
4. [#1002](https://github.com/OpenSID/OpenKab/issues/1002) Buat Halaman Detail Pendidikan di Statistik Presisi
5. [#1001](https://github.com/OpenSID/OpenKab/issues/1001) Buat Halaman Detail Ketenagakerjaan di Statistik Presisi
6. [#1000](https://github.com/OpenSID/OpenKab/issues/1000) Buat Halaman Detail Keagamaan di Statistik Presisi
7. [#1000](https://github.com/OpenSID/OpenKab/issues/1000) Buat Halaman Detail Jaminan Sosial di Statistik Presisi
8. [#1021](https://github.com/OpenSID/OpenKab/issues/1021) Ubah field isi artikel menjadi rich editor
9. [#1025](https://github.com/OpenSID/OpenKab/issues/1025) Arahkan/Infokan pembuatan kategori artikel ketika kategori kosong saat membuat artikel opensid
10. [#1031](https://github.com/OpenSID/OpenKab/issues/1031) Arahkan/Infokan pembuatan kategori artikel ketika kategori kosong saat membuat artikel di pengaturan web -> artikel
7. [#999](https://github.com/OpenSID/OpenKab/issues/999) Buat Halaman Detail Jaminan Sosial di Statistik Presisi
8. [#998](https://github.com/OpenSID/OpenKab/issues/998) Buat Halaman Detail Kesehatan di Statistik Presisi
9. [#1021](https://github.com/OpenSID/OpenKab/issues/1021) Ubah field isi artikel menjadi rich editor
10. [#1025](https://github.com/OpenSID/OpenKab/issues/1025) Arahkan/Infokan pembuatan kategori artikel ketika kategori kosong saat membuat artikel opensid
11. [#1031](https://github.com/OpenSID/OpenKab/issues/1031) Arahkan/Infokan pembuatan kategori artikel ketika kategori kosong saat membuat artikel di pengaturan web -> artikel



Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
@extends('layouts.index')

@section('title', $title)

@section('content_header')
<h1>{{ $title }}</h1>
@stop

@section('content')
@include('partials.breadcrumbs')

<div class="row">
<div class="col-lg-12">
<div class="card card-outline card-primary">
<div class="card-header">
<div class="row">
<x-filter-tahun :selectedYear="request('tahun')" />
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped" id="detail-kesehatan">
<thead>
<tr>
<th>NO</th>
<th>NIK</th>
<th>NOMOR KK</th>
<th>NAMA</th>
<th>JNS ASURANSI</th>
<th>JNS PENGGUNAAN ALAT KONTRASEPSI</th>
<th>JNS PENYAKIT YANG DIDERITA</th>
<th>KUNJUNGAN KE FASKES DALAM 1 TAHUN</th>
<th>RAWAT INAP DALAM 1 TAHUN</th>
<th>KUNJUNGAN KE DOKTER DALAM 1 TAHUN</th>
<th>KONDISI FISIK SEJAK LAHIR</th>
<th>STATUS GIZI BALITA</th>
<th>TANGGAL PENGISIAN</th>
<th>STATUS PENGISIAN</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection

@section('js')
<script nonce="{{ csp_nonce() }}">
document.addEventListener("DOMContentLoaded", function(event) {
const headers = @include('layouts.components.header_bearer_api_gabungan');
var url = new URL("{{ config('app.databaseGabunganUrl').'/api/v1/data-presisi/kesehatan' }}");
var colomn = '{{ $colomn }}';

const filterTahun = $('#filter-tahun');
const detailKesehatan = $('#detail-kesehatan');

var kesehatan = detailKesehatan.DataTable({
processing: true,
serverSide: true,
autoWidth: false,
ordering: true,
ajax: {
url: url.href,
headers: headers,
method: 'get',
data: function(row) {
const data = {
"page[size]": row.length,
"page[number]": (row.start / row.length) + 1,
"filter[search]": row.search.value,
"filter[tahun]": filterTahun.val(),
"filter[colomn]": colomn,
"sort": (row.order[0]?.dir === "asc" ? "" : "-") + row.columns[row.order[0]?.column]?.name,
};

return data;
},
dataSrc: function(json) {
json.recordsTotal = json.meta.pagination.total;
json.recordsFiltered = json.meta.pagination.total;
return json.data;
},
},
columnDefs: [{
targets: '_all',
className: 'text-nowrap',
}, {
targets: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
orderable: false,
searchable: false,
}],
columns: [{
data: null,
orderable: false,
render: function(data, type, row, meta) {
return meta.row + meta.settings._iDisplayStart + 1;
}
},
{
data: 'attributes.nik',
orderable: false,
},
{
data: 'attributes.no_kk',
orderable: false,
},
{
data: 'attributes.nama',
orderable: false,
},
{
data: 'attributes.jns_ansuransi',
orderable: false
},
{
data: 'attributes.jns_penggunaan_alat_kontrasepsi',
orderable: false
},
{
data: 'attributes.jns_penyakit_diderita',
orderable: false
},
{
data: 'attributes.frekwensi_kunjungan_faskes_pertahun',
orderable: false
},
{
data: 'attributes.frekwensi_rawat_inap_pertahun',
orderable: false
},
{
data: 'attributes.frekwensi_kunjungan_dokter_pertahun',
orderable: false
},
{
data: 'attributes.kondisi_fisik_sejak_lahir',
orderable: false
},
{
data: 'attributes.status_gizi_balita',
orderable: false
},
{
data: 'attributes.tanggal_pengisian',
orderable: false
},
{
data: 'attributes.status_pengisian',
orderable: false
},
],
});

kesehatan.on('draw.dt', function() {
var PageInfo = detailKesehatan.DataTable().page.info();
kesehatan.column(0, {
page: 'current'
}).nodes().each(function(cell, i) {
cell.innerHTML = i + 1 + PageInfo.start;
});
});

filterTahun.on('change', function() {
kesehatan.ajax.reload();
});
});
</script>
@endsection
Loading