TenantAtlas/apps/platform/app/Filament/Widgets/Dashboard/TenantDashboardOverview.php
ahmido 2952e5ad3e feat: polish tenant dashboard operations attention UX (#338)
## Summary
- rename the tenant dashboard operations KPI to attention-first wording and keep the primary header CTA derived from the highest-priority recommended action
- restyle the `Operations requiring attention` card to match the existing neutral dashboard card language while keeping only a subtle per-item attention accent
- replace technical operation identifiers on the dashboard with calmer timing/copy, including provider-consent follow-up messaging for blocked permission posture checks
- refresh the local Spec Kit artifacts for spec 273 so the branch documentation matches the implemented attention-only dashboard scope

## Validation
- `export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Dashboard/TenantDashboardProductizationSummaryTest.php tests/Feature/Dashboard/TenantDashboardProductizationActionsTest.php tests/Feature/Dashboard/TenantDashboardProductizationAuthorizationTest.php tests/Feature/Filament/DashboardKpisWidgetTest.php tests/Feature/Filament/TenantDashboardDbOnlyTest.php tests/Browser/Dashboard/TenantDashboardProductizationSmokeTest.php`
- `export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent`

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #338
2026-05-07 16:55:17 +00:00

56 lines
1.8 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Filament\Widgets\Dashboard;
use App\Models\ManagedEnvironment;
use App\Support\TenantDashboard\TenantDashboardSummaryBuilder;
use Filament\Facades\Filament;
use Filament\Widgets\Widget;
class TenantDashboardOverview extends Widget
{
protected static bool $isLazy = false;
protected int|string|array $columnSpan = 'full';
protected string $view = 'filament.widgets.dashboard.tenant-dashboard-overview';
/**
* @return array<string, mixed>
*/
protected function getViewData(): array
{
$tenant = Filament::getTenant();
if (! $tenant instanceof ManagedEnvironment) {
return [
'context' => [
'workspace' => __('localization.dashboard.overview.context_workspace'),
'tenant' => __('localization.dashboard.overview.context_no_tenant'),
'provider' => null,
'providerKey' => null,
'latestActivity' => null,
],
'posture' => [
'status' => __('localization.dashboard.overview.status_unavailable'),
'tone' => 'gray',
'headline' => __('localization.dashboard.overview.tenant_context_unavailable_headline'),
'summary' => __('localization.dashboard.overview.tenant_context_unavailable_summary'),
],
'kpis' => [],
'recommendedActions' => [],
'governanceStatus' => [],
'readinessCards' => [],
'activeOperationSummary' => null,
'recentOperations' => [],
'pollingInterval' => null,
];
}
return app(TenantDashboardSummaryBuilder::class)
->build($tenant)
->toArray();
}
}