fix: harmonizar pesquisa e navegacao dos catalogos em QA
This commit is contained in:
@@ -3,7 +3,8 @@ import ParkDetailsEditor, {
|
||||
emptyParkDetails,
|
||||
type ParkDetails,
|
||||
} from '@/components/investment-zone-operational-details';
|
||||
import { Link, router, useForm } from '@inertiajs/react';
|
||||
import { Link, router, useForm, usePage } from '@inertiajs/react';
|
||||
import { catalogueReturnHref } from '@/lib/catalogue-context';
|
||||
import InvestmentTerritory from '@/components/investment-territory';
|
||||
import InvestmentMapPanel from '@/components/investment-map-panel';
|
||||
import {
|
||||
@@ -276,6 +277,7 @@ function Editor({
|
||||
attachments,
|
||||
opportunities,
|
||||
}: Props) {
|
||||
const pageUrl = usePage().url;
|
||||
const [message, setMessage] = useState('');
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [locationPath, setLocationPath] = useState<TerritoryOption[]>([]);
|
||||
@@ -347,14 +349,27 @@ function Editor({
|
||||
}
|
||||
return (
|
||||
<Frame title={z.name}>
|
||||
<Link
|
||||
className="underline"
|
||||
href={catalogueReturnHref(
|
||||
management ? '/management/investment/zones' : '/zonas',
|
||||
pageUrl,
|
||||
)}
|
||||
>
|
||||
Voltar à pesquisa
|
||||
</Link>
|
||||
<TerritorialSources sources={territorialSources} />
|
||||
{!management && z.category === 'industrial_park' && (
|
||||
<ParkDetailsPublic value={z.operational_details_public} />
|
||||
)}
|
||||
{!management && <PartnershipSourceLinks type="zone" id={z.id} />}
|
||||
<p>
|
||||
{z.code} · {z.category.toUpperCase()} · {z.validation_status} ·{' '}
|
||||
{z.province} {z.district}
|
||||
{z.code} ·{' '}
|
||||
{z.category === 'industrial_park'
|
||||
? 'Parque industrial'
|
||||
: z.category.toUpperCase()}{' '}
|
||||
{management && `· ${z.validation_status}`} · {z.province}{' '}
|
||||
{z.district}
|
||||
</p>
|
||||
<p>
|
||||
A ficha é informativa. A associação territorial não atribui
|
||||
|
||||
Reference in New Issue
Block a user