oportunidades 6
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-10 21:17:46 +02:00
parent 01405cbf8a
commit 20971d523f
126 changed files with 44362 additions and 3496 deletions
+68 -8
View File
@@ -13,6 +13,7 @@ export type PortalNavAccess = {
businesses?: boolean;
education?: boolean;
ai?: boolean;
legacyContent?: boolean;
profileAccess?: ProfileAccess | null;
opportunityManagement?: OpportunityManagementAccess | null;
};
@@ -32,6 +33,15 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
children: [
link('opportunities', 'Oportunidades', '/oportunidades'),
link('sectors', 'Sectores', '/sectores'),
...(access.legacyContent
? [
link(
'legacy-agronegocio',
'Explorar agronegócio',
'/explorar/agronegocio',
),
]
: []),
{
id: 'structures',
label: 'Carteira e estruturas',
@@ -279,14 +289,64 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
});
if (access.authenticated && access.profileAccess) {
const profile = access.profileAccess;
groups.push({id: 'profile-opportunities', label: 'Perfil e oportunidades', children: [
...(profile.mine ? [link('my-opportunities', 'Minhas oportunidades', profile.mine)] : []),
...(profile.create ? [link('new-my-opportunity', 'Nova oportunidade', profile.create)] : []),
link('promoter-profile', profile.mine ? 'Autorizações de Promotor' : 'Solicitar perfil de Promotor', profile.request),
...(!profile.mine && profile.review ? [link('profile-review', 'Revisão de oportunidades', profile.review)] : []),
...(profile.audit ? [link('profile-audit', 'Auditoria de acessos', profile.audit)] : []),
...(profile.administration ? [link('profile-administration', 'Gestão de perfis', profile.administration)] : []),
]});
groups.push({
id: 'profile-opportunities',
label: 'Perfil e oportunidades',
children: [
...(profile.mine
? [
link(
'my-opportunities',
'Minhas oportunidades',
profile.mine,
),
]
: []),
...(profile.create
? [
link(
'new-my-opportunity',
'Nova oportunidade',
profile.create,
),
]
: []),
link(
'promoter-profile',
profile.mine
? 'Autorizações de Promotor'
: 'Solicitar perfil de Promotor',
profile.request,
),
...(!profile.mine && profile.review
? [
link(
'profile-review',
'Revisão de oportunidades',
profile.review,
),
]
: []),
...(profile.audit
? [
link(
'profile-audit',
'Auditoria de acessos',
profile.audit,
),
]
: []),
...(profile.administration
? [
link(
'profile-administration',
'Gestão de perfis',
profile.administration,
),
]
: []),
],
});
}
return groups;
}