1
0
forked from poc/pds

Changed logic in asrs

This commit is contained in:
dhanabalan
2026-06-01 09:37:43 +05:30
parent 8e6859fca2
commit 234ad1431a

View File

@@ -386,12 +386,16 @@ class AsrsItemValidationResource extends Resource
->actions([ ->actions([
Tables\Actions\ViewAction::make(), Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make() Tables\Actions\EditAction::make()
->hidden(function ($record): bool { // ->hidden(function ($record): bool {
if (auth()->user()?->hasRole('SuperAdmin')) { // if (auth()->user()?->hasRole('SuperAdmin')) {
return false; // return false;
} // }
return trim(strtolower($record->status)) == 'updated'; // return trim(strtolower($record->status)) == 'updated';
// }),
->visible(function ($record): bool {
return auth()->user()?->hasRole('SuperAdmin')
|| strtolower(trim($record->status ?? '')) != 'updated';
}), }),
]) ])
->bulkActions([ ->bulkActions([