feat: add private business intake review and reserved objects
This commit is contained in:
@@ -17,6 +17,8 @@ export const portalLinks = [
|
||||
["/apoio", "Apoio ao Investidor"],
|
||||
] as const;
|
||||
const names: Record<string, string> = {
|
||||
"/investidor/negocios": "Os meus negócios",
|
||||
"/management/negocios": "Revisão de negócios",
|
||||
...Object.fromEntries(portalLinks),
|
||||
"/parcerias": "Bolsa de Parcerias",
|
||||
"/simulador-fiscal": "Simulador Fiscal",
|
||||
@@ -47,13 +49,16 @@ export default function PortalNavigation({ children }: { children: ReactNode })
|
||||
.filter((p) => p !== "/" && path.startsWith(`${p}/`))
|
||||
.sort((a, b) => b.length - a.length)[0];
|
||||
const pageProps = props as {
|
||||
record?: { title?: string };
|
||||
record?: { title?: string; name?: string };
|
||||
zone?: { name?: string };
|
||||
sector?: { name?: string };
|
||||
initialOpportunity?: { title?: string };
|
||||
};
|
||||
const title =
|
||||
names[path] ??
|
||||
pageProps.record?.title ??
|
||||
pageProps.record?.name ??
|
||||
pageProps.zone?.name ??
|
||||
pageProps.sector?.name ??
|
||||
pageProps.initialOpportunity?.title ??
|
||||
(path.includes("/edit")
|
||||
@@ -109,6 +114,7 @@ export default function PortalNavigation({ children }: { children: ReactNode })
|
||||
}
|
||||
|
||||
export function PortalMenu() {
|
||||
const { existingBusinessEnabled } = usePage<{ existingBusinessEnabled?: boolean }>().props;
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const menuId = useId();
|
||||
return (
|
||||
@@ -139,6 +145,11 @@ export function PortalMenu() {
|
||||
{label}
|
||||
</Link>
|
||||
))}
|
||||
{existingBusinessEnabled && (
|
||||
<Link href="/investidor/negocios" className="underline">
|
||||
Os meus negócios
|
||||
</Link>
|
||||
)}
|
||||
<Link href="/parcerias" className="underline">
|
||||
Bolsa de Parcerias
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user