Changed logic in asrs #682

Merged
jothi merged 1 commits from ranjith-dev into master 2026-06-01 04:07:56 +00:00

View File

@@ -386,12 +386,16 @@ class AsrsItemValidationResource extends Resource
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make()
->hidden(function ($record): bool {
if (auth()->user()?->hasRole('SuperAdmin')) {
return false;
}
// ->hidden(function ($record): bool {
// if (auth()->user()?->hasRole('SuperAdmin')) {
// 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([