Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statistik penduduk berdasarkan pengaturan menu #408

Open
wants to merge 1 commit into
base: Bug-fix-2411
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion app/Helpers/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ function generateMenuPresisi($tree, $parentId = null)
if ($parentId) {
$result .= "<a class='item-menu dropdown-item' href='{$item->href}'>{$icon}{$item->text}</a>";
} else {
$result .= "<a type='button' class='item-menu btn bg-white p-2 text-muted' href='{$item->href}'>{$icon}{$item->text}</a>";
$href = $item->href;
if($href != '/presisi'){
$href = str_contains($item->href, 'module') ? $item->href : '/'.$item->href;
}
$result .= "<a type='button' class='item-menu btn bg-white p-2 text-muted' href='{$href}'>{$icon}{$item->text}</a>";
}
}
}
Expand Down
14 changes: 12 additions & 2 deletions app/Http/Controllers/Web/PresisiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,21 @@ public function index()
return view('presisi.index', compact('categoriesItems', 'listKecamatan', 'listDesa'));
}

public function kependudukan()
public function kependudukan($id = "")
{
$totalDesa = 0;
$pendudukSummary = 0;
$configSummary = 0;
$keluargaSummary = 0;
$categoriesItems = [
['key' => 'kecamatan', 'text' => 'kecamatan', 'value' => $configSummary, 'icon' => 'web/img/kecamatan.jpg'],
['key' => 'desa', 'text' => 'desa/kelurahan', 'value' => $totalDesa, 'icon' => 'web/img/kelurahan.jpg'],
['key' => 'penduduk', 'text' => 'jumlah penduduk', 'value' => $pendudukSummary, 'icon' => 'web/img/penduduk.jpg'],
['key' => 'keluarga', 'text' => 'jumlah keluarga', 'value' => $keluargaSummary, 'icon' => 'web/img/bantuan.jpg'],
];
$statistik = Penduduk::KATEGORI_STATISTIK;

return view('presisi.kependudukan.index', compact('statistik'));
return view('presisi.kependudukan.index', compact('statistik', 'id', 'categoriesItems'));
}

public function kesehatan($kuartal = null, $tahun = null, $id = null)
Expand Down
34 changes: 34 additions & 0 deletions resources/views/presisi/kependudukan/head.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div class="card-header">
<div class="row">
<div class="col-1" style="display: none">
<a class="btn btn-sm btn-secondary" data-toggle="collapse"
href="#collapse-filter" role="button" aria-expanded="true"
aria-controls="collapse-filter">
<i class="fas fa-filter"></i>
</a>
</div>
<div class="col-md-2">
<button id="btn-tabel" class="btn btn-sm btn-info btn-block btn-sm "
data-bs-toggle="collapse" href="#Tabel" role="button"
aria-expanded="false" aria-controls="grafik-Tabel" disabled>
<i class="fas fa-chart-bar"></i> Tabel
</button>
</div>
<div class="col-md-2">
<button id="btn-grafik" class="btn btn-sm btn-success btn-block btn-sm"
data-bs-toggle="collapse" href="#grafik-statistik" role="button"
aria-expanded="false" aria-controls="grafik-statistik">
<i class="fas fa-chart-bar"></i> Grafik
</button>
</div>
<div class="col-md-2">
<button id="btn-pie" class="btn btn-sm btn-warning btn-block btn-sm"
data-bs-toggle="collapse" href="#pie-statistik" role="button"
aria-expanded="false" aria-controls="pie-statistik">
<i class="fas fa-chart-pie"></i> Chart
</button>
</div>
</div>


</div>
Loading