## Summary - add a dedicated Recovery Readiness dashboard widget for backup posture and recovery evidence - group Needs Attention items by domain and elevate the recovery call-to-action - align restore-run and recovery posture tests with the extracted widget and continuity flows - include the related spec artifacts for 184-dashboard-recovery-honesty ## Verification - `cd /Users/ahmeddarrazi/Documents/projects/TenantAtlas/apps/platform && ./vendor/bin/sail bin pint --dirty --format agent` - `cd /Users/ahmeddarrazi/Documents/projects/TenantAtlas/apps/platform && ./vendor/bin/sail artisan test --compact --filter="DashboardKpisWidget|DashboardRecoveryPosture|TenantDashboardDbOnly|TenantpilotSeedBackupHealthBrowserFixtureCommand|NeedsAttentionWidget"` - browser smoke verified on the calm, unvalidated, and weakened dashboard states ## Notes - Livewire v4.0+ compliant with Filament v5 - no panel provider changes; Laravel 11+ provider registration remains in `bootstrap/providers.php` - Recovery Readiness stays within the existing tenant dashboard asset strategy; no new Filament asset registration required Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #215
47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Tenant;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\BackupSet>
|
|
*/
|
|
class BackupSetFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'tenant_id' => Tenant::factory(),
|
|
'name' => fake()->words(3, true),
|
|
'created_by' => fake()->email(),
|
|
'status' => 'completed',
|
|
'item_count' => fake()->numberBetween(0, 100),
|
|
'completed_at' => now(),
|
|
'metadata' => [],
|
|
];
|
|
}
|
|
|
|
public function recentCompleted(): static
|
|
{
|
|
return $this->state(fn (): array => [
|
|
'status' => 'completed',
|
|
'completed_at' => now()->subMinutes(20),
|
|
]);
|
|
}
|
|
|
|
public function staleCompleted(): static
|
|
{
|
|
return $this->state(fn (): array => [
|
|
'status' => 'completed',
|
|
'completed_at' => now()->subDays(2),
|
|
]);
|
|
}
|
|
}
|