all charts updated
This commit is contained in:
@@ -39,7 +39,6 @@ class ItemOverview extends ChartWidget
|
||||
// Monday 8:00 AM of the current week
|
||||
$startDate = now()->startOfWeek()->setTime(8, 0, 0);
|
||||
|
||||
// Next Monday 8:00 AM (end of Sunday + 8 hrs)
|
||||
$endDate = now()->endOfWeek()->addDay()->setTime(8, 0, 0);
|
||||
|
||||
$groupBy = 'EXTRACT(DOW FROM production_quantities.created_at)'; // Group by day of week
|
||||
@@ -178,6 +177,9 @@ class ItemOverview extends ChartWidget
|
||||
public static function canView(): bool
|
||||
{
|
||||
// Only show on HourlyProduction page
|
||||
return request()->routeIs('filament.pages.hourly-production');
|
||||
return request()->routeIs([
|
||||
'filament.pages.hourly-production',
|
||||
'filament.admin.resources.production-quantities.create',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user