Browse Source

Merge pull request 'dev-ibnu' (#296) from dev-ibnu into staging

Reviewed-on: ordo/adw-backend#296
pull/1/head
ibnu 1 year ago
parent
commit
1c1f655647
  1. 5
      app/Http/Controllers/DashboardBoDController.php
  2. 1
      app/Http/Controllers/UserToActivityController.php
  3. 1
      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'] != "") {

1
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',

Loading…
Cancel
Save