fix(v12): complete currency schedule and import diagnostics

This commit is contained in:
2026-11-21 08:58:00 +02:00
parent 64601256d5
commit 4bb2fd670a
9 changed files with 411 additions and 10 deletions
@@ -5,6 +5,7 @@ import {
businessPlanNumberError,
exportBusinessPlanCsv,
forecastBusinessPlan,
financialPlanImportMessage,
MAX_BUSINESS_PLAN_SNAPSHOT_LENGTH,
restoreBusinessPlanSnapshot,
serializeBusinessPlanSnapshot,
@@ -196,10 +197,7 @@ export function SimulationBusinessPlan({
try {
const source = await file.text();
const imported = restoreBusinessPlanSnapshot(source);
if (!imported)
throw new Error(
'O ficheiro não contém um plano JSON reconhecido pelo InvestMoz.',
);
if (!imported) throw new Error(financialPlanImportMessage(source));
savePlan(imported);
setSnapshotError('');
} catch (cause) {