oportunidades 4
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-10 07:03:59 +02:00
parent e662230df7
commit 6ddafc95ba
179 changed files with 22750 additions and 933 deletions
+42 -11
View File
@@ -6,6 +6,7 @@ import { ProvinceSelect } from '@/components/investment-territory';
import { SimulationForm } from '@/components/simulation-form';
import { InvestmentRoadmap } from '@/components/investment-roadmap';
import { JourneyDocumentResources } from '@/components/journey-document-resources';
import CountrySelect, { type Country } from '@/components/country-select';
const input =
'box-border w-full min-w-0 max-w-full rounded-lg border border-slate-300 bg-white p-3 text-slate-900';
@@ -96,6 +97,7 @@ type Page<T> = {
total: number;
};
type Props = {
countries?: Country[];
section: string;
filters?: Record<string, string | string[]>;
sectors?: {
@@ -186,12 +188,15 @@ function RequestForm({
const { auth } = usePage<{
auth: { user: { name: string; email: string } | null };
}>().props;
const countries =
usePage<{ countries?: Country[] }>().props.countries ?? [];
const form = useForm({
kind,
fullName: auth.user?.name ?? '',
email: auth.user?.email ?? '',
phone: '',
country: 'Moçambique',
country: '',
declared_origin_country_code: '',
company: '',
sectorInterest: '',
message: '',
@@ -256,19 +261,45 @@ function RequestForm({
return (
<label key={field} className="block space-y-1">
<span>{labels[field]}</span>
<input
className={input}
type={field === 'email' ? 'email' : 'text'}
required={field !== 'phone'}
maxLength={field === 'phone' ? 30 : 150}
value={form.data[field]}
onChange={(e) =>
form.setData(field, e.target.value)
}
/>
{field === 'country' ? (
<CountrySelect
countries={countries}
value={form.data.country}
onChange={(value) =>
form.setData('country', value)
}
required
allowLegacyValue
/>
) : (
<input
className={input}
type={field === 'email' ? 'email' : 'text'}
required={field !== 'phone'}
maxLength={field === 'phone' ? 30 : 150}
value={form.data[field]}
onChange={(e) =>
form.setData(field, e.target.value)
}
/>
)}
</label>
);
})}
<label className="block">
País de origem declarado desta solicitação
<CountrySelect
countries={countries}
value={form.data.declared_origin_country_code}
onChange={(value) =>
form.setData('declared_origin_country_code', value)
}
/>
</label>
<p className="text-sm">
Origem opcional e independente do país acima. Sem declaração,
permanece não informado nas estatísticas.
</p>
<label className="block">
Descreva o pedido
<textarea