Merge branch 'main' of https://git.tempo.co.mz/nala/Investidor-V2
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-23 15:33:56 +02:00
110 changed files with 4105 additions and 266 deletions
+3 -8
View File
@@ -1,9 +1,8 @@
import ProfileNavigation from '@/components/profile-navigation';
import ContentManagementEntry from '@/components/content-management-entry';
import DashboardManagement from '@/components/dashboard-management';
import DashboardWorkQueue, {
type DashboardQueue,
} from '@/components/dashboard-work-queue';
import { Head, Link } from '@inertiajs/react';
import { Link } from '@inertiajs/react';
import { dashboard } from '@/routes';
import type { InvestmentContext } from '@/pages/investor-path/index';
import type { OpportunityManagementAccess } from '@/types/opportunity-management';
@@ -56,10 +55,7 @@ export default function Dashboard({
}) {
return (
<div className="space-y-8 p-4 md:p-8">
<Head title="Painel" />
<h1 className="text-2xl font-semibold">Painel do portal</h1>
<ProfileNavigation />
<ContentManagementEntry />
<DashboardManagement summaryAvailable={!!summary} />
<section id="meu-trabalho" className="scroll-mt-24">
{workQueue ? (
<DashboardWorkQueue queue={workQueue} />
@@ -308,7 +304,6 @@ export default function Dashboard({
href={`/investimentos/${investorPath.current.id}#${investorPath.current.next.code}`}
>
Próxima acção:{' '}
{investorPath.current.next.code} ·{' '}
{investorPath.current.next.title}
</Link>
)}
+59 -11
View File
@@ -64,6 +64,7 @@ function Index({
criteriaErrors?: Record<string, string[]>;
}) {
const [notice, setNotice] = useState('');
const [searchAttempted, setSearchAttempted] = useState(false);
const [searchTerritory, setSearchTerritory] = useState(territorySelection);
const form = useForm({
category: filters.category ?? '',
@@ -93,6 +94,12 @@ function Index({
const searchReady = Boolean(
form.data.need && (form.data.territory || form.data.province_id),
);
const missingSearchCriteria = [
...(!form.data.need ? ['Seleccione a necessidade do processo.'] : []),
...(!(form.data.territory || form.data.province_id)
? ['Seleccione a província ou outra localização de interesse.']
: []),
];
const typeAllowed = (category: string, type: string) =>
!category ||
category === 'other' ||
@@ -118,7 +125,18 @@ function Index({
className={`${card} flex flex-wrap gap-4 [&_select]:w-full [&_select]:max-w-full [&_select]:min-w-0 [&>label]:w-full [&>label]:max-w-full [&>label]:min-w-0 sm:[&>label]:w-auto`}
onSubmit={(e) => {
e.preventDefault();
if (!searchReady) return;
if (!searchReady) {
setSearchAttempted(true);
const target = !form.data.need
? e.currentTarget?.querySelector<HTMLElement>(
'[name="need"]',
)
: e.currentTarget?.querySelector<HTMLElement>(
'[data-funding-location] input[role="combobox"]',
);
target?.focus();
return;
}
form.get('/fundos');
}}
>
@@ -257,13 +275,21 @@ function Index({
tal
</label>
<label>
Necessidade do processo
Necessidade do processo (obrigatória)
<select
name="need"
aria-label="Necessidade do processo"
aria-invalid={
(searchAttempted && !form.data.need) || undefined
}
aria-describedby={
!searchReady ? 'funding-search-minimum' : undefined
}
className="block rounded border p-2"
value={form.data.need}
onChange={(e) => form.setData('need', e.target.value)}
>
<option value="">Todas / por identificar</option>
<option value="">Seleccione a necessidade</option>
{Object.entries(needs).map(([id, label]) => (
<option key={id} value={id}>
{label}
@@ -314,9 +340,16 @@ function Index({
))}
</select>
</label>
<fieldset className="min-w-0 basis-full">
<fieldset
data-funding-location
className="min-w-0 basis-full"
aria-describedby={
!searchReady ? 'funding-search-minimum' : undefined
}
>
<legend>
Local de interesse — seleccione até ao nível conhecido
Local de interesse (obrigatório) — seleccione até ao
nível conhecido
</legend>
<label>
Localização a pesquisar
@@ -411,19 +444,34 @@ function Index({
</select>
</label>
{!searchReady && (
<p id="funding-search-minimum" role="status">
Escolha a localização a pesquisar e a necessidade do
processo antes de pesquisar.
</p>
<div
id="funding-search-minimum"
role={searchAttempted ? 'alert' : 'status'}
className={
searchAttempted
? 'basis-full rounded border border-amber-600 p-3'
: 'basis-full text-sm'
}
>
{searchAttempted && (
<p className="font-semibold">
A pesquisa não foi executada. Complete os campos
indicados.
</p>
)}
{missingSearchCriteria.map((message) => (
<p key={message}>{message}</p>
))}
</div>
)}
<button
className={button}
disabled={form.processing || !searchReady}
disabled={form.processing}
aria-describedby={
!searchReady ? 'funding-search-minimum' : undefined
}
>
Pesquisar
{form.processing ? 'A pesquisar…' : 'Pesquisar'}
</button>
</form>
{criteriaChanged && (
+2 -3
View File
@@ -348,11 +348,10 @@ function Stage({ step, path }: { step: Step; path: Path }) {
licensing ? 'font-semibold' : 'cursor-pointer underline'
}
>
Fonte e referência desta etapa
Enquadramento desta etapa
</ReferenceHeading>
<p>
Referência interna {step.code}. Documento original,
parágrafo {step.source_paragraph}.{' '}
Etapa: {step.title}.{' '}
{step.detail.scope === 'internal_validation'
? 'Conferência interna; não equivale a decisão externa.'
: step.detail.scope === 'external_document_recorded'