Integrate supplied institutions by location category and type through investor dossiers
This commit is contained in:
@@ -279,7 +279,9 @@ function Editor({
|
||||
}
|
||||
function text(
|
||||
key: {
|
||||
[K in keyof Draft]: Draft[K] extends string ? K : never;
|
||||
[K in keyof Draft]-?: Draft[K] extends string | null | undefined
|
||||
? K
|
||||
: never;
|
||||
}[keyof Draft],
|
||||
label: string,
|
||||
type = 'text',
|
||||
@@ -427,6 +429,18 @@ function Editor({
|
||||
{!draft.manager_organization_id &&
|
||||
text('manager_name', 'Gestor indicado pela fonte')}
|
||||
{text('source_url', 'Endereço da fonte', 'url')}
|
||||
{!draft.source_url && (
|
||||
<>
|
||||
{text(
|
||||
'source_document_name',
|
||||
'Documento de origem',
|
||||
)}
|
||||
{text(
|
||||
'source_document_sha256',
|
||||
'SHA-256 do documento',
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{text('source_reference', 'Documento, edição e referência')}
|
||||
{text(
|
||||
'source_checked_on',
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
financialCategories,
|
||||
financialTypes,
|
||||
} from '@/components/funding-classification';
|
||||
import { Link, useForm } from '@inertiajs/react';
|
||||
import { Frame, card, button } from '@/pages/investment/shared';
|
||||
import { type Programme, windowLabels } from './shared';
|
||||
@@ -24,6 +28,10 @@ export default function Index({
|
||||
need?: string;
|
||||
context?: string;
|
||||
opportunity?: string;
|
||||
category?: string;
|
||||
institution_type?: string;
|
||||
location_mode?: string;
|
||||
include_historical?: string;
|
||||
};
|
||||
options: {
|
||||
sectors: { id: number; name: string }[];
|
||||
@@ -34,6 +42,10 @@ export default function Index({
|
||||
management: boolean;
|
||||
}) {
|
||||
const form = useForm({
|
||||
category: filters.category ?? '',
|
||||
institution_type: filters.institution_type ?? '',
|
||||
location_mode: filters.location_mode ?? 'coverage',
|
||||
include_historical: filters.include_historical ?? '0',
|
||||
context: filters.context ?? '',
|
||||
opportunity: filters.opportunity ?? '',
|
||||
need: filters.need ?? '',
|
||||
@@ -66,7 +78,74 @@ export default function Index({
|
||||
}}
|
||||
>
|
||||
<label>
|
||||
Necessidade de financiamento
|
||||
Categoria
|
||||
<select
|
||||
className="block rounded border p-2"
|
||||
value={form.data.category}
|
||||
onChange={(e) =>
|
||||
form.setData('category', e.target.value)
|
||||
}
|
||||
>
|
||||
<option value="">Todas</option>
|
||||
{Object.entries(financialCategories).map(
|
||||
([id, label]) => (
|
||||
<option key={id} value={id}>
|
||||
{label}
|
||||
</option>
|
||||
),
|
||||
)}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Tipo
|
||||
<select
|
||||
className="block rounded border p-2"
|
||||
value={form.data.institution_type}
|
||||
onChange={(e) =>
|
||||
form.setData('institution_type', e.target.value)
|
||||
}
|
||||
>
|
||||
<option value="">Todos</option>
|
||||
{Object.entries(financialTypes).map(([id, label]) => (
|
||||
<option key={id} value={id}>
|
||||
{label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Localização a pesquisar
|
||||
<select
|
||||
className="block rounded border p-2"
|
||||
value={form.data.location_mode}
|
||||
onChange={(e) =>
|
||||
form.setData('location_mode', e.target.value)
|
||||
}
|
||||
>
|
||||
<option value="physical">
|
||||
Sede, balcão ou presença física
|
||||
</option>
|
||||
<option value="coverage">
|
||||
Cobertura do financiamento/produto
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={form.data.include_historical === '1'}
|
||||
onChange={(e) =>
|
||||
form.setData(
|
||||
'include_historical',
|
||||
e.target.checked ? '1' : '0',
|
||||
)
|
||||
}
|
||||
/>
|
||||
Incluir instituições históricas/fundidas, identificadas como
|
||||
tal
|
||||
</label>
|
||||
<label>
|
||||
Necessidade do processo
|
||||
<select
|
||||
className="block rounded border p-2"
|
||||
value={form.data.need}
|
||||
@@ -195,6 +274,15 @@ export default function Index({
|
||||
</Link>
|
||||
</h2>
|
||||
<p>{item.payload.summary}</p>
|
||||
<p>
|
||||
{(item.payload.institution_categories ?? [])
|
||||
.map((k) => financialCategories[k] ?? k)
|
||||
.join(' · ')}{' '}
|
||||
·{' '}
|
||||
{(item.payload.institution_types ?? [])
|
||||
.map((k) => financialTypes[k] ?? k)
|
||||
.join(' · ')}
|
||||
</p>
|
||||
<p>Gestor: {item.payload.manager_name}</p>
|
||||
{Object.entries(item.filter_explanation ?? {}).map(
|
||||
([key, message]) => (
|
||||
|
||||
@@ -85,13 +85,19 @@ export default function Show({
|
||||
<p>
|
||||
<a
|
||||
className="underline"
|
||||
href={payload.source_url}
|
||||
href={payload.source_url || undefined}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Consultar fonte: {payload.source_reference}
|
||||
</a>
|
||||
. Consultada em {payload.source_checked_on}.
|
||||
. Consultada em {payload.source_checked_on}.{' '}
|
||||
{payload.source_document_name && (
|
||||
<span>
|
||||
Documento: {payload.source_document_name} · SHA-256{' '}
|
||||
{payload.source_document_sha256}
|
||||
</span>
|
||||
)}
|
||||
</p>
|
||||
<section className={card}>
|
||||
<h2 className="text-xl font-semibold">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
financialCategories,
|
||||
financialTypes,
|
||||
evidenceLabels,
|
||||
} from '@/components/funding-classification';
|
||||
import {
|
||||
ProactiveSummary,
|
||||
proactiveView,
|
||||
@@ -45,6 +50,18 @@ type Path = {
|
||||
programme_id: string;
|
||||
version: number;
|
||||
need: string;
|
||||
institution_key?: string;
|
||||
categories?: string[];
|
||||
institution_types?: string[];
|
||||
location?: {
|
||||
id: string;
|
||||
label: string;
|
||||
address?: string;
|
||||
source_reference: string;
|
||||
source_document_sha256?: string;
|
||||
evidence_status?: string;
|
||||
location_text?: string;
|
||||
} | null;
|
||||
opportunity: string | null;
|
||||
notice: string;
|
||||
product?: {
|
||||
@@ -1077,14 +1094,14 @@ export default function InvestmentPath(path: Path) {
|
||||
id="financiamento"
|
||||
className="rounded-xl border bg-white p-4"
|
||||
>
|
||||
<h2>Referências de financiamento do dossier</h2>
|
||||
<h2>Instituições e serviços ligados ao processo</h2>
|
||||
<p>
|
||||
Escolhas privadas para preparação; não são candidaturas
|
||||
enviadas nem concessões de financiamento.
|
||||
</p>
|
||||
{path.tools.funding && (
|
||||
<Link className="underline" href={path.tools.funding}>
|
||||
Pesquisar instituições e apoios para este investimento
|
||||
Pesquisar bancos, seguradoras e outras instituições
|
||||
</Link>
|
||||
)}
|
||||
{(path.funding_selections ?? []).map((row) => (
|
||||
@@ -1101,6 +1118,41 @@ export default function InvestmentPath(path: Path) {
|
||||
'Condições por confirmar'}
|
||||
</p>
|
||||
<p>{row.notice}</p>
|
||||
<p>
|
||||
Identidade:{' '}
|
||||
{row.institution_key ?? 'Referência anterior'} ·
|
||||
Categoria:{' '}
|
||||
{(row.categories ?? [])
|
||||
.map((k) => financialCategories[k] ?? k)
|
||||
.join(' · ') || 'Por classificar'}{' '}
|
||||
· Tipo:{' '}
|
||||
{(row.institution_types ?? [])
|
||||
.map((k) => financialTypes[k] ?? k)
|
||||
.join(' · ') || 'Por classificar'}
|
||||
</p>
|
||||
{row.location && (
|
||||
<section>
|
||||
<h4>
|
||||
Sede/balcão escolhido: {row.location.label}
|
||||
</h4>
|
||||
<p>
|
||||
{row.location.location_text} ·{' '}
|
||||
{row.location.address}
|
||||
</p>
|
||||
<p>
|
||||
{row.location.evidence_status
|
||||
? evidenceLabels[
|
||||
row.location.evidence_status
|
||||
]
|
||||
: ''}{' '}
|
||||
· {row.location.source_reference}
|
||||
</p>
|
||||
<p>
|
||||
SHA-256 da origem:{' '}
|
||||
{row.location.source_document_sha256}
|
||||
</p>
|
||||
</section>
|
||||
)}
|
||||
<Link
|
||||
className="underline"
|
||||
href={`/fundos/${row.programme_id}?context=${path.case.id}${row.opportunity ? '&opportunity=' + encodeURIComponent(row.opportunity) : ''}`}
|
||||
|
||||
Reference in New Issue
Block a user