Skip to content

Commit

Permalink
Merge pull request #354 from OpenSID/rilis-2406.0.0
Browse files Browse the repository at this point in the history
Rilis 2406.0.0
  • Loading branch information
vickyrolanda authored Jun 12, 2024
2 parents 015f74a + 9418b4d commit 5142884
Show file tree
Hide file tree
Showing 1,773 changed files with 243,059 additions and 1,083 deletions.
4 changes: 2 additions & 2 deletions app/Helpers/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
function openkab_versi()
{
return 'v2401.0.0';
return 'v2406.0.0';
}
}

Expand Down Expand Up @@ -213,7 +213,7 @@ function default_favicon($favicon)
*/
function date_from_format($value, $format = null)
{
\Log::error($value);
Log::error($value);

return Carbon::createFromFormat($format ?? config('app.format.date'), $value);
}
Expand Down
3 changes: 3 additions & 0 deletions app/Http/Controllers/Api/WebsiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Http\Repository\BantuanRepository;
use App\Http\Repository\ConfigRepository;
use App\Http\Repository\KeluargaRepository;
use App\Http\Repository\PendudukRepository;
use Illuminate\Http\Response;

Expand All @@ -28,7 +29,9 @@ private function data()

$bantuanSummary = (new BantuanRepository)->summary();
$pendudukSummary = (new PendudukRepository)->summary();
$keluargaSummary = (new KeluargaRepository)->summary();
$categoriesItems = [
'keluarga' => ['text' => 'keluarga', 'value' => angka_lokal($keluargaSummary), 'icon' => 'web/img/penduduk.jpg'],
'penduduk' => ['text' => 'penduduk', 'value' => angka_lokal($pendudukSummary), 'icon' => 'web/img/penduduk.jpg'],
'kecamatan' => ['text' => 'kecamatan', 'value' => angka_lokal($configSummary->count()) ?? 0, 'icon' => 'web/img/kecamatan.jpg'],
'desa' => ['text' => 'desa/kelurahan', 'value' => angka_lokal($totalDesa), 'icon' => 'web/img/kelurahan.jpg'],
Expand Down
37 changes: 37 additions & 0 deletions app/Http/Controllers/Web/PresisiController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use App\Models\Penduduk;

class PresisiController extends Controller
{
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
$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'],
];
$listKecamatan = ['' => 'Pilih Kecamatan'];
$listDesa = ['' => 'Pilih Desa'];

return view('presisi.index', compact('categoriesItems', 'listKecamatan', 'listDesa'));
}

public function kependudukan()
{
$statistik = Penduduk::KATEGORI_STATISTIK;

return view('presisi.kependudukan.index', compact('statistik'));
}
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/WeakPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function handle(Request $request, Closure $next)
{
$weakPassword = session('weak_password');
if ($weakPassword && ! in_array(Route::currentRouteName(), $this->except)) {
return redirect(route('password.change'));
// return redirect(route('password.change'));
}

return $next($request);
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Middleware/WebsiteEnable.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public function handle(Request $request, Closure $next)
if (! $website) {
return redirect('login');
}
$homePage = Setting::where(['key' => 'home_page'])->first()?->value ?? 0;
if ($homePage == 'presisi') {
return redirect('presisi');
}

return $next($request);
}
Expand Down
5 changes: 5 additions & 0 deletions app/Http/Repository/KeluargaRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,9 @@ private function caseKelasSosial(): array|object
'footer' => $this->listFooter($kelas, $query),
];
}

public function summary()
{
return QueryBuilder::for(Keluarga::class)->count();
}
}
6 changes: 4 additions & 2 deletions app/Listeners/MenuListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ public function handle(BuildingMenu $event)

// tambahkan menu dari group
$user = auth()->user();
foreach ($user->team->first()?->menu ?? [] as $menu) {
$event->menu->add($menu);
if ($user) {
foreach ($user->team->first()?->menu ?? [] as $menu) {
$event->menu->add($menu);
}
}
}
}
10 changes: 7 additions & 3 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Di rilis v2401.0.0 berisi penambahan fitur dan perbaikan lain sesuai dengan pelayanan ke pelanggan.
Di rilis v2406.0.0 berisi penambahan fitur dan perbaikan lain sesuai dengan pelayanan ke pelanggan.

#### Penambahan Fitur

1. [#344](https://github.com/OpenSID/OpenKab/issues/344) Penambahan opsi dasbor pada pengaturan OpenKab.
2. [#345](https://github.com/OpenSID/OpenKab/issues/345) Penambahan template dasbor baru pada OpenKab.
3. [#348](https://github.com/OpenSID/OpenKab/issues/348) Penambahan data statistik penduduk.

#### Perbaikan BUG

1. [#336](https://github.com/OpenSID/OpenKab/issues/336) Perbaikan halaman depan yang tidak tampil datanya secara dinamis.
1. [#342](https://github.com/OpenSID/OpenKab/issues/342) Perbaikan perbaiki duplikat pilih Kecamatan.

#### Perubahan Teknis
#### Perubahan Teknis
Loading

0 comments on commit 5142884

Please sign in to comment.