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->components([ Section::make('Aktueller Stand')->schema([ TextEntry::make('stand')->hiddenLabel()->listWithLineBreaks() ->state(fn (LicenseArticle $record): array => app(CatalogReading::class)->articleStand($record)), ]), Section::make('Pakete und Angebote')->description('Wo dieser Artikel lizenziert wird.')->schema([ TextEntry::make('context')->hiddenLabel()->listWithLineBreaks() ->state(fn (LicenseArticle $record): array => app(CatalogReading::class)->articleContext($record)), ]), ]); } 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}'), ]; } }