feat(qa): consolidate eleven financial report tables pending private visual acceptance

This commit is contained in:
2026-11-20 13:31:47 +02:00
parent 2e5b7f973c
commit 93fc837a47
12 changed files with 674 additions and 68 deletions
+4 -2
View File
@@ -329,12 +329,14 @@ final class InvestorPath
'snapshot_sha256' => $draft->snapshot_sha256, 'financial_snapshot' => $snapshot,
'context_opportunity' => $opportunity,
'currency' => $economic['currency'] ?? null, 'engine' => 'financial-calculators:v1',
'preparation_snapshot' => Arr::only($economic, ['total_investment', 'secured_amount', 'planned_funding', 'requested_funding', 'approved_funding', 'planning_loan', 'annual_revenue', 'annual_operating_costs', 'investment_budget_min', 'investment_budget_max', 'initial_budget_snapshot', 'planning_assumptions_snapshot']),
'preparation_snapshot' => Arr::only($economic, ['total_investment', 'secured_amount', 'planned_funding', 'requested_funding', 'approved_funding', 'planning_loan', 'annual_revenue', 'annual_operating_costs', 'investment_budget_min', 'investment_budget_max', 'initial_budget_snapshot', 'planning_assumptions_snapshot', 'business_plan_snapshot', 'project_team_snapshot', 'project_execution_snapshot']),
'kind' => 'local_calculation_inputs', 'context_state' => 'current', 'context_revision' => $context['revision'], 'context_dependency_hash' => $context['dependency_hash'] ?? app(InvestorContext::class)->dependencyHash([]), 'recorded_at' => now()->toIso8601String()];
$payload['investor_path']['results'][] = $result;
abort_unless(count($payload['investor_path']['results']) <= 100, 422, 'Limite de evidências financeiras deste dossier atingido.');
$this->savePayload($case, $payload);
$this->desk->event($this->desk->case($actor, $id), $actor, 'tool_evidence_returned', array_diff_key($result, ['financial_snapshot' => true]));
$eventResult = $result;
$eventResult['preparation_snapshot'] = Arr::except($eventResult['preparation_snapshot'], ['business_plan_snapshot', 'project_team_snapshot', 'project_execution_snapshot']);
$this->desk->event($this->desk->case($actor, $id), $actor, 'tool_evidence_returned', array_diff_key($eventResult, ['financial_snapshot' => true]));
return $result;
});