Added Updated logic in asrs resource pages #649

Merged
jothi merged 1 commits from ranjith-dev into master 2026-05-26 04:49:09 +00:00
2 changed files with 13 additions and 6 deletions

View File

@@ -112,12 +112,12 @@ class AsrsItemValidationResource extends Resource
'In' => 'In', 'In' => 'In',
'Out' => 'Out', 'Out' => 'Out',
]), ]),
Forms\Components\Select::make('status') // Forms\Components\Select::make('status')
->label('Status') // ->label('Status')
->options([ // ->options([
'Updated' => 'Updated', // 'Updated' => 'Updated',
'NotUpdated' => 'Not Updated', // 'NotUpdated' => 'Not Updated',
]), // ]),
Forms\Components\Hidden::make('created_by') Forms\Components\Hidden::make('created_by')
->label('Created By') ->label('Created By')
->default(Filament::auth()->user()?->name ?? ''), ->default(Filament::auth()->user()?->name ?? ''),

View File

@@ -10,6 +10,13 @@ class EditAsrsItemValidation extends EditRecord
{ {
protected static string $resource = AsrsItemValidationResource::class; protected static string $resource = AsrsItemValidationResource::class;
protected function mutateFormDataBeforeSave(array $data): array
{
$data['status'] = 'Updated';
return $data;
}
protected function getHeaderActions(): array protected function getHeaderActions(): array
{ {
return [ return [