Wire grounded private investment preparation into QA dossier path
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
PreparationSummary,
|
||||
type Preparation,
|
||||
} from '@/components/private-investment-preparation';
|
||||
import ContextDocuments from '@/components/context-documents';
|
||||
import type { DossierContext } from '@/lib/investor-context';
|
||||
import FintechInvestment, {
|
||||
@@ -27,6 +31,7 @@ type Step = {
|
||||
source_paragraph: number;
|
||||
};
|
||||
type Path = {
|
||||
private_investment?: Preparation | null;
|
||||
fintech: FintechView | null;
|
||||
investment_context: DossierContext | null;
|
||||
zone_contexts?: {
|
||||
@@ -180,6 +185,28 @@ function Stage({ step, path }: { step: Step; path: Path }) {
|
||||
independente.
|
||||
</label>
|
||||
)}
|
||||
{path.private_investment?.enabled && (
|
||||
<div className="space-y-2">
|
||||
{path.private_investment.requirements
|
||||
.filter((r) => r.stage === step.code)
|
||||
.map((r) => (
|
||||
<p className="text-sm" key={r.key}>
|
||||
<strong>{r.label}:</strong>{' '}
|
||||
{r.state === 'not_applicable'
|
||||
? 'não exigido neste contexto; histórico preservado'
|
||||
: r.state === 'associated'
|
||||
? 'documento associado; conteúdo por conferir'
|
||||
: r.state === 'missing'
|
||||
? 'documento por associar'
|
||||
: 'aplicabilidade por determinar'}
|
||||
. {r.reason}{' '}
|
||||
<a className="underline" href={r.source.url}>
|
||||
{r.source.reference}
|
||||
</a>
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{step.reason && (
|
||||
<p className="text-sm">Fundamento: {step.reason}</p>
|
||||
)}
|
||||
@@ -415,6 +442,10 @@ export default function InvestmentPath(path: Path) {
|
||||
<ContextDocuments
|
||||
source={path.investment_context?.selection.opportunity}
|
||||
/>
|
||||
<PreparationSummary
|
||||
data={path.private_investment}
|
||||
caseId={path.case.id}
|
||||
/>
|
||||
{path.investment_context && (
|
||||
<section className="space-y-2 rounded border border-emerald-300 bg-emerald-50 p-4">
|
||||
<h2 className="font-semibold">
|
||||
|
||||
Reference in New Issue
Block a user