fix: persist annual demonstration through existing simulation drafts

This commit is contained in:
2026-11-20 11:11:38 +02:00
parent 18dda022a0
commit 51d31d3790
9 changed files with 341 additions and 11 deletions
@@ -929,7 +929,15 @@ export function SimulationBusinessPlan({
? 'Fechar cenário de exemplo'
: 'Carregar cenário anual de exemplo'}
</button>
{showExample && <SimulationAnnualExample currency={currency} />}
{showExample && (
<SimulationAnnualExample
currency={currency}
snapshot={plan.annualExampleSnapshot}
onSnapshotChange={(annualExampleSnapshot) =>
savePlan({ ...plan, annualExampleSnapshot })
}
/>
)}
<div className="my-3 flex flex-wrap items-end gap-3 rounded border p-3">
<label className="grid gap-1 text-sm">
Importar plano financeiro InvestMoz (.json, até 60 KB)