From d5b3f2cab7609bb7d439615ccc7267237cb8391e Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 17 Nov 2026 11:13:30 +0530 Subject: [PATCH] Added one more dispatch in test certificate page --- app/Filament/Pages/TestCertificate.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Filament/Pages/TestCertificate.php b/app/Filament/Pages/TestCertificate.php index 882daba9..9a9d9171 100644 --- a/app/Filament/Pages/TestCertificate.php +++ b/app/Filament/Pages/TestCertificate.php @@ -75,6 +75,7 @@ class TestCertificate extends Page implements HasForms Select::make('machine_id') ->label('Work Center') ->reactive() + // ->searchable() ->options(function (callable $get) { $plantId = $get('plant_id'); @@ -1760,10 +1761,20 @@ class TestCertificate extends Page implements HasForms $this->filters['production_order'] = $productionOrder; } + #[On('work-center-updated')] + public function updateWorkCenter($workCenter): void + { + $this->filters['machine_id'] = $workCenter; + } + #[On('sticker-options')] public function stickerStructure(array $stickerOptions): void { $this->filters['sticker_options'] = $stickerOptions; + // Automatically select the first sticker + $firstStickerId = array_key_first($stickerOptions); + + $this->filters['sticker_id'] = $firstStickerId; } #[On('production-order-clear')]