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
+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' && (
<>