Prepare supplied financial directory with product coverage and native dossier continuity

This commit is contained in:
2026-11-10 18:51:23 +02:00
parent c8e0a7ee39
commit 5ff9402fd0
25 changed files with 2730 additions and 37 deletions
+28 -2
View File
@@ -8,6 +8,7 @@ export default function Index({
kinds,
management,
options,
needs = {},
}: {
items: {
data: Programme[];
@@ -20,15 +21,22 @@ export default function Index({
territory?: string;
certainty?: string;
state?: string;
need?: string;
context?: string;
opportunity?: string;
};
options: {
sectors: { id: number; name: string }[];
territories: { id: string; name: string }[];
};
kinds: Record<string, string>;
needs?: Record<string, string>;
management: boolean;
}) {
const form = useForm({
context: filters.context ?? '',
opportunity: filters.opportunity ?? '',
need: filters.need ?? '',
q: filters.q ?? '',
kind: filters.kind ?? '',
sector: filters.sector ?? '',
@@ -37,7 +45,7 @@ export default function Index({
state: filters.state ?? '',
});
return (
<Frame title="Fundos e programas de apoio">
<Frame title="Instituições financeiras, fundos e programas de apoio">
{management && (
<Link className={button} href="/management/fundos">
Gerir fundos e programas
@@ -57,6 +65,21 @@ export default function Index({
form.get('/fundos');
}}
>
<label>
Necessidade de financiamento
<select
className="block rounded border p-2"
value={form.data.need}
onChange={(e) => form.setData('need', e.target.value)}
>
<option value="">Todas / por identificar</option>
{Object.entries(needs).map(([id, label]) => (
<option key={id} value={id}>
{label}
</option>
))}
</select>
</label>
<label>
Palavras-chave
<input
@@ -164,7 +187,10 @@ export default function Index({
{items.data.map((item) => (
<article className={card} key={item.id}>
<h2 className="text-xl font-semibold">
<Link className="underline" href={`/fundos/${item.id}`}>
<Link
className="underline"
href={`/fundos/${item.id}?${new URLSearchParams(Object.entries(filters).filter((entry): entry is [string, string] => typeof entry[1] === 'string'))}`}
>
{item.payload.title}
</Link>
</h2>