Integrate supplied institutions by location category and type through investor dossiers
This commit is contained in:
@@ -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]) => (
|
||||
|
||||
Reference in New Issue
Block a user