From ebc886aeb9a5902cf248bedb04fbe5d889abd0f3 Mon Sep 17 00:00:00 2001 From: masadi Date: Fri, 19 Jan 2024 18:18:23 +0700 Subject: [PATCH] Update Rilis v7.0.4 --- app/Console/Commands/EraporUpdate.php | 12 ++++++------ app/Console/Commands/SinkronDapodik.php | 10 ++++++++-- app/Http/Controllers/SinkronisasiController.php | 2 +- app_version.txt | 2 +- resources/views/changelog.blade.php | 7 +++++++ 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/app/Console/Commands/EraporUpdate.php b/app/Console/Commands/EraporUpdate.php index f3e241a..cc4f266 100644 --- a/app/Console/Commands/EraporUpdate.php +++ b/app/Console/Commands/EraporUpdate.php @@ -158,14 +158,14 @@ public function handle() 'semester_id' => 20231, 'nama' => '2023/2024 Ganjil', 'semester' => 1, - 'periode_aktif' => 1, + 'periode_aktif' => 0, ], - /*[ + [ 'semester_id' => 20232, 'nama' => '2023/2024 Genap', 'semester' => 2, - 'periode_aktif' => 0, - ]*/ + 'periode_aktif' => 1, + ] ], ], ]; @@ -216,8 +216,8 @@ public function handle() } } } - Semester::where('semester_id', '<>', '20231')->update(['periode_aktif' => 0]); - Semester::where('semester_id', '20231')->update(['periode_aktif' => 1]); + Semester::where('semester_id', '<>', '20232')->update(['periode_aktif' => 0]); + Semester::where('semester_id', '20232')->update(['periode_aktif' => 1]); $guru = Guru::whereRaw('guru_id <> guru_id_dapodik')->first(); if($guru){ $semester = Semester::where('periode_aktif', 1)->first(); diff --git a/app/Console/Commands/SinkronDapodik.php b/app/Console/Commands/SinkronDapodik.php index 54c0540..977371d 100644 --- a/app/Console/Commands/SinkronDapodik.php +++ b/app/Console/Commands/SinkronDapodik.php @@ -43,7 +43,7 @@ class SinkronDapodik extends Command * * @var string */ - protected $signature = 'sinkron:dapodik {satuan?} {akses?} {sekolah_id?}'; + protected $signature = 'sinkron:dapodik {satuan?} {akses?} {sekolah_id?} {semester_id?}'; /** * The console command description. @@ -69,7 +69,13 @@ public function __construct() */ public function handle() { - $semester = Semester::where('periode_aktif', 1)->first(); + $semester = Semester::where(function($query){ + if($this->argument('semester_id')){ + $query->where('semester_id', $this->argument('semester_id')); + } else { + $query->where('periode_aktif', 1); + } + })->first(); $list_data = [ 'semua_data', /*'jurusan', diff --git a/app/Http/Controllers/SinkronisasiController.php b/app/Http/Controllers/SinkronisasiController.php index b70b6c9..3e62775 100644 --- a/app/Http/Controllers/SinkronisasiController.php +++ b/app/Http/Controllers/SinkronisasiController.php @@ -270,7 +270,7 @@ private function ref_erapor(){ ]; } public function proses_sync(){ - $argumen = ['satuan' => request()->satuan, 'akses' => 1, 'sekolah_id' => request()->sekolah_id]; + $argumen = ['satuan' => request()->satuan, 'akses' => 1, 'sekolah_id' => request()->sekolah_id, 'semester_id' => request()->semester_id]; Artisan::call('sinkron:'.request()->tujuan, $argumen); } public function hitung(){ diff --git a/app_version.txt b/app_version.txt index 5febf26..1b19111 100644 --- a/app_version.txt +++ b/app_version.txt @@ -1 +1 @@ -7.0.3 \ No newline at end of file +7.0.4 \ No newline at end of file diff --git a/resources/views/changelog.blade.php b/resources/views/changelog.blade.php index 275cb07..e1d11e1 100644 --- a/resources/views/changelog.blade.php +++ b/resources/views/changelog.blade.php @@ -1,4 +1,11 @@
+ +

Versi 7.0.4

+
+
    +
  1. [Pembaharuan] Rilis Tahun Ajaran 2023/2024 Semester Genap
  2. +
  3. [Perbaikan] Akses sinkronisasi berdasar tahun ajaran terpilih
  4. +

Versi 7.0.3