diff --git a/app/Filament/Resources/RequestCharacteristicResource.php b/app/Filament/Resources/RequestCharacteristicResource.php index f76f84b..93c9695 100644 --- a/app/Filament/Resources/RequestCharacteristicResource.php +++ b/app/Filament/Resources/RequestCharacteristicResource.php @@ -256,8 +256,12 @@ class RequestCharacteristicResource extends Resource ->label('Serial Number') ->reactive() ->minLength(13) - ->readOnly(fn (callable $get) => (! $get('aufnr'))) - ->afterStateUpdated(function (callable $set) { + ->readOnly(fn (callable $get) => (! $get('aufnr') || $get('approver_type') != 'Stop')) + ->afterStateUpdated(function ($state, callable $set, callable $get) { + $appTyp = $get('approver_type'); + if ($appTyp != 'Stop') { + $set('gernr', null); + } $set('updated_by', Filament::auth()->user()?->name); }) // ->rules([