Changed logic in asrs
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

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