feat: apply owner warning decisions and add editable annual planning example

This commit is contained in:
2026-11-20 10:01:44 +02:00
parent 04d8db6c1b
commit 5f7db7cd9b
15 changed files with 1069 additions and 32 deletions
@@ -23,7 +23,7 @@ final class BusinessPlanDraftContinuityTest extends TestCase
$cases = [];
foreach (['Hotel sintético QA' => '250.50', 'Agronegócio sintético QA' => '375.25'] as $title => $price) {
$case = app(VirtualDesk::class)->createCase($owner, ['title' => $title, 'client_key' => (string) Str::uuid(), 'reuse_consent' => true]);
$snapshot = json_encode(['version' => 17, 'plan' => ['currency' => 'MZN', 'products' => [['label' => $title, 'monthlyUnits' => '25', 'unitPrice' => $price, 'unitVariableCost' => '100.50']], 'monthlyOperatingExpenses' => '500.25', 'salesCollectionPercent' => '', 'openingReceivablesCollectionPercent' => '']], JSON_THROW_ON_ERROR);
$snapshot = json_encode(['version' => 17, 'plan' => ['currency' => 'MZN', 'annualGrowthPercent' => '250', 'products' => [['label' => $title, 'monthlyUnits' => '25', 'unitPrice' => $price, 'unitVariableCost' => '100.50']], 'monthlyOperatingExpenses' => '500.25', 'salesCollectionPercent' => '', 'openingReceivablesCollectionPercent' => '']], JSON_THROW_ON_ERROR);
$this->actingAs($owner)->postJson('/api/v1/simulation-drafts', ['context' => $case->id, 'personal_snapshot' => [], 'economic_snapshot' => ['purpose' => 'simulate_only', 'journey_type' => 'small_business', 'business_plan_snapshot' => $snapshot]], ['Idempotency-Key' => (string) Str::uuid()])->assertCreated();
$cases[] = [$case->id, $snapshot];
}