fix(qa): verify private investor continuity across dossiers
This commit is contained in:
@@ -90,6 +90,9 @@ function Index({
|
||||
});
|
||||
const applied = useRef(JSON.stringify(form.data));
|
||||
const criteriaChanged = JSON.stringify(form.data) !== applied.current;
|
||||
const searchReady = Boolean(
|
||||
form.data.need && (form.data.territory || form.data.province_id),
|
||||
);
|
||||
const typeAllowed = (category: string, type: string) =>
|
||||
!category ||
|
||||
category === 'other' ||
|
||||
@@ -115,6 +118,7 @@ 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;
|
||||
form.get('/fundos');
|
||||
}}
|
||||
>
|
||||
@@ -406,7 +410,19 @@ function Index({
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
<button className={button} disabled={form.processing}>
|
||||
{!searchReady && (
|
||||
<p id="funding-search-minimum" role="status">
|
||||
Escolha a localização a pesquisar e a necessidade do
|
||||
processo antes de pesquisar.
|
||||
</p>
|
||||
)}
|
||||
<button
|
||||
className={button}
|
||||
disabled={form.processing || !searchReady}
|
||||
aria-describedby={
|
||||
!searchReady ? 'funding-search-minimum' : undefined
|
||||
}
|
||||
>
|
||||
Pesquisar
|
||||
</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user