feat/027-enrollment-config-subtypes #31
@ -18,34 +18,39 @@ class ViewTenant extends ViewRecord
|
|||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
Actions\EditAction::make(),
|
Actions\ActionGroup::make([
|
||||||
Actions\Action::make('admin_consent')
|
Actions\EditAction::make(),
|
||||||
->label('Admin consent')
|
Actions\Action::make('admin_consent')
|
||||||
->icon('heroicon-o-clipboard-document')
|
->label('Admin consent')
|
||||||
->url(fn (Tenant $record) => TenantResource::adminConsentUrl($record))
|
->icon('heroicon-o-clipboard-document')
|
||||||
->visible(fn (Tenant $record) => TenantResource::adminConsentUrl($record) !== null)
|
->url(fn (Tenant $record) => TenantResource::adminConsentUrl($record))
|
||||||
->openUrlInNewTab(),
|
->visible(fn (Tenant $record) => TenantResource::adminConsentUrl($record) !== null)
|
||||||
Actions\Action::make('open_in_entra')
|
->openUrlInNewTab(),
|
||||||
->label('Open in Entra')
|
Actions\Action::make('open_in_entra')
|
||||||
->icon('heroicon-o-arrow-top-right-on-square')
|
->label('Open in Entra')
|
||||||
->url(fn (Tenant $record) => TenantResource::entraUrl($record))
|
->icon('heroicon-o-arrow-top-right-on-square')
|
||||||
->visible(fn (Tenant $record) => TenantResource::entraUrl($record) !== null)
|
->url(fn (Tenant $record) => TenantResource::entraUrl($record))
|
||||||
->openUrlInNewTab(),
|
->visible(fn (Tenant $record) => TenantResource::entraUrl($record) !== null)
|
||||||
Actions\Action::make('verify')
|
->openUrlInNewTab(),
|
||||||
->label('Verify configuration')
|
Actions\Action::make('verify')
|
||||||
->icon('heroicon-o-check-badge')
|
->label('Verify configuration')
|
||||||
->color('primary')
|
->icon('heroicon-o-check-badge')
|
||||||
->requiresConfirmation()
|
->color('primary')
|
||||||
->action(function (
|
->requiresConfirmation()
|
||||||
Tenant $record,
|
->action(function (
|
||||||
TenantConfigService $configService,
|
Tenant $record,
|
||||||
TenantPermissionService $permissionService,
|
TenantConfigService $configService,
|
||||||
RbacHealthService $rbacHealthService,
|
TenantPermissionService $permissionService,
|
||||||
AuditLogger $auditLogger
|
RbacHealthService $rbacHealthService,
|
||||||
) {
|
AuditLogger $auditLogger
|
||||||
TenantResource::verifyTenant($record, $configService, $permissionService, $rbacHealthService, $auditLogger);
|
) {
|
||||||
}),
|
TenantResource::verifyTenant($record, $configService, $permissionService, $rbacHealthService, $auditLogger);
|
||||||
TenantResource::rbacAction(),
|
}),
|
||||||
|
TenantResource::rbacAction(),
|
||||||
|
])
|
||||||
|
->label('Actions')
|
||||||
|
->icon('heroicon-o-ellipsis-vertical')
|
||||||
|
->color('gray'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -172,6 +172,7 @@ public function request(string $method, string $path, array $options = []): Grap
|
|||||||
$response = $this->get(route('filament.admin.resources.tenants.view', $tenant));
|
$response = $this->get(route('filament.admin.resources.tenants.view', $tenant));
|
||||||
|
|
||||||
$response->assertOk();
|
$response->assertOk();
|
||||||
|
$response->assertSee('Actions');
|
||||||
$response->assertSee($firstKey);
|
$response->assertSee($firstKey);
|
||||||
$response->assertSee('ok');
|
$response->assertSee('ok');
|
||||||
$response->assertSee('missing');
|
$response->assertSee('missing');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user