TenantAtlas/apps/platform/app/Support/TenantDashboard/TenantDashboardSummary.php
Ahmed Darrazi 163738c14c
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 1m33s
feat: polish tenant dashboard operations attention UX
2026-05-07 18:51:03 +02:00

58 lines
2.2 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Support\TenantDashboard;
final readonly class TenantDashboardSummary
{
/**
* @param array{workspace:string,tenant:string,provider:?string,providerKey:?string,latestActivity:?string} $context
* @param array{status:string,tone:string,headline:string,summary:string} $posture
* @param list<array<string, mixed>> $kpis
* @param list<array<string, mixed>> $recommendedActions
* @param list<array<string, mixed>> $governanceStatus
* @param list<array<string, mixed>> $readinessCards
* @param array<string, mixed>|null $activeOperationSummary
* @param list<array<string, mixed>> $recentOperations
*/
public function __construct(
public array $context,
public array $posture,
public array $kpis,
public array $recommendedActions,
public array $governanceStatus,
public array $readinessCards,
public ?array $activeOperationSummary,
public array $recentOperations,
public ?string $pollingInterval,
) {}
/**
* @return array{
* context: array{workspace:string,tenant:string,provider:?string,providerKey:?string,latestActivity:?string},
* posture: array{status:string,tone:string,headline:string,summary:string},
* kpis: list<array<string, mixed>>,
* recommendedActions: list<array<string, mixed>>,
* governanceStatus: list<array<string, mixed>>,
* readinessCards: list<array<string, mixed>>,
* activeOperationSummary: array<string, mixed>|null,
* recentOperations: list<array<string, mixed>>,
* pollingInterval: ?string,
* }
*/
public function toArray(): array
{
return [
'context' => $this->context,
'posture' => $this->posture,
'kpis' => $this->kpis,
'recommendedActions' => $this->recommendedActions,
'governanceStatus' => $this->governanceStatus,
'readinessCards' => $this->readinessCards,
'activeOperationSummary' => $this->activeOperationSummary,
'recentOperations' => $this->recentOperations,
'pollingInterval' => $this->pollingInterval,
];
}
}