1
0
forked from poc/pds

all charts updated

This commit is contained in:
dhanabalan
2025-04-23 20:54:25 +05:30
parent 5425970fc2
commit 6c119778c6
5 changed files with 245 additions and 17 deletions

View File

@@ -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',
]);
}
}