Scope parks and downstream investment requests to the treated opportunity

This commit is contained in:
2026-10-23 17:49:22 +02:00
parent ad4160f040
commit 4a01e9e2b7
25 changed files with 408 additions and 39 deletions
+2 -2
View File
@@ -428,7 +428,7 @@ export default function InvestmentPath(path: Path) {
function support() {
router.post(
`/balcao-virtual/dossiers/${path.case.id}/pedidos`,
{ service_version_id: service, client_key: requestKey },
{ service_version_id: service, client_key: requestKey, opportunity: new URLSearchParams(window.location.search).get('opportunity') },
{ onError: (errors) => setError(Object.values(errors).join('; ')) },
);
}
@@ -531,7 +531,7 @@ export default function InvestmentPath(path: Path) {
}
/>
)}
{!!path.investment_context?.opportunity_choices?.length && <OpportunityChoices choices={path.investment_context.opportunity_choices}/>}
{!!path.investment_context?.opportunity_choices?.length && <OpportunityChoices contextId={path.case.id} choices={path.investment_context.opportunity_choices}/>}
<SelectedComplements items={path.investment_context?.complements ?? []}/>
<InvestmentRequirements assessment={path.investment_context?.requirements_assessment} contextId={path.case.id} excludedSteps={path.steps.filter((step) => !step.preparation_allowed).map((step) => step.code)}/>
{!!path.content_sources?.length && (