Browse Source

Merge pull request 'staging' (#297) from staging into master

Reviewed-on: ordo/adw-backend#297
pull/1/head
ibnu 11 months ago
parent
commit
73fd552c7a
  1. 5
      app/Http/Controllers/DashboardBoDController.php
  2. 1
      app/Http/Controllers/UserToActivityController.php
  3. 3
      app/Http/Controllers/UserToProyekController.php
  4. 2
      app/Models/Project.php

5
app/Http/Controllers/DashboardBoDController.php

@ -350,8 +350,9 @@ class DashboardBoDController extends Controller
public function getDetailExpenditure($year = '%') public function getDetailExpenditure($year = '%')
{ {
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$projects = Project::where('mulai_proyek', 'like', $year) $projects = Project::select('m_proyek.*', 'md.name as divisi_name')
/* ->orWhere('akhir_proyek', 'like', $year) */ ->where('mulai_proyek', 'like', $year)
->join('m_divisi as md', 'md.id', '=', 'm_proyek.divisi_id')
->orderBy('id', 'desc') ->orderBy('id', 'desc')
->get(); ->get();
foreach ($projects as $project) { foreach ($projects as $project) {

1
app/Http/Controllers/UserToActivityController.php

@ -202,6 +202,7 @@ class UserToActivityController extends Controller
->where('ahta.user_id', $payload['user_id']) ->where('ahta.user_id', $payload['user_id'])
->where('ma.start_date', '<=', $payload['start_date']) ->where('ma.start_date', '<=', $payload['start_date'])
->where('ma.end_date', '>=', $payload['end_date']) ->where('ma.end_date', '>=', $payload['end_date'])
->where('ma.proyek', '>=', $payload['proyek_id'])
->get(); ->get();
if ($payload['status'] != "") { if ($payload['status'] != "") {

3
app/Http/Controllers/UserToProyekController.php

@ -50,7 +50,8 @@ class UserToProyekController extends Controller
"user_id" => $item, "user_id" => $item,
"proyek_id" => $request->proyek_id, "proyek_id" => $request->proyek_id,
"created_by" => $this->currentName, "created_by" => $this->currentName,
'is_customer'=>true 'is_customer'=>true,
'project_role'=> $request->project_role
); );
$result = UserToProyek::create($dataInsert); $result = UserToProyek::create($dataInsert);

2
app/Models/Project.php

@ -15,6 +15,7 @@ class Project extends Model
'kode_sortname', 'kode_sortname',
'jumlah_stakeholder', 'jumlah_stakeholder',
'nama', 'nama',
'nickname',
'mulai_proyek', 'mulai_proyek',
'akhir_proyek', 'akhir_proyek',
'area_kerja', 'area_kerja',
@ -23,6 +24,7 @@ class Project extends Model
'biaya_actual', 'biaya_actual',
'company', 'company',
'pm_id', 'pm_id',
'scoupe_of_work',
'type_proyek_id', 'type_proyek_id',
'divisi_id', 'divisi_id',
'value_proyek', 'value_proyek',

Loading…
Cancel
Save