Prepare supplied financial directory with product coverage and native dossier continuity
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
import {
|
||||
InstitutionView,
|
||||
type InstitutionDetails,
|
||||
} from '@/components/funding-institution';
|
||||
import {
|
||||
FundingDossierChoice,
|
||||
type FundingDossier,
|
||||
} from '@/components/funding-dossier-choice';
|
||||
import { Link, router } from '@inertiajs/react';
|
||||
import FundingCriteriaAssessment from '@/components/funding-criteria-assessment';
|
||||
import { Frame, card, button } from '@/pages/investment/shared';
|
||||
@@ -7,10 +15,18 @@ export default function Show({
|
||||
record,
|
||||
saved,
|
||||
authenticated,
|
||||
dossier = null,
|
||||
selection = {},
|
||||
needs = {},
|
||||
destinations = [],
|
||||
}: {
|
||||
record: Programme;
|
||||
saved: { version: number; saved_at: string } | null;
|
||||
authenticated: boolean;
|
||||
dossier?: FundingDossier | null;
|
||||
selection?: Record<string, string>;
|
||||
needs?: Record<string, string>;
|
||||
destinations?: { id: string; opportunity: string | null; title: string }[];
|
||||
}) {
|
||||
const payload = record.payload;
|
||||
return (
|
||||
@@ -18,10 +34,26 @@ export default function Show({
|
||||
<Link className="underline" href="/fundos/guardados">
|
||||
Programas que guardei
|
||||
</Link>
|
||||
<Link className="underline" href="/fundos">
|
||||
<Link
|
||||
className="underline"
|
||||
href={`/fundos?${new URLSearchParams(selection)}`}
|
||||
>
|
||||
Voltar aos fundos e programas
|
||||
</Link>
|
||||
<p>{payload.summary}</p>
|
||||
{payload.kind === 'institution' && (
|
||||
<InstitutionView value={payload as InstitutionDetails} />
|
||||
)}
|
||||
{authenticated && (
|
||||
<FundingDossierChoice
|
||||
key={`${record.id}:${record.version_id}:${dossier?.id ?? ''}:${dossier?.opportunity ?? ''}:${selection.territory ?? ''}`}
|
||||
record={record}
|
||||
dossier={dossier}
|
||||
selection={selection}
|
||||
needs={needs}
|
||||
destinations={destinations}
|
||||
/>
|
||||
)}
|
||||
<p>
|
||||
Gestor: {payload.manager_name}. Versão publicada:{' '}
|
||||
{record.version}.
|
||||
|
||||
Reference in New Issue
Block a user