Browse Source

[Refactor] Disable Log Info

Dev-Fuad
Fuad Hadisurya 2 months ago
parent
commit
17970a63c6
  1. 10
      app/Console/Commands/ScheduleHealth.php
  2. 2
      app/Http/Controllers/DashboardBoDController.php

10
app/Console/Commands/ScheduleHealth.php

@ -42,13 +42,13 @@ class ScheduleHealth extends Command
public function handle() public function handle()
{ {
echo "\n------------------------------------------\n"; // echo "\n------------------------------------------\n";
echo "Command Start. \n"; // echo "Command Start. \n";
Log::info("Command Start."); // Log::info("Command Start.");
$projects = Project::get(); $projects = Project::get();
$totalProjects = $projects->count(); $totalProjects = $projects->count();
$updatedProjects = []; $updatedProjects = [];
Log::info($totalProjects); // Log::info($totalProjects);
foreach ($projects as $index => $project) { foreach ($projects as $index => $project) {
$project->scurve = MasterFunctionsHelper::getSCurve($project->id); $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'); $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]); $project->update(['schedule_health' => $scheduleHealth]);
$updatedProjects[] = $project->id; $updatedProjects[] = $project->id;
} }

2
app/Http/Controllers/DashboardBoDController.php

@ -43,7 +43,7 @@ class DashboardBoDController extends Controller
DB::raw('SUM(CAST(COALESCE(NULLIF(REPLACE(income_year, \'.\', \'\'), \'\'), \'0\') AS DOUBLE PRECISION)) AS total_income_year') DB::raw('SUM(CAST(COALESCE(NULLIF(REPLACE(income_year, \'.\', \'\'), \'\'), \'0\') AS DOUBLE PRECISION)) AS total_income_year')
)->first(); )->first();
$projects = Project::get(); $projects = Project::get();
Log::info(['dataTotal' => $totalBudgets]); // Log::info(['dataTotal' => $totalBudgets]);
} else { } else {
$totalBudgets = Project::where('created_by_id', $hierarchy) $totalBudgets = Project::where('created_by_id', $hierarchy)
->select( ->select(

Loading…
Cancel
Save