fix: harmonizar pesquisa e navegacao dos catalogos em QA
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/** Only a query string is carried; the return destination is always local. */
|
||||
export function catalogueDetailHref(path: string, query: string): string {
|
||||
return query
|
||||
? `${path}?catalogue_query=${encodeURIComponent(query)}`
|
||||
: path;
|
||||
}
|
||||
export function catalogueReturnHref(base: string, pageUrl: string): string {
|
||||
const query = new URL(pageUrl, 'https://portal.invalid').searchParams.get(
|
||||
'catalogue_query',
|
||||
);
|
||||
return base + (query ? `?${new URLSearchParams(query).toString()}` : '');
|
||||
}
|
||||
@@ -445,6 +445,11 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
|
||||
label: 'Descoberta',
|
||||
children: [
|
||||
link('home', 'Início', '/'),
|
||||
link(
|
||||
'idea-entry',
|
||||
'Partir de uma ideia',
|
||||
'/investimentos/iniciar',
|
||||
),
|
||||
link(
|
||||
'why',
|
||||
'Porquê investir em Moçambique',
|
||||
@@ -457,6 +462,36 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
|
||||
),
|
||||
link('sectors', 'Sectores de investimento', '/sectores'),
|
||||
link('locations', 'Localizações', '/oportunidades?view=map'),
|
||||
{
|
||||
id: 'related-catalogues',
|
||||
label: 'Catálogos relacionados',
|
||||
children: [
|
||||
link(
|
||||
'portfolio',
|
||||
'Carteira, clusters e corredores',
|
||||
'/carteira',
|
||||
),
|
||||
link('zones', 'Zonas e parques', '/zonas'),
|
||||
...(access.businesses
|
||||
? [
|
||||
link(
|
||||
'business-catalogue',
|
||||
'Negócios',
|
||||
'/negocios',
|
||||
),
|
||||
]
|
||||
: []),
|
||||
...(access.education
|
||||
? [
|
||||
link(
|
||||
'education-catalogue',
|
||||
'Oportunidades na educação',
|
||||
'/educacao',
|
||||
),
|
||||
]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -487,6 +522,8 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
|
||||
id: 'support',
|
||||
label: 'Suporte',
|
||||
children: [
|
||||
link('documents', 'Biblioteca de documentos', '/documentos'),
|
||||
link('legislation', 'Legislação', '/legislacao'),
|
||||
link(
|
||||
'services',
|
||||
'Serviços ao investidor',
|
||||
|
||||
Reference in New Issue
Block a user