Merge pull request 'Updated gernr column readOnly and stateUpdate logic' (#981) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 27s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 27s
Reviewed-on: #981
This commit was merged in pull request #981.
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user