Browse Source

projects on danger

pull/3/head
Yusuf 2 years ago
parent
commit
ea1c64bf1a
  1. 2
      app/Http/Controllers/ProjectController.php

2
app/Http/Controllers/ProjectController.php

@ -257,6 +257,7 @@ class ProjectController extends Controller
$totalActualCost = $data->sum('actualCost');
// $manpowers = User::where('employee_type', 'employee')->count();
$manpowers = User::count();
$projectsOnDanger = Project::where('budget_health', 'danger')->count();
$projectPhases = ProjectPhase::orderBy('order', 'asc')->pluck('name');
$projectTypes = ProjectType::orderBy('id', 'asc')->pluck('name');
try {
@ -288,6 +289,7 @@ class ProjectController extends Controller
'totalActualCost' => $totalActualCost,
'totalRevenue' => $totalPlannedCost - $totalActualCost,
'manpowers' => $manpowers,
'projectsOnDanger'=> $projectsOnDanger,
'projectPhases' => $projectPhases,
'projectsByPhase' => $projectsByPhase,
'projectTypes' => $projectTypes,

Loading…
Cancel
Save