From 1805fcc4f136eae6966101c433d6deca10a03be8 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 17 Nov 2026 09:59:16 +0530 Subject: [PATCH] Added logic in test certificate automatic load of sticker id --- app/Filament/Pages/TestCertificate.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Filament/Pages/TestCertificate.php b/app/Filament/Pages/TestCertificate.php index 222aed15..882daba9 100644 --- a/app/Filament/Pages/TestCertificate.php +++ b/app/Filament/Pages/TestCertificate.php @@ -259,6 +259,7 @@ class TestCertificate extends Page implements HasForms ->label('Sticker ID') ->options(fn (callable $get) => $get('sticker_options') ?? []) ->reactive() + ->searchable() ->afterStateUpdated(function ($state, callable $set) { if (blank($state)) { @@ -435,6 +436,13 @@ class TestCertificate extends Page implements HasForms $set('machine_id', (string) $machineOptions[0]); } $set('sticker_options', $stickerOptions); + $firstStickerId = array_key_first($stickerOptions); + + $set('sticker_id', null); + + if ($firstStickerId !== null) { + $set('sticker_id', (string) $firstStickerId); + } $set('production_order', $record->aufnr); }), TextInput::make('to_serial_number') -- 2.49.1