label(fn (): string => app(RelatedNavigationResolver::class) ->primaryListAction(CrossResourceNavigationMatrix::SOURCE_FINDING, $this->getRecord())?->actionLabel ?? 'Open related record') ->url(fn (): ?string => app(RelatedNavigationResolver::class) ->primaryListAction(CrossResourceNavigationMatrix::SOURCE_FINDING, $this->getRecord())?->targetUrl) ->hidden(fn (): bool => ! (app(RelatedNavigationResolver::class) ->primaryListAction(CrossResourceNavigationMatrix::SOURCE_FINDING, $this->getRecord())?->isAvailable() ?? false)) ->color('gray'), Actions\Action::make('open_approval_queue') ->label('Open approval queue') ->icon('heroicon-o-arrow-top-right-on-square') ->color('gray') ->visible(function (): bool { $record = $this->getRecord(); return $record instanceof Finding && FindingExceptionResource::canAccessApprovalQueueForTenant($record->tenant); }) ->url(function (): ?string { $record = $this->getRecord(); return $record instanceof Finding ? FindingExceptionResource::approvalQueueUrl($record->tenant) : null; }), Actions\ActionGroup::make(FindingResource::workflowActions()) ->label('Actions') ->icon('heroicon-o-ellipsis-vertical') ->color('gray'), ]; } public function getSubheading(): string|Htmlable|null { return FindingResource::findingSubheading($this->getRecord()); } }