resolvemos o problema dos ZEE e ZFI
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-07 19:46:35 +02:00
parent 0a086c3fa5
commit bdd766c68a
74 changed files with 6401 additions and 32 deletions
+5 -2
View File
@@ -6,6 +6,7 @@
useRef,
useState,
} from 'react';
import PartnershipSourceLinks from './partnership-source-links';
import {
getAutosaveSnapshot,
partitionSimulationDraft,
@@ -1053,6 +1054,7 @@ export function SimulationForm() {
let cancelled = false;
void (async () => {
let local: SimulationDraft = {};
const requestedDraftId = new URLSearchParams(window.location.search).get('draft');
try {
const stored = sessionStorage.getItem(draftKey);
if (stored) local = JSON.parse(stored) as SimulationDraft;
@@ -1063,7 +1065,7 @@ export function SimulationForm() {
}
try {
const response = await fetch(
'/api/v1/simulation-drafts/current',
requestedDraftId ? `/api/v1/simulation-drafts/${encodeURIComponent(requestedDraftId)}` : '/api/v1/simulation-drafts/current',
{
credentials: 'same-origin',
headers: {
@@ -1110,7 +1112,7 @@ export function SimulationForm() {
setSelectedAccountDraftId(
listPayload.data[0]?.id ?? '',
);
if (previewPayload.data) {
if (previewPayload.data && !requestedDraftId) {
setPendingAnonymousDraft(previewPayload.data);
setShowDraftChoice(true);
setSaveStatus(
@@ -2104,6 +2106,7 @@ export function SimulationForm() {
className="space-y-6 rounded-xl border bg-white p-4 sm:p-6"
aria-labelledby="simulator-step-title"
>
{canSavePersonalData && draftVersionNo && draftIdRef.current && <PartnershipSourceLinks type="simulation" id={draftIdRef.current}/>}
<div className="flex flex-wrap items-start justify-between gap-3">
<div>
<h2