|
|
|
@ -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, |
|
|
|
|