From 2eeb504119c54d91c03194209fa7f75b27ac666b Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Mon, 14 Aug 2023 10:32:46 +0700 Subject: [PATCH 1/3] Fix update actual cost --- app/Models/Activity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 1b98d03..eefcea4 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -71,8 +71,8 @@ class Activity extends Model $data->updateCostPlanning(); if($data->bobot_planning){ $data->updatePersentaseProgress(); - $data->updateCostActual(); } + $data->updateCostActual(); // if($data->start_date != request()->start_date || $data->end_date != request()->end_date) { // $data->updateStartEndDateHeader(); // } @@ -86,8 +86,8 @@ class Activity extends Model $data->updateCostPlanning(); if($data->bobot_planning){ $data->updatePersentaseProgress(); - $data->updateCostActual(); } + $data->updateCostActual(); $data->updateStartEndDateHeader(); }); From 9e60faf622801258c52ab5ec6c7dff624153a9b1 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Tue, 15 Aug 2023 09:02:24 +0700 Subject: [PATCH 2/3] Removing s curve from select --- app/Http/Controllers/ProjectController.php | 39 +++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 9d50370..7b186c5 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -231,7 +231,44 @@ class ProjectController extends Controller public function list() { - $data = Project::orderBy('id', 'desc')->get(); + $data = Project::select( + 'id', + 'kode_sortname', + 'jumlah_stakeholder', + 'nama', + 'mulai_proyek', + 'akhir_proyek', + 'area_kerja', + 'lokasi_kantor', + 'rencana_biaya', + 'biaya_actual', + 'company', + 'pm_id', + 'type_proyek_id', + 'divisi_id', + 'persentase_progress', + 'keterangan', + 'durasi_proyek', + 'progress_by_worklog', + 'status', + 'currency_symbol', + 'currency_code', + 'currency_name', + 'project_objectives', + 'considered_success_when', + 'potential_risk', + 'testing_environment', + 'currency_code', + 'currency_symbol', + 'currency_name', + 'budget_health', + 'phase_id', + 'calculation_status', + 'created_at', + 'created_by', + 'updated_at', + 'updated_by' + )->orderBy('id', 'desc')->get(); $countData = $data->count(); if(!$data) From 1e6fe6f1232edcd920c7baf2500452a3d14bca14 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Tue, 15 Aug 2023 10:05:57 +0700 Subject: [PATCH 3/3] Use only required column hr list --- app/Http/Controllers/HumanResourceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/HumanResourceController.php b/app/Http/Controllers/HumanResourceController.php index 8e23f87..9e47627 100644 --- a/app/Http/Controllers/HumanResourceController.php +++ b/app/Http/Controllers/HumanResourceController.php @@ -112,7 +112,7 @@ class HumanResourceController extends Controller public function list() { - $data = HumanResource::all(); + $data = HumanResource::select('id', 'name')->get(); $countData = $data->count(); if($data){