Added production plan table in target
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Laravel Pint / pint (pull_request) Successful in 3m41s
Laravel Larastan / larastan (pull_request) Failing after 6m42s

This commit is contained in:
dhanabalan
2026-09-30 17:10:37 +05:30
parent 77df792dec
commit cf60bfe2c1
2 changed files with 90 additions and 28 deletions

View File

@@ -635,13 +635,13 @@ class ProductionTargetPlan extends Component
$this->records = $records;
// $this->monthlyRecords = ProductionPlan::where('plant_id', $plantId)
// ->where('line_id', $lineId)
// ->whereYear('created_at', $year)
// ->whereMonth('created_at', $month)
// ->sum('plan_quantity');
$this->monthlyRecords = ProductionPlan::where('plant_id', $plantId)
->where('line_id', $lineId)
->whereYear('created_at', $year)
->whereMonth('created_at', $month)
->sum('plan_quantity');
$this->monthlyRecords = $plans->sum('plan_quantity');
// $this->monthlyRecords = $plans->sum('plan_quantity');
}
// public function loadMonthlyPlan($year, $month, $plantId, $lineId){
@@ -662,23 +662,11 @@ class ProductionTargetPlan extends Component
public function render()
{
// return view('livewire.production-target-plan');
// return view('livewire.production-target-plan', [
// 'records' => $this->records,
// 'monthlyRecords' => $this->monthlyRecords,
// 'dates' => $this->dates,
// ]);
$t = microtime(true);
$view = view('livewire.production-target-plan', [
return view('livewire.production-target-plan', [
'records' => $this->records,
'monthlyRecords' => $this->monthlyRecords,
'dates' => $this->dates,
'leaveDates' => $this->leaveDates,
]);
$html = $view->render();
Log::info('Blade render: ' . ((microtime(true) - $t) * 1000) . ' ms');
return $html;
}
}