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
@@ -24,6 +24,9 @@ type Props = {
}[];
disclaimer: string;
management: boolean;
countryName: string;
declaredOrigin: { code: string | null; name: string };
territoryPaths: { id: string; name: string; location_type: string }[][];
};
const statusLabels: Record<string, string> = {
draft: 'Rascunho privado',
@@ -57,6 +60,9 @@ export default function LandCase({
events,
disclaimer,
management,
countryName,
declaredOrigin,
territoryPaths,
}: Props) {
const [file, setFile] = useState<File | null>(null);
const [category, setCategory] = useState('other');
@@ -149,6 +155,13 @@ export default function LandCase({
<strong>Categoria:</strong>{' '}
{payload.applicant_category ?? 'Por indicar'}
</p>
<p>
<strong>País do requerente:</strong> {countryName}
</p>
<p>
<strong>Origem declarada da solicitação:</strong>{' '}
{declaredOrigin.name}
</p>
<p>
<strong>Contacto preferido:</strong>{' '}
{payload.preferred_contact ?? 'Por indicar'}
@@ -169,6 +182,17 @@ export default function LandCase({
.join('; ') || 'Por localizar/confirmar'}
</p>
<p className="text-sm sm:col-span-2">
{territoryPaths.map(
(path, index) =>
path.length > 0 && (
<span className="block" key={index}>
Parcela {index + 1}:{' '}
{path
.map((territory) => territory.name)
.join(' → ')}
</span>
),
)}
Dados e situação geográfica aqui exibidos são declarações do
requerente; não confirmam direitos ou disponibilidade
cadastral.
+30 -1
View File
@@ -1,5 +1,6 @@
import { Link, useForm } from '@inertiajs/react';
import { useEffect, useMemo, useState } from 'react';
import CountrySelect, { type Country } from '@/components/country-select';
import {
TerritoryFields,
type TerritoryOption,
@@ -30,6 +31,7 @@ const emptyPayload = (user: { name: string; email: string }): Payload => ({
phone: '',
preferred_contact: '',
country: '',
declared_origin_country_code: '',
nationality: '',
representative_name: '',
representative_role: '',
@@ -76,6 +78,7 @@ export default function LandForm({
user,
disclaimer,
modelVersion,
countries,
}: {
case: {
id: string;
@@ -87,6 +90,7 @@ export default function LandForm({
user: { name: string; email: string };
disclaimer: string;
modelVersion: string;
countries: Country[];
}) {
const [step, setStep] = useState(0);
const initial = useMemo(
@@ -272,7 +276,32 @@ export default function LandForm({
<option value="any">Qualquer um indicado</option>
</select>
</label>
{text('country', 'País, se aplicável')}
<CountrySelect
countries={countries}
value={current.country ?? ''}
onChange={(value) => update('country', value)}
label="País, se aplicável"
allowLegacyValue
/>
<CountrySelect
countries={countries}
value={current.declared_origin_country_code ?? ''}
onChange={(value) =>
update('declared_origin_country_code', value)
}
label="País de origem declarado da solicitação (opcional)"
/>
{(form.errors['payload.country'] ||
form.errors[
'payload.declared_origin_country_code'
]) && (
<p role="alert">
{form.errors['payload.country'] ??
form.errors[
'payload.declared_origin_country_code'
]}
</p>
)}
{text('nationality', 'Nacionalidade, se aplicável')}
{category === 'entity' && (
<>