Add policy for action events

This commit is contained in:
2023-12-08 10:45:01 +05:00
parent 374dfe8da1
commit a4265e488c
4 changed files with 96 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ class LoanOrderFieldsForDetail
/**
* Loan order fields for detail
*/
public static function make(): array
public static function make($resource): array
{
return [
ID::make()->hide(),
@@ -160,8 +160,8 @@ class LoanOrderFieldsForDetail
->size('w-1/2'),
]),
MorphMany::make(__('Actions'), 'actions', config('nova.actions.resource'))
->canSeeWhen('isAdmin', $this)
// MorphMany::make(__('Actions'), 'actions', config('nova.actions.resource'))
// ->canSee(fn () => true)
];
}
}