diff --git a/app/Filament/Pages/HourlyProduction.php b/app/Filament/Pages/HourlyProduction.php index 84228d833..b49105552 100644 --- a/app/Filament/Pages/HourlyProduction.php +++ b/app/Filament/Pages/HourlyProduction.php @@ -42,9 +42,9 @@ class HourlyProduction extends Page ->reactive() ->afterStateUpdated(function ($state) { session(['selected_plant' => $state]); - - // dd(session('selected_plant')); - $this->triggerChartUpdate(); + // Clear production quantity Dashboard session keys to avoid conflict + session()->forget(['select_plant', 'select_line']); + $this->triggerChartUpdate(); }), // Line Filter diff --git a/app/Filament/Pages/ProductionQuantityPage.php b/app/Filament/Pages/ProductionQuantityPage.php index 4d5a6f0ae..4503645b6 100644 --- a/app/Filament/Pages/ProductionQuantityPage.php +++ b/app/Filament/Pages/ProductionQuantityPage.php @@ -124,6 +124,9 @@ class ProductionQuantityPage extends Page implements HasForms $set('block_name', null); session(['select_plant' => $state]); + + session()->forget(['selected_plant', 'selected_line']); + if (!$plantId) { $set('pqPlantError', 'Please select a plant first.'); @@ -278,6 +281,7 @@ class ProductionQuantityPage extends Page implements HasForms session(['select_line' => $state]); + // dd(session('select_line')); $this->triggerChartUpdate();