|
|
|
@ -42,13 +42,13 @@ class ScheduleHealth extends Command
|
|
|
|
|
|
|
|
|
|
public function handle() |
|
|
|
|
{ |
|
|
|
|
echo "\n------------------------------------------\n"; |
|
|
|
|
echo "Command Start. \n"; |
|
|
|
|
Log::info("Command Start."); |
|
|
|
|
// echo "\n------------------------------------------\n"; |
|
|
|
|
// echo "Command Start. \n"; |
|
|
|
|
// Log::info("Command Start."); |
|
|
|
|
$projects = Project::get(); |
|
|
|
|
$totalProjects = $projects->count(); |
|
|
|
|
$updatedProjects = []; |
|
|
|
|
Log::info($totalProjects); |
|
|
|
|
// Log::info($totalProjects); |
|
|
|
|
foreach ($projects as $index => $project) { |
|
|
|
|
$project->scurve = MasterFunctionsHelper::getSCurve($project->id); |
|
|
|
|
|
|
|
|
@ -62,7 +62,7 @@ class ScheduleHealth extends Command
|
|
|
|
|
|
|
|
|
|
$scheduleHealth = ($selisihProgress > 0 && $selisihProgress <= 20) ? 'warning' : (($selisihProgress == 0) ? 'on-schedule' : 'behind-schedule'); |
|
|
|
|
|
|
|
|
|
Log::info("Updating project with ID: " . $project->id . " - Schedule Health: " . $scheduleHealth); |
|
|
|
|
// Log::info("Updating project with ID: " . $project->id . " - Schedule Health: " . $scheduleHealth); |
|
|
|
|
$project->update(['schedule_health' => $scheduleHealth]); |
|
|
|
|
$updatedProjects[] = $project->id; |
|
|
|
|
} |
|
|
|
|