## Summary - add persisted customer review acknowledgement truth with capability gating and audit emission - extend the customer review workspace with acknowledgement state, evidence basis details, and accepted-risk lifecycle visibility - add focused feature and browser coverage plus Spec 343 screenshot artifacts and UI audit updates ## Scope - Livewire v4 / Filament v5 surface only; no panel provider changes - no new global assets; no `filament:assets` deployment change for this slice - includes a PostgreSQL migration for `environment_review_acknowledgements` ## Guardrail / Exception / Smoke Coverage - reachable UI surface changed: existing `/admin/reviews/workspace` customer-safe page - UI audit updated in `docs/ui-ux-enterprise-audit/page-reports/ui-006-customer-review-workspace.md` - screenshot artifacts included under `specs/343-customer-review-attestation-accepted-risk-lifecycle/artifacts/screenshots/` - spec package includes plan, tasks, repo-truth map, and state contract for the implemented slice ## Notes - target branch requested: `platform-dev` - branch pushed from commit `aaaad441fd13dbac54e971ab48765c502ced6b3f` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #415
37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\EnvironmentReview;
|
|
use App\Models\EnvironmentReviewAcknowledgement;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<EnvironmentReviewAcknowledgement>
|
|
*/
|
|
class EnvironmentReviewAcknowledgementFactory extends Factory
|
|
{
|
|
protected $model = EnvironmentReviewAcknowledgement::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'environment_review_id' => function (): int {
|
|
return (int) EnvironmentReview::factory()->create()->getKey();
|
|
},
|
|
'managed_environment_id' => function (array $attributes): int {
|
|
return (int) EnvironmentReview::query()->whereKey((int) $attributes['environment_review_id'])->value('managed_environment_id');
|
|
},
|
|
'workspace_id' => function (array $attributes): int {
|
|
return (int) EnvironmentReview::query()->whereKey((int) $attributes['environment_review_id'])->value('workspace_id');
|
|
},
|
|
'acknowledged_at' => now(),
|
|
'acknowledged_by_user_id' => User::factory(),
|
|
'comment' => null,
|
|
'evidence_snapshot_id' => null,
|
|
'review_pack_id' => null,
|
|
];
|
|
}
|
|
}
|