fix(investor): simplify preparation flow, profile requests and scoped zone search
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-28 21:26:59 +02:00
parent 54d1b2a543
commit 502e3ec4d5
23 changed files with 573 additions and 101 deletions
+12 -2
View File
@@ -28,7 +28,7 @@ export function profileLinks(access: ProfileAccess | null | undefined) {
...(access.administration
? [
{
title: 'Instalação dos perfis 040000',
title: 'Configuração dos perfis',
href: '/management/profile-install',
},
]
@@ -41,16 +41,26 @@ export default function ProfileNavigation() {
profileAccess?: ProfileAccess | null;
}>().props;
if (!profileAccess) return null;
const links = profileLinks(profileAccess);
const workHrefs = [profileAccess.mine, profileAccess.create, profileAccess.review].filter(Boolean);
const work = links.filter((link) => workHrefs.includes(link.href));
const access = links.filter((link) => !workHrefs.includes(link.href));
return (
<nav
aria-label="Perfil e oportunidades"
className="flex flex-wrap gap-4 rounded border p-4"
>
{profileLinks(profileAccess).map((link) => (
{work.map((link) => (
<Link key={link.href} href={link.href} className="underline">
{link.title}
</Link>
))}
{access.length > 0 && <details className="basis-full">
<summary className="cursor-pointer font-medium">O meu acesso e administração</summary>
<div className="mt-3 flex flex-wrap gap-4">{access.map((link) =>
<Link key={link.href} href={link.href} className="underline">{link.title}</Link>
)}</div>
</details>}
</nav>
);
}