Skip to content

Commit

Permalink
Merge branch 'feat/monitoraggio-caricamenti' of https://github.com/te…
Browse files Browse the repository at this point in the history
…amdigitale/monitoraggio.repubblicadigitale.gov.it into feat/monitoraggio-caricamenti
  • Loading branch information
lcucuzzella committed Oct 21, 2024
2 parents eb4d8a0 + 1f639da commit 802326c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion fe-piattaforma/src/components/HeaderMenu/headerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ const HeaderMenu: React.FC<HeaderMenuI> = (props) => {
);
};

const filteredMenuRoutes = menuRoutes.filter(({ visible = [] }) => hasUserPermission(visible)).some(route => route.path === '/area-dati')
? menuRoutes.filter(route => route.path !== '/area-dati/report-dati')
: menuRoutes;

return (
<nav
className={clsx(
Expand All @@ -130,7 +134,7 @@ const HeaderMenu: React.FC<HeaderMenuI> = (props) => {
tabIndex={-1}
>
<ul className='d-flex align-items-end mb-0' role='menu'>
{menuRoutes
{filteredMenuRoutes
.filter(({ visible = [] }) => hasUserPermission(visible))
.map((li) => (
<li
Expand Down
8 changes: 7 additions & 1 deletion fe-piattaforma/src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export const MenuRoutes = [
label: 'Area dati',
path: '/area-dati',
id: 'tab-dashboard',
visible: ['tab.dshb'],
visible: ['vis.mntr'],
subRoutes: [
newMenuItem({
label: 'Report dati',
Expand All @@ -244,6 +244,12 @@ export const MenuRoutes = [
})
],
}),
newMenuItem({
label: 'Report dati',
path: '/area-dati/report-dati',
id: 'tab-report',
visible: ['tab.dshb'],
}),
newMenuItem({
label: 'Bacheca',
path: '/bacheca',
Expand Down

0 comments on commit 802326c

Please sign in to comment.