user(); return $user instanceof User && $user->hasStaffRole(StaffRole::Katalogverwalter); } public static function getViewAuthorizationResponse(Model $record): Response { return self::keeper() ? Response::allow() : Response::deny(); } public static function infolist(Schema $schema): Schema { return $schema->columns(1)->components([ View::make('filament.editorial.license-desk') ->viewData(fn (LicenseArticle $record): array => [ 'stand' => app(CatalogReading::class)->articleStand($record), 'kontext' => app(CatalogReading::class)->articleContext($record), ]) ->columnSpanFull(), ]); } public static function form(Schema $schema): Schema { return $schema; } public static function table(Table $table): Table { return $table->columns([ TextColumn::make('code')->label('Kennung')->searchable(), TextColumn::make('product_line')->label('Produktlinie'), TextColumn::make('currentRelease.number')->label('Aktueller Stand'), ]); } public static function getPages(): array { return [ 'index' => ListLicenseArticles::route('/'), 'view' => ViewLicenseArticle::route('/{record}'), ]; } }