Updated gernr column readOnly and stateUpdate logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Pint / pint (pull_request) Successful in 4m17s
Laravel Larastan / larastan (pull_request) Failing after 6m5s

This commit is contained in:
dhanabalan
2026-09-04 17:10:29 +05:30
parent f9c3ee08f0
commit 035948687d

View File

@@ -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([