TenantAtlas/apps/platform/app/Support/EnvironmentDashboard/EnvironmentDashboardSummary.php
ahmido 0c7adefe5b Spec 330: environment dashboard baseline compare productization (#392)
## Summary
- add the baseline compare landing experience for the environment dashboard productization flow
- expand the environment dashboard overview and summary-building logic to support richer baseline comparison states and assessments
- update the supporting Blade templates for the new compare and overview presentation
- add English and German translations for the baseline compare surface
- include the Spec 330 planning and task artifacts alongside the implementation

## Tests
- touched browser, feature, and unit coverage for the new baseline compare flow
- updated test files include `Spec330EnvironmentDashboardBaselineCompareSmokeTest`, `BaselineCompareLandingWhyNoFindingsTest`, `Spec330EnvironmentDashboardBaselineCompareProductizationTest`, `HeaderContextBarTest`, and `ManagedEnvironmentModelTest`
- no additional test run was performed as part of this commit/push/PR workflow

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #392
2026-05-20 20:32:39 +00:00

79 lines
3.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Support\EnvironmentDashboard;
final readonly class EnvironmentDashboardSummary
{
/**
* @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 array<string, mixed> $readinessDecision
* @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 list<array<string, mixed>> $readinessDimensions
* @param list<array<string, mixed>> $readinessProofPanel
* @param list<array<string, mixed>> $supportingSignals
* @param array<string, mixed> $diagnosticsDisclosure
* @param array<string, mixed>|null $activeOperationSummary
* @param list<array<string, mixed>> $recentOperations
*/
public function __construct(
public array $context,
public array $posture,
public array $readinessDecision,
public array $kpis,
public array $recommendedActions,
public array $governanceStatus,
public array $readinessCards,
public array $readinessDimensions,
public array $readinessProofPanel,
public array $supportingSignals,
public array $diagnosticsDisclosure,
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},
* readinessDecision: array<string, mixed>,
* kpis: list<array<string, mixed>>,
* recommendedActions: list<array<string, mixed>>,
* governanceStatus: list<array<string, mixed>>,
* readinessCards: list<array<string, mixed>>,
* readinessDimensions: list<array<string, mixed>>,
* readinessProofPanel: list<array<string, mixed>>,
* supportingSignals: list<array<string, mixed>>,
* diagnosticsDisclosure: 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,
'readinessDecision' => $this->readinessDecision,
'kpis' => $this->kpis,
'recommendedActions' => $this->recommendedActions,
'governanceStatus' => $this->governanceStatus,
'readinessCards' => $this->readinessCards,
'readinessDimensions' => $this->readinessDimensions,
'readinessProofPanel' => $this->readinessProofPanel,
'supportingSignals' => $this->supportingSignals,
'diagnosticsDisclosure' => $this->diagnosticsDisclosure,
'activeOperationSummary' => $this->activeOperationSummary,
'recentOperations' => $this->recentOperations,
'pollingInterval' => $this->pollingInterval,
];
}
}