43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\ProviderConnectionResource\Pages;
|
|
|
|
use App\Filament\Resources\ProviderConnectionResource;
|
|
use App\Support\Auth\Capabilities;
|
|
use App\Support\Rbac\UiEnforcement;
|
|
use Filament\Actions;
|
|
use Filament\Resources\Pages\ListRecords;
|
|
|
|
class ListProviderConnections extends ListRecords
|
|
{
|
|
protected static string $resource = ProviderConnectionResource::class;
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
UiEnforcement::forAction(
|
|
Actions\CreateAction::make()
|
|
->authorize(fn (): bool => true)
|
|
)
|
|
->requireCapability(Capabilities::PROVIDER_MANAGE)
|
|
->tooltip('You do not have permission to create provider connections.')
|
|
->apply(),
|
|
];
|
|
}
|
|
|
|
public function getTableEmptyStateHeading(): ?string
|
|
{
|
|
return 'No provider connections found';
|
|
}
|
|
|
|
public function getTableEmptyStateDescription(): ?string
|
|
{
|
|
return 'Create a Microsoft provider connection or adjust the tenant filter to inspect another managed tenant.';
|
|
}
|
|
|
|
public function getTableEmptyStateActions(): array
|
|
{
|
|
return $this->getHeaderActions();
|
|
}
|
|
}
|