oportunidades 7
tests / ci (push) Waiting to run

This commit is contained in:
2026-10-13 11:40:29 +02:00
parent 20971d523f
commit 287e991486
2902 changed files with 1085456 additions and 25957 deletions
+234 -220
View File
@@ -102,7 +102,10 @@ function TopBar({
requestCount: number;
}) {
return (
<nav aria-label="Navegação das manifestações" className="sticky top-0 z-30 border-b border-slate-200 bg-white/95 backdrop-blur">
<nav
aria-label="Navegação das manifestações"
className="sticky top-0 z-30 border-b border-slate-200 bg-white/95 backdrop-blur"
>
<div className="mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3 px-5 py-4">
<button
onClick={() => onNavigate('home')}
@@ -1103,234 +1106,245 @@ export default function PortalInvestidorApp({
<TopBar onNavigate={navigate} requestCount={requestCount} />
<PortalMenu />
<main>
{view === 'home' && (
<>
<Hero
query={heroQuery}
setQuery={setHeroQuery}
onSearch={handleHeroSearch}
stats={home.data?.data.stats}
onNavigate={navigate}
/>
<section className="mx-auto max-w-6xl space-y-5 px-5 py-10">
<h2 className="text-2xl font-bold">
Encontre o contexto do seu investimento
</h2>
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
{[
[
'/clusters',
'Clusters',
'Cadeias de valor e lacunas produtivas.',
],
[
'/corredores',
'Corredores',
'Territórios, logística e conexões.',
],
[
'/projectos-ancora',
'Projectos âncora',
'Projectos estruturantes e relações.',
],
[
'/educacao',
'Educação',
'Investimentos em competências e formação.',
],
[
'/documentos',
'Documentos e Formulários',
'Legislação, procedimentos, formulários e materiais de apoio.',
],
].map(([href, title, text]) => (
{view === 'home' && (
<>
<Hero
query={heroQuery}
setQuery={setHeroQuery}
onSearch={handleHeroSearch}
stats={home.data?.data.stats}
onNavigate={navigate}
/>
<section className="mx-auto max-w-6xl space-y-5 px-5 py-10">
<h2 className="text-2xl font-bold">
Encontre o contexto do seu investimento
</h2>
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
{[
[
'/clusters',
'Clusters',
'Cadeias de valor e lacunas produtivas.',
],
[
'/corredores',
'Corredores',
'Territórios, logística e conexões.',
],
[
'/projectos-ancora',
'Projectos âncora',
'Projectos estruturantes e relações.',
],
[
'/educacao',
'Educação',
'Investimentos em competências e formação.',
],
[
'/documentos',
'Documentos e Formulários',
'Legislação, procedimentos, formulários e materiais de apoio.',
],
].map(([href, title, text]) => (
<a
key={href}
href={href}
className="rounded-xl border bg-white p-5"
>
<h3 className="text-lg font-bold">
{title}
</h3>
<p>{text}</p>
</a>
))}
</div>
</section>
<QueryStatus
loading={home.loading}
error={home.error}
retry={home.retry}
/>
{home.data && (
<SectorGrid
onSelectSector={handleSelectSector}
/>
)}
<section className="mx-auto max-w-6xl space-y-5 px-5 py-12">
<h2 className="text-2xl font-black">
Como Investir
</h2>
<div className="grid gap-5 md:grid-cols-3">
{[
[
'1. Explorar',
'Identifique o sector, território e oportunidade.',
'/oportunidades',
],
[
'2. Preparar',
'Conheça o percurso e organize os documentos.',
'/como-investir',
],
[
'3. Acompanhar',
'Envie o pedido e acompanhe o protocolo.',
'/balcao-virtual',
],
].map(([title, text, href]) => (
<a
key={href}
href={href}
className="rounded-xl border bg-white p-6"
>
<h3 className="font-bold">
{title}
</h3>
<p>{text}</p>
</a>
))}
</div>
</section>
<section className="border-t border-slate-200 bg-white py-16">
<div className="mx-auto max-w-6xl px-5">
<div className="mb-8 flex items-end justify-between">
<h2 className="text-2xl font-black text-slate-900">
Oportunidades em destaque
</h2>
<button
onClick={goToOpportunities}
className="text-sm font-bold text-emerald-700 hover:underline"
>
Ver todas →
</button>
</div>
{home.data && featured.length === 0 && (
<p className="text-slate-600">
Não existem oportunidades em
destaque neste momento.
</p>
)}
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
{featured.map((o) => (
<OpportunityCard
key={o.reference}
opportunity={o}
onView={handleView}
onInterest={handleInterest}
/>
))}
</div>
</div>
</section>
<section className="mx-auto grid max-w-6xl gap-6 px-5 py-12 md:grid-cols-2">
<div className="space-y-4 rounded-xl border bg-white p-6">
<h2 className="text-2xl font-black">
Documentos essenciais
</h2>
{essentialResources.length > 0 && (
<ul className="space-y-2">
{essentialResources.map(
(resource) => (
<li key={resource.id}>
<a
className="underline"
href={`/documentos/${resource.id}/download`}
>
{resource.title}
</a>
</li>
),
)}
</ul>
)}
<p>
Consulte legislação, referências e
formulários publicados para preparar o
seu investimento.
</p>
<a
key={href}
href={href}
className="rounded-xl border bg-white p-5"
className="font-semibold text-emerald-800 underline"
href="/documentos"
>
<h3 className="text-lg font-bold">
{title}
</h3>
<p>{text}</p>
Abrir biblioteca documental
</a>
))}
</div>
</section>
<p>
<a
className="underline"
href="/legislacao"
>
Legislação e Incentivos
</a>
</p>
</div>
<div className="space-y-4 rounded-xl bg-emerald-900 p-6 text-white">
<h2 className="text-2xl font-black">
Apoio ao Investidor
</h2>
<p>
Peça orientação à equipa, proponha uma
parceria ou acompanhe o seu pedido.
</p>
<a
className="font-semibold underline"
href="/apoio"
>
Contactar Apoio ao Investidor
</a>
<p>
<a
className="underline"
href="/parcerias"
>
Bolsa de Parcerias
</a>{' '}
·{' '}
<a
className="underline"
href="/simulador-fiscal"
>
Simulador Fiscal
</a>
</p>
</div>
</section>
</>
)}
{view !== 'home' && home.error && (
<QueryStatus
loading={home.loading}
loading={false}
error={home.error}
retry={home.retry}
/>
{home.data && (
<SectorGrid onSelectSector={handleSelectSector} />
)}
)}
{view === 'opportunities' && (
<OpportunitiesView
filters={filters}
setFilters={setFilters}
onView={handleView}
onInterest={handleInterest}
/>
)}
<section className="mx-auto max-w-6xl space-y-5 px-5 py-12">
<h2 className="text-2xl font-black">
Como Investir
</h2>
<div className="grid gap-5 md:grid-cols-3">
{[
[
'1. Explorar',
'Identifique o sector, território e oportunidade.',
'/oportunidades',
],
[
'2. Preparar',
'Conheça o percurso e organize os documentos.',
'/como-investir',
],
[
'3. Acompanhar',
'Envie o pedido e acompanhe o protocolo.',
'/balcao-virtual',
],
].map(([title, text, href]) => (
<a
key={href}
href={href}
className="rounded-xl border bg-white p-6"
>
<h3 className="font-bold">{title}</h3>
<p>{text}</p>
</a>
))}
</div>
</section>
<section className="border-t border-slate-200 bg-white py-16">
<div className="mx-auto max-w-6xl px-5">
<div className="mb-8 flex items-end justify-between">
<h2 className="text-2xl font-black text-slate-900">
Oportunidades em destaque
</h2>
<button
onClick={goToOpportunities}
className="text-sm font-bold text-emerald-700 hover:underline"
>
Ver todas →
</button>
</div>
{home.data && featured.length === 0 && (
<p className="text-slate-600">
Não existem oportunidades em destaque
neste momento.
</p>
)}
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
{featured.map((o) => (
<OpportunityCard
key={o.reference}
opportunity={o}
onView={handleView}
onInterest={handleInterest}
/>
))}
</div>
</div>
</section>
<section className="mx-auto grid max-w-6xl gap-6 px-5 py-12 md:grid-cols-2">
<div className="space-y-4 rounded-xl border bg-white p-6">
<h2 className="text-2xl font-black">
Documentos essenciais
</h2>
{essentialResources.length > 0 && (
<ul className="space-y-2">
{essentialResources.map((resource) => (
<li key={resource.id}>
<a
className="underline"
href={`/documentos/${resource.id}/download`}
>
{resource.title}
</a>
</li>
))}
</ul>
)}
<p>
Consulte legislação, referências e
formulários publicados para preparar o seu
investimento.
</p>
<a
className="font-semibold text-emerald-800 underline"
href="/documentos"
>
Abrir biblioteca documental
</a>
<p>
<a className="underline" href="/legislacao">
Legislação e Incentivos
</a>
</p>
</div>
<div className="space-y-4 rounded-xl bg-emerald-900 p-6 text-white">
<h2 className="text-2xl font-black">
Apoio ao Investidor
</h2>
<p>
Peça orientação à equipa, proponha uma
parceria ou acompanhe o seu pedido.
</p>
<a
className="font-semibold underline"
href="/apoio"
>
Contactar Apoio ao Investidor
</a>
<p>
<a className="underline" href="/parcerias">
Bolsa de Parcerias
</a>{' '}
·{' '}
<a
className="underline"
href="/simulador-fiscal"
>
Simulador Fiscal
</a>
</p>
</div>
</section>
</>
)}
{view !== 'home' && home.error && (
<QueryStatus
loading={false}
error={home.error}
retry={home.retry}
/>
)}
{view === 'opportunities' && (
<OpportunitiesView
filters={filters}
setFilters={setFilters}
onView={handleView}
onInterest={handleInterest}
/>
)}
{view === 'detail' && selected && (
<OpportunityDetail
opportunity={selected}
onBack={goToOpportunities}
onInterest={handleInterest}
/>
)}
{view === 'interest' && (
<InterestForm
key={selected?.reference ?? 'general'}
preselected={selected}
countries={countries}
onSubmitted={() => setRequestCount((c) => c + 1)}
/>
)}
{view === 'detail' && selected && (
<OpportunityDetail
opportunity={selected}
onBack={goToOpportunities}
onInterest={handleInterest}
/>
)}
{view === 'interest' && (
<InterestForm
key={selected?.reference ?? 'general'}
preselected={selected}
countries={countries}
onSubmitted={() => setRequestCount((c) => c + 1)}
/>
)}
</main>
<Footer />