Updated gernr column readOnly and stateUpdate logic #981

Merged
jothi merged 1 commits from ranjith-dev into master 2026-09-04 11:43:24 +00:00

View File

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