fix(v12): complete currency schedule and import diagnostics
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user