fix: share selected opportunity across simulator stages and land shortcuts

This commit is contained in:
2026-10-23 18:25:09 +02:00
parent bc84fbdb3e
commit 1afdfee8c0
17 changed files with 337 additions and 46 deletions
@@ -153,7 +153,7 @@ export function NavigationContextProvider({
}
const view = focus
? await contextApi<NavigationView>(
`/investimentos/${focus.case_id}`,
`/investimentos/${focus.case_id}${direct===focus.case_id && new URL(url,'https://context.invalid').searchParams.get('opportunity') ? '?opportunity='+encodeURIComponent(new URL(url,'https://context.invalid').searchParams.get('opportunity')!) : ''}`,
)
: null;
if (!stopped) {
@@ -285,7 +285,7 @@ export function NavigationContextSummary() {
{view && (
<Link
className="font-semibold underline"
href={`/investimentos/${active}`}
href={`/investimentos/${active}${scopedChoice ? '?opportunity='+encodeURIComponent(scopedChoice.opportunity.key) : ''}`}
>
Abrir dossier atual
</Link>
@@ -293,7 +293,7 @@ export function NavigationContextSummary() {
{view?.next && (
<Link
className="underline"
href={`/investimentos/${active}#${view.next.code}`}
href={`/investimentos/${active}${scopedChoice ? '?opportunity='+encodeURIComponent(scopedChoice.opportunity.key) : ''}#${view.next.code}`}
>
Preparar {view.next.code}
</Link>