Show Rohstoffe nav and delete action for sms-admin only
Deploy / deploy (push) Successful in 16s

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:
Malek TellissiandClaude Sonnet 4.6 committed 2026-09-13 03:02:34 +02:00
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 $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';
public static function form(Form $form): Form
@@ -74,6 +77,7 @@ class SpiceResource extends Resource
])
->actions([
Tables\Actions\EditAction::make(),
Tables\Actions\DeleteAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([