feat(qa): integrate official Mozambique CAE into saved financial plans
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
import CatalogueChoiceSelect from './catalogue-choice-select';
|
||||
import {
|
||||
describePlanCae,
|
||||
mozambiqueCaeSource,
|
||||
planCaeChoices,
|
||||
selectPlanCae,
|
||||
} from '@/lib/cae-mozambique';
|
||||
import type { BusinessFinancialPlanInput } from '@/lib/business-financial-plan';
|
||||
|
||||
export function PlanEconomicClassification({
|
||||
plan,
|
||||
onChange,
|
||||
}: {
|
||||
plan: BusinessFinancialPlanInput;
|
||||
onChange: (plan: BusinessFinancialPlanInput) => void;
|
||||
}) {
|
||||
const classification = describePlanCae(plan.economicClassification);
|
||||
return (
|
||||
<section
|
||||
className="my-4 min-w-0 space-y-3 rounded border p-3"
|
||||
aria-label="Classificação económica do plano"
|
||||
>
|
||||
<h3 className="font-semibold">
|
||||
Actividade económica — CAE de Moçambique
|
||||
</h3>
|
||||
<p className="text-sm">
|
||||
Escolha a subclasse correspondente à actividade efectivamente
|
||||
prevista. Quando houver alternativas, confirme a actividade
|
||||
principal; o sector do portal e as vendas projectadas não
|
||||
determinam automaticamente a CAE.
|
||||
</p>
|
||||
<CatalogueChoiceSelect
|
||||
label="Actividade CAE do plano"
|
||||
options={planCaeChoices}
|
||||
value={plan.economicClassification?.code ?? ''}
|
||||
onChange={(code) =>
|
||||
onChange({
|
||||
...plan,
|
||||
economicClassification: selectPlanCae(code),
|
||||
})
|
||||
}
|
||||
/>
|
||||
<p role="status">{classification.value}</p>
|
||||
<p className="text-sm">
|
||||
Escolha declarada pelo investidor, a confirmar documentalmente.
|
||||
Não altera cálculos, impostos, licenças ou financiamento. Pode
|
||||
continuar com «Não documentado».
|
||||
</p>
|
||||
<a
|
||||
className="text-sm underline"
|
||||
href={mozambiqueCaeSource.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Consultar CAE-Rev.2 — INE, 2008
|
||||
</a>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import { SimulationAnnualExample } from '@/components/simulation-annual-example'
|
||||
import { IntegralFinancialPlan } from '@/components/integral-financial-plan';
|
||||
import { MarketAnalysisPlan } from '@/components/market-analysis-plan';
|
||||
import { FinancialRatiosPlan } from '@/components/financial-ratios-plan';
|
||||
import { PlanEconomicClassification } from '@/components/plan-economic-classification';
|
||||
|
||||
const emptyPlan: BusinessFinancialPlanInput = {
|
||||
currency: '',
|
||||
@@ -941,6 +942,7 @@ export function SimulationBusinessPlan({
|
||||
}
|
||||
/>
|
||||
)}
|
||||
<PlanEconomicClassification plan={plan} onChange={savePlan} />
|
||||
<IntegralFinancialPlan plan={plan} onChange={savePlan} />
|
||||
<MarketAnalysisPlan plan={plan} onChange={savePlan} />
|
||||
<FinancialRatiosPlan plan={plan} onChange={savePlan} />
|
||||
|
||||
Reference in New Issue
Block a user