@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user