Browse Source

Merge pull request 'dev-wahyu' (#133) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#133
pull/3/head
ibnu 1 year ago
parent
commit
09fc28d5aa
  1. 2
      app/Http/Controllers/HumanResourceController.php
  2. 39
      app/Http/Controllers/ProjectController.php
  3. 4
      app/Models/Activity.php

2
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){

39
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)

4
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();
});

Loading…
Cancel
Save