Nav entry was fully hidden; now visible only to admins for management. Delete action added to table rows (bulk delete was already there). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
d22353c222
commit
9f42f730b8
1 file changed
+5
-1
@@ -24,7 +24,10 @@ class SpiceResource extends Resource
|
|||||||
protected static ?string $slug = 'rohstoffe';
|
protected static ?string $slug = 'rohstoffe';
|
||||||
protected static ?string $navigationGroup = 'Lager';
|
protected static ?string $navigationGroup = 'Lager';
|
||||||
|
|
||||||
protected static bool $shouldRegisterNavigation = false;
|
public static function shouldRegisterNavigation(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()?->hasRole('sms-admin') ?? false;
|
||||||
|
}
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-cube';
|
protected static ?string $navigationIcon = 'heroicon-o-cube';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
@@ -74,6 +77,7 @@ class SpiceResource extends Resource
|
|||||||
])
|
])
|
||||||
->actions([
|
->actions([
|
||||||
Tables\Actions\EditAction::make(),
|
Tables\Actions\EditAction::make(),
|
||||||
|
Tables\Actions\DeleteAction::make(),
|
||||||
])
|
])
|
||||||
->bulkActions([
|
->bulkActions([
|
||||||
Tables\Actions\BulkActionGroup::make([
|
Tables\Actions\BulkActionGroup::make([
|
||||||
|
|||||||
Reference in new issue
Block a user